Code Started to "Ignore Processed Folder"

Any questions? Need some help?
Post Reply
Meph88
Donor
Posts: 35
Joined: 29 Jun 2014, 15:46

Code Started to "Ignore Processed Folder"

Post by Meph88 »

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:

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
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.
User avatar
rednoah
The Source
Posts: 23947
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Code Started to "Ignore Processed Folder"

Post by rednoah »

Yes, there've been some changes recently to avoid abuse and disable unsupported usage scenarios which can lead to unexpected behaviour.

Ignore processed folder is triggered by movie.nfo|tvshow.nfo so in your case you could simply set --def artwork=n for the first few amc calls, and only set it to y in the final amc call.
:idea: Please read the FAQ and How to Request Help.
Meph88
Donor
Posts: 35
Joined: 29 Jun 2014, 15:46

Re: Code Started to "Ignore Processed Folder"

Post by Meph88 »

That has perfectly resolved my issue.
Thank you so much for A) Making this app. B) Continuing to improve this app. C) Providing a perfect answer to my issue in virtually no time.
I purchased the app from the mac app store but still use the non app store version for the CLI interface ability but after this experience I'll be straight up donating.

Thank you so much.
elgallo
Posts: 40
Joined: 29 Apr 2014, 10:33

Re: Code Started to "Ignore Processed Folder"

Post by elgallo »

would there be a way to write this so

Code: Select all

/path/to/Finished/torrent_name.mp4

MOVE to 

/path/to/Seed_forever/torrent_name.mp4 

SYMLINK  .../Seed_forever/*

/path/to/Plex/TMDB_name (year) [cert]/movie name (year).ext

(the last part I would set via "movieFormat= /path/to/Plex -format my personal settings"


I think it's possible with symlink folders but I can't quite wrap my head around it... any suggestions?
Meph88
Donor
Posts: 35
Joined: 29 Jun 2014, 15:46

Re: Code Started to "Ignore Processed Folder"

Post by Meph88 »

In the case of my script as above I have a folder in that drive called "Symbolic Links" and inside that folder there are three folders "Movies", "TV Shows" and "Anime". These are the folders that filebot creates and uses to separate by media type.
I have made those folders into symlinks to folders on other drives each dedicated to one type: anime, movies or TV.
What filebot thinks is happening is it is copying the files to folders within the same directory but what actually happens is it drops the files into folders on three separate hard drives.

I'm not sure if this addresses what you're trying to do but if you have any questions past herr again.
elgallo
Posts: 40
Joined: 29 Apr 2014, 10:33

Re: Code Started to "Ignore Processed Folder"

Post by elgallo »

I'm going to try this in reverse. I would prefer to have filebot rename files and only have to symlink so that I do not break seeding (private trackers)


So I'm using your script as an example and simply calling on filebot for each of my save locations. this way I keep seeding on the drive that each file downloads to.--I use transmission to sort files based on tracker.


so

Code: Select all

#!/bin/bash
/Applications/Filebot.app/Contents/MacOS/filebot.sh -script fn:amc "/Volumes/Vide0/Television/0Uploading" --output "/Volumes/Vide0/Television/0Uploading/" --log-file amc.log --action symlink  --conflict auto -non-strict --def deleteAfterExtract=y music=n plex=gallo artwork=y clean=y "seriesFormat=/Volumes/Vide0/Television/Plex\ TV/{n.replaceTrailingBrackets().sortName()}/Season {s}/{n.replaceTrailingBrackets()} - S{s}E{e.pad(2)} - {t}{'.'lang}" "animeFormat=/Volumes/Vide0/Television/Plex\ Anime/{n.replaceTrailingBrackets().sortName()}/Season {s}/{n.replaceTrailingBrackets()} S{s}E{e.pad(2)} - {t}{'.'lang}"

/Applications/Filebot.app/Contents/MacOS/filebot.sh -script fn:amc "/Volumes/M0vies/Download/Plexed/" --output "/Volumes/M0vies/Download/Plexed/" --log-file amc.log --action symlink  --conflict auto non-strict --def deleteAfterExtract=y music=n plex=gallo artwork=y clean=y "movieFormat=/Volumes/M0vies/Plex\ Movies/{n} ({y}) [{certification}]/{n} ({y}) [{certification}]-[{vf},{af}]{'.'lang}"
I haven't tested as most of my TV shows are on hiatus and there haven't been any new releases in any of my queues. I'll report back in a week or so as to its functionality
Post Reply