Move subtitles to parent folder after download
Posted: May 29th, 2022, 5:19 am
Hi there,
I'm trying to automate my SABnzbd setup (running on QNAP) using a post-processing script.
As part of this, I would like to move my subtitle files out of the /Subs/* folder to the parent directory, as Plex doesn't support this type of structure.
So far, this is my script:
The command works fine in the command line but unfortunately not in SABnzbd. The problem is probably this:
Actually, this should be ".../Moon Knight/" and not ".../Moon". The files are sorted using SABnzbd with this expression: "%sn/S%0s/%dn"
Is there anything I could do about this isssue other than using a file path without spaces?
I'm trying to automate my SABnzbd setup (running on QNAP) using a post-processing script.
As part of this, I would like to move my subtitle files out of the /Subs/* folder to the parent directory, as Plex doesn't support this type of structure.
So far, this is my script:
Code: Select all
#!/bin/bash
cd $1
find . \( -path "*/Subs/*" -o -path "*/subs/*" -o -path "*/SUBS/*" \) -print -exec mv {} ./ \; && find . -type d -empty -delete
echo Done
Code: Select all
/share/Download/SABnzbd Scripts/filebot-shows.sh: line 2: cd: /share/video/Serien/Moon: No such file or directoryIs there anything I could do about this isssue other than using a file path without spaces?