2021-04-20, 00:11
Quick update for anyone who's interested.
Since I couldn't figure out how to teach this scraper to properly recognise common episode names from the usual sources, with considerable help, I now got a renamescript for my debian setup.
What it does:
! If you decide to use this, of course I take no responsibility in case it causes any problems.
! Only use this for anime. Regular TV-Show scrapers need the season part in there.
! Wherever you point this, it'll rename everything in that folder-tree.
! If there is an anime with two free standing digits in it's title, this will brick it.
Since I couldn't figure out how to teach this scraper to properly recognise common episode names from the usual sources, with considerable help, I now got a renamescript for my debian setup.
What it does:
- Remove the Season Part (S01, S02, s03 - S99), since anidb thinks every show ever is s01
- If there is free standing double digits, it'll add an 'E' in front of them, just like this scraper wants it
- Run every 5 minutes
I made this a daemon so it keeps running after system reboot.sh:#!/bin/bash
while true
do
shopt -s globstar
start_dir="//folder/to/watch/" # edit this part to your anime collection
for name in "$start_dir"/**/*.*; do # search the directory recursively
[ [ -f $name ] ] || continue # skip if "$name" is not a file
newname=$(sed -E 's/[sS](0[1-9]|[1-9][0-9]) *//; s/\b([0-9]{2})\b/E\1/' <<< "$name") if [ [ "$name" != "$newname" ] ]; then
# skip if the filenames are the same
mv -- "$name" "$newname" fi
done
sleep 300 # loop after 5 minutes
done
! If you decide to use this, of course I take no responsibility in case it causes any problems.
! Only use this for anime. Regular TV-Show scrapers need the season part in there.
! Wherever you point this, it'll rename everything in that folder-tree.
! If there is an anime with two free standing digits in it's title, this will brick it.