Skip to content

Commit

Permalink
Add version check and clean data folder if new
Browse files Browse the repository at this point in the history
  • Loading branch information
Arial-Z committed Mar 6, 2024
1 parent b2f99a9 commit daee825
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions plex-romaji-renamer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ SCRIPT_FOLDER=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
source "$SCRIPT_FOLDER/config/.env"
source "$SCRIPT_FOLDER/VERSION"
source "$SCRIPT_FOLDER/functions.sh"
if ! grep -q -w "$version" "$SCRIPT_FOLDER/config/version_last_run.txt"
then
rm $SCRIPT_FOLDER/config/data/*.json
fi
printf "%s" "$version" > "$SCRIPT_FOLDER/config/version_last_run.txt"
printf "%s - Plex-Romaji-Renamer v%s\n" "$(date +%H:%M:%S)" "$version" | tee -a "$LOG"
locale=$(locale -a | grep -i "utf" | head -n 1)
if [ -z "$locale" ]
Expand Down

0 comments on commit daee825

Please sign in to comment.