Skip to content

Commit

Permalink
Add ignore to movies
Browse files Browse the repository at this point in the history
  • Loading branch information
Arial-Z committed Jan 22, 2025
1 parent ba2694c commit 50bfa12
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions movies-renamer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,16 @@ do
then
if awk -F"\t" '{print $1}' "$SCRIPT_FOLDER/config/tmp/plex_movies_export.tsv" | grep -q -w "$imdb_id"
then
line=$(awk -F"\t" '{print $1}' "$SCRIPT_FOLDER/config/tmp/plex_movies_export.tsv" | grep -w -n "$imdb_id" | cut -d : -f 1)
plex_title=$(sed -n "${line}p" "$SCRIPT_FOLDER/config/tmp/plex_movies_export.tsv" | awk -F"\t" '{print $2}')
asset_name=$(sed -n "${line}p" "$SCRIPT_FOLDER/config/tmp/plex_movies_export.tsv" | awk -F"\t" '{print $3}')
printf "%s\t\t - Found override for imdb id : %s / anilist id : %s\n" "$(date +%H:%M:%S)" "$imdb_id" "$anilist_id" | tee -a "$LOG"
printf "%s\t%s\t%s\t%s\t%s\n" "$imdb_id" "$mal_id" "$anilist_id" "$plex_title" "$asset_name" >> "$SCRIPT_FOLDER/config/ID/movies.tsv"
if [[ "$anilist_id" == 'ignore' ]]
then
printf "%s\t\t - Found ignored imdb id : %s\n" "$(date +%H:%M:%S)" "$tvdb_id" | tee -a "$LOG"
else
line=$(awk -F"\t" '{print $1}' "$SCRIPT_FOLDER/config/tmp/plex_movies_export.tsv" | grep -w -n "$imdb_id" | cut -d : -f 1)
plex_title=$(sed -n "${line}p" "$SCRIPT_FOLDER/config/tmp/plex_movies_export.tsv" | awk -F"\t" '{print $2}')
asset_name=$(sed -n "${line}p" "$SCRIPT_FOLDER/config/tmp/plex_movies_export.tsv" | awk -F"\t" '{print $3}')
printf "%s\t\t - Found override for imdb id : %s / anilist id : %s\n" "$(date +%H:%M:%S)" "$imdb_id" "$anilist_id" | tee -a "$LOG"
printf "%s\t%s\t%s\t%s\t%s\n" "$imdb_id" "$mal_id" "$anilist_id" "$plex_title" "$asset_name" >> "$SCRIPT_FOLDER/config/ID/movies.tsv"
fi
fi
fi
done < "$SCRIPT_FOLDER/config/override-ID-movies.tsv"
Expand Down

0 comments on commit 50bfa12

Please sign in to comment.