Code Started to "Ignore Processed Folder"
Posted: 03 Dec 2014, 11:28
Hey,
I have a request for help. I am nowhere near expert level at command line, I dabble, I try and I get by.
I find filebot to be an amazing tool, I use it with a torrent downloader that launches a script I wrote at the end.
The script looks something like this:
I'll explain how this works and the issue I'm having -
First my torrent program finishes a download then moves it to the completed folder called "Finished - Transmission".
Then the torrent program launches my script.
The first part of the script copies all the files from the "Finished - Transmission" folder to a folder named incase which is for just incase something goes wrong and files go missing so I don't have to download it again (Only happened once but data redundancy never hurts and anything in that folder older than 3 days is automatically deleted).
The second part of the script renames the media files from "Finished - Transmission" and moves them to a folder called ""New Torrents" on a mounted network drive. Once done it sends a pushover notification to me so I know that this part has completed. This part works perfectly.
The third part is just the cleaner to go back to "Finished - Transmission" to tidy up the leftover files and keep disk space free.
The fourth part is the one with the issue.
What it should do and did do perfectly until a couple of days ago is go into the "New Torrents" folder where the new downloads were just dropped after being renamed and organised by show/season/etc and copy those files to a folder named "Symbolic Links" which houses three folders (named Anime, Movies and TV Shows) which are symbolic links to 3 hard drives dedicated to media storage (One drive for each Anime, Movies and TV Shows). Then it would send a pushover notification and update my plex library.
The excludelist prevented it from copying files that it had copied previously to avoid duplication of files.
The reason it's set this way is because in Plex I have a library for each media type (Anime, Movies and TV Shows) and a separate library for each with only the new additions called New Anime, New Movies and New TV Shows, that way I can easily see what I have that's new and I can simply delete files from the new folders once watched and they're already in my main media library and can be watched again from there.
What has been happening for the last few days with the fourth part of my script is this:
Instead of going into the folder for a show to look for media files that have not previously been processed, it ignores the folder outright. For example: for the show "Marvel's Agents of S.H.I.E.L.D." the output from an attempt at running this script is:
Ignore processed folder: /Volumes/Torrents/New Torrents/TV Shows/Marvel's Agents of S.H.I.E.L.D
I'm not sure why all of a sudden it wants to ignore folders. I suspect it's because it recognises that the folder has already been processed by filebot in the second part of the script.
The script worked exactly as expected on Monday for one show and an hour later was doing this when trying to process another show.
I hope there is a way to get my script back up and running as I had it.
Any help on this is hugely appreciated.
I think I've provided enough info on this but if anything else is needed respond and I'll provide the info you need.
I have a request for help. I am nowhere near expert level at command line, I dabble, I try and I get by.
I find filebot to be an amazing tool, I use it with a torrent downloader that launches a script I wrote at the end.
The script looks something like this:
Code: Select all
#!/bin/bash
rsync --ignore-existing --recursive /Users/MacMini/Documents/Torrent\ Stuff/Finished\ -\ Transmission /Users/MacMini/Documents/Torrent\ Stuff/incase
/opt/homebrew-cask/Caskroom/filebot/4.5/FileBot.app/Contents/MacOS/filebot.sh -script fn:amc "/Users/MacMini/Documents/Torrent Stuff/Finished - Transmission" --output "/Volumes/Torrents/New Torrents" --action move --conflict override -non-strict --def music=n artwork=y pushover=“my pushover key”
/opt/homebrew-cask/Caskroom/filebot/4.5/FileBot.app/Contents/MacOS/filebot.sh -script fn:cleaner "/Users/MacMini/Documents/Torrent Stuff/Finished - Transmission"
/opt/homebrew-cask/Caskroom/filebot/4.5/FileBot.app/Contents/MacOS/filebot.sh -script fn:amc "/Volumes/Torrents/New Torrents" --output "/Volumes/Torrents/Symbolic Links" --action copy --conflict override -non-strict --def music=n artwork=y plex=“plex address” pushover=“my pushover key” excludeList=excludelogall.txt
First my torrent program finishes a download then moves it to the completed folder called "Finished - Transmission".
Then the torrent program launches my script.
The first part of the script copies all the files from the "Finished - Transmission" folder to a folder named incase which is for just incase something goes wrong and files go missing so I don't have to download it again (Only happened once but data redundancy never hurts and anything in that folder older than 3 days is automatically deleted).
The second part of the script renames the media files from "Finished - Transmission" and moves them to a folder called ""New Torrents" on a mounted network drive. Once done it sends a pushover notification to me so I know that this part has completed. This part works perfectly.
The third part is just the cleaner to go back to "Finished - Transmission" to tidy up the leftover files and keep disk space free.
The fourth part is the one with the issue.
What it should do and did do perfectly until a couple of days ago is go into the "New Torrents" folder where the new downloads were just dropped after being renamed and organised by show/season/etc and copy those files to a folder named "Symbolic Links" which houses three folders (named Anime, Movies and TV Shows) which are symbolic links to 3 hard drives dedicated to media storage (One drive for each Anime, Movies and TV Shows). Then it would send a pushover notification and update my plex library.
The excludelist prevented it from copying files that it had copied previously to avoid duplication of files.
The reason it's set this way is because in Plex I have a library for each media type (Anime, Movies and TV Shows) and a separate library for each with only the new additions called New Anime, New Movies and New TV Shows, that way I can easily see what I have that's new and I can simply delete files from the new folders once watched and they're already in my main media library and can be watched again from there.
What has been happening for the last few days with the fourth part of my script is this:
Instead of going into the folder for a show to look for media files that have not previously been processed, it ignores the folder outright. For example: for the show "Marvel's Agents of S.H.I.E.L.D." the output from an attempt at running this script is:
Ignore processed folder: /Volumes/Torrents/New Torrents/TV Shows/Marvel's Agents of S.H.I.E.L.D
I'm not sure why all of a sudden it wants to ignore folders. I suspect it's because it recognises that the folder has already been processed by filebot in the second part of the script.
The script worked exactly as expected on Monday for one show and an hour later was doing this when trying to process another show.
I hope there is a way to get my script back up and running as I had it.
Any help on this is hugely appreciated.
I think I've provided enough info on this but if anything else is needed respond and I'll provide the info you need.