Skip to content

Commit

Permalink
Ignore seasons null, and add a fallback for native title
Browse files Browse the repository at this point in the history
  • Loading branch information
Arial-Z committed Feb 16, 2024
1 parent c1b2066 commit d8f8c20
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,10 @@ function get-season-infos () {
if [[ $SEASON_YEAR == "Yes" ]]
then
anime_season=$(get-animes-season-year)
printf " 1:\n label.sync: %s\n" "$anime_season" >> "$METADATA"
if [ "$anime_season" != "Null Null" ]
then
printf " 1:\n label.sync: %s\n" "$anime_season" >> "$METADATA"
fi
else
printf " 1:\n label.remove: score\n" >> "$METADATA"
fi
Expand Down Expand Up @@ -534,7 +537,7 @@ function get-season-infos () {
if [[ $SEASON_YEAR == "Yes" ]]
then
anime_season=$(get-animes-season-year)
if [[ $ALLOW_RENAMING == "Yes" && $RENAME_SEASONS == "Yes" ]]
if [[ $ALLOW_RENAMING == "Yes" && $RENAME_SEASONS == "Yes" && $anime_season != "Null Null" ]]
then
printf " %s:\n title: |-\n %s\n user_rating: %s\n label: %s,score\n" "$season_number" "$romaji_title" "$score_season" "$anime_season" >> "$METADATA"
else
Expand Down Expand Up @@ -595,6 +598,10 @@ function write-metadata () {
if [ "$english_title" == "null" ]
then
english_title=$romaji_title
fi
if [ "$native_title" == "null" ]
then
native_title=$romaji_title
fi
if [[ $ALLOW_RENAMING == "Yes" ]]
then
Expand Down

0 comments on commit d8f8c20

Please sign in to comment.