unpacking torrent to dir based on label with AMC script?
unpacking torrent to dir based on label with AMC script?
Im using filebot with the AMC script and rtorrent its working perfect but I would like filebot to unpack to dirs defined by me based on the torrent label and if I havent defined any dir for the label it should default back to the standard dir
is this possible with the AMC script
is this possible with the AMC script
Re: unpacking torrent to dir based on label with AMC script?
By "unpack" do you mean "copy to" because unpack wouldn't make sense since files are moved to another location anyway. If you want to move files into a structure define your own formats and use the {label} binding as you see fit. 

Re: unpacking torrent to dir based on label with AMC script?
yes i mean "copy to" as it is unpacked before it moved/copied - my mistake 
im not sure what you mean by define your own formats. could you give an example?
what i want to do is this:
if {label} is XYZ then copy into this/folder/structure/
and if {label} is anything else then use default/folder/structure
does it make sense?

im not sure what you mean by define your own formats. could you give an example?
what i want to do is this:
if {label} is XYZ then copy into this/folder/structure/
and if {label} is anything else then use default/folder/structure
does it make sense?
Re: unpacking torrent to dir based on label with AMC script?
Do you know how the Format works? http://www.filebot.net/naming.html
Did you read Change how files will be organized section in the AMC docs? viewtopic.php?f=4&t=215
e.g.
etc... anything else could easily be based on the examples above 
Note that these examples are overly simplistic and that the amc script uses much more complicated formats by default.
Did you read Change how files will be organized section in the AMC docs? viewtopic.php?f=4&t=215
e.g.
Code: Select all
V:/{label}/{n}/Season {s}/{sxe} - {t}
Code: Select all
V:/{label =~ 'test' ? 'Test' : 'TV Shows'}/{n}/Season {s}/{sxe} - {t}

Note that these examples are overly simplistic and that the amc script uses much more complicated formats by default.

Re: unpacking torrent to dir based on label with AMC script?
yes i've read the "change how files will be organized" but I don't really understand it.
I don't want things with this label to be sorted or renamed. it should just be dumped in a subfolder with the torrents name in a folder I specify
if the label is different from what I've specified it should be processed as normal
I don't want things with this label to be sorted or renamed. it should just be dumped in a subfolder with the torrents name in a folder I specify
if the label is different from what I've specified it should be processed as normal
Re: unpacking torrent to dir based on label with AMC script?
In this case you wanna have a look at the --def ignore and --def unsorted options.
Re: unpacking torrent to dir based on label with AMC script?
I've looked at --def ignore but won't that just make AMC totally ignore whatever matches? and isn't the --def unsorted only for things that AMC don't recognize?
Maybe I can use the --def format anyway but as far as I have understood it will be applied to everything going through AMC and I don't want that. can it be set up so the format only will be applied to whatever torrent that have the specified label and everything else will be processed as normal?
EDIT:
I've looking info if --filter could be used but the examples i've found here is not that helpful.
Could something along the line of --filter "$LABEL = XYS copy to /alternative/file/path" be used?
Maybe I can use the --def format anyway but as far as I have understood it will be applied to everything going through AMC and I don't want that. can it be set up so the format only will be applied to whatever torrent that have the specified label and everything else will be processed as normal?
EDIT:
I've looking info if --filter could be used but the examples i've found here is not that helpful.
Could something along the line of --filter "$LABEL = XYS copy to /alternative/file/path" be used?
Re: unpacking torrent to dir based on label with AMC script?
1.
No, the --filter option does not do what you think/hope it does.
2.
As far as I can tell, what you want is: IF $LABEL = XYZ THEN ignore all files, right?
That is not supported, but if the LABEL happens to be in the file path, then you could use the ignore option to ignore the files that have that label in their path. If a file is ignored, it will not be recognized as anything, and as such it will be moved via the unsorted logic if enabled.
What you can't currently do is override the unsorted output format to your /alternative/file/path via cmdline options.
3.
If you somehow want to process files via episode/movie logic, but move files to different location as given by the label, then it's all in the format as explained earlier.
No, the --filter option does not do what you think/hope it does.
2.
As far as I can tell, what you want is: IF $LABEL = XYZ THEN ignore all files, right?
That is not supported, but if the LABEL happens to be in the file path, then you could use the ignore option to ignore the files that have that label in their path. If a file is ignored, it will not be recognized as anything, and as such it will be moved via the unsorted logic if enabled.
What you can't currently do is override the unsorted output format to your /alternative/file/path via cmdline options.
3.
If you somehow want to process files via episode/movie logic, but move files to different location as given by the label, then it's all in the format as explained earlier.
Re: unpacking torrent to dir based on label with AMC script?
right now i've set AMC up so it process everything and sort it into /Movies and /TV Shows. so far so good 
what i want to do is: IF $LABEL = XYZ then copy to /AnotherFolder ELSE do as normal and process into /Movies or /TV Shows depending on content
so no files is ignored but just processed differently depending on label. hope it makes sense

what i want to do is: IF $LABEL = XYZ then copy to /AnotherFolder ELSE do as normal and process into /Movies or /TV Shows depending on content
so no files is ignored but just processed differently depending on label. hope it makes sense
Re: unpacking torrent to dir based on label with AMC script?
So you do want to process these files as Episodes or Movies using the normal logic, except you want a slightly different output format? Then use your own format, and use label as a condition in your format the way you want it.
I've already provided an example above: viewtopic.php?f=8&t=2355#p13535
I've already provided an example above: viewtopic.php?f=8&t=2355#p13535
Re: unpacking torrent to dir based on label with AMC script?
the best thing would be if they wasn't processed at all but just unpacked and then copied to the folder of my choice. if thats not a possibility then its ok they're processed and renamed.
what i don't understand is how can i use format when it says in viewtopic.php?f=4&t=215
"This script uses multiple format expressions, so the simple --format option is not supported"
because i want to use AMC to process the files except the ones with $LABEL = XYZ or alternative AMC should also process the files with $LABEL = XYZ but place them in a different output folder
the call i make to filebot from rtorrent looks like this
could I just add
to that string and then everything with LABEL XYZ is processed into folder /home/AlternativeFolder/ and everything without label =XYZ is processed into /home/Movies or /home/TV Shows
what i don't understand is how can i use format when it says in viewtopic.php?f=4&t=215
"This script uses multiple format expressions, so the simple --format option is not supported"
because i want to use AMC to process the files except the ones with $LABEL = XYZ or alternative AMC should also process the files with $LABEL = XYZ but place them in a different output folder
the call i make to filebot from rtorrent looks like this
Code: Select all
filebot -script fn:amc --output "/home/" --log-file amc.log --action copy --conflict auto -non-strict --def subtitles=da,en --def clean=y --def artwork=y --def excludeList=amc-input.txt "ut_dir=$TORRENT_PATH" "ut_kind=multi" "ut_title=$TORRENT_NAME" "ut_label=$TORRENT_LABEL"
Code: Select all
--format {$TORRENT_LABEL =~ 'XYZ' : AlternativeFolder/{n} ({y})/{n} ({y}){' CD'+pi}{'.'+lang}
Re: unpacking torrent to dir based on label with AMC script?
Here's what you want:
As for the format. Yes, it starts with...
Your "could I just add" is wrong on so many levels I don't even know where to start.
While testing and trying to make things work I really really hope you're prototyping things on the cmdline manually, and not via your torrent client.
Automation is nice, but I recommend using the amc script as-is or switching to the GUI.
Here's how to do it:Im using filebot with the AMC script and rtorrent its working perfect but I would like filebot to unpack to dirs defined by me based on the torrent label and if I havent defined any dir for the label it should default back to the standard dir
As far as I can tell, what you want is: IF $LABEL = XYZ THEN ignore all files, right?
That is not supported, but if the LABEL happens to be in the file path, then you could use the ignore option to ignore the files that have that label in their path. If a file is ignored, it will not be recognized as anything, and as such it will be moved via the unsorted logic if enabled.
What you can't currently do is override the unsorted output format to your /alternative/file/path via cmdline options.
As for the format. Yes, it starts with...
It then goes on...This script uses multiple format expressions, so the simple --format option is not supported.
Also you clearly have no idea how argument parsing works => viewtopic.php?f=4&t=1899Instead can override the default naming schemes via --def seriesFormat, animeFormat or movieFormat.
Your "could I just add" is wrong on so many levels I don't even know where to start.

While testing and trying to make things work I really really hope you're prototyping things on the cmdline manually, and not via your torrent client.

Re: unpacking torrent to dir based on label with AMC script?
As I said I've read the about the format but never really understood it. The same goes for argument parsing. Thats why I'm asking for help.
I had hoped this would be a simple task since AMC and filebot have so many options and the files I want separated into its own folder is easily identified via the label
and for this line
As far as I understand it, it applies to everything processed by AMC and not only specific things while the rest would be processed with default settings as I want it. Am I wrong?
I think that maybe I can use the ignore along with the unsorted logic and then just accept that I can't control where it is moved to.
I had just understood that the --ignore would make whatever mentioned here completely ignored by filebot/AMC but after I've read your explanation again it seems that its not the case. It will still be unpacked and copied to the unsorted folder if --def unsorted=y is set. Correct?
I had hoped this would be a simple task since AMC and filebot have so many options and the files I want separated into its own folder is easily identified via the label
and for this line
Code: Select all
Instead can override the default naming schemes via --def seriesFormat, animeFormat or movieFormat.
I think that maybe I can use the ignore along with the unsorted logic and then just accept that I can't control where it is moved to.
I had just understood that the --ignore would make whatever mentioned here completely ignored by filebot/AMC but after I've read your explanation again it seems that its not the case. It will still be unpacked and copied to the unsorted folder if --def unsorted=y is set. Correct?
Re: unpacking torrent to dir based on label with AMC script?
Yes, ignore just means files are ignored for normal processing, and with unsorted enabled anything that falls through normal processing will be handled anyway and moved to a folder called "Unsorted" while keeping the original filename.
Using the unsorted logic would most certainly be the easiest way to do it. Just need to make sure you torrent client creates a folder for each label and then downloads the files to there.
Using the unsorted logic would most certainly be the easiest way to do it. Just need to make sure you torrent client creates a folder for each label and then downloads the files to there.
Re: unpacking torrent to dir based on label with AMC script?
Ok I've played around with the ignore function at its partially working as i want
I've downloaded the AMC script and is running it locally so I can control where the ignored files should be placed however I would like to have every ignored file placed into its own subfolder with the name of the torrent. This way it would be easier for me to see what everything ignored is, as the filenames alone often don't give any clue
I've fried to put different format arguments into the AMC script where the ignore path is created but haven't got much luck in getting it to work. eg will {n} in the path not work and im guessing its because the files are ignored so the name is never found.
Then I tried to inset {file} into the path and it worked but I'm getting the full path to the file so I tried to add the after function like this {file.after(XYZ)} but that didn't work either :/
So is there a way where i can get only the name of the parent folder of the original file and put it into the path so the output would be like this:
/unsorted/{original.file.perantfolder}/{fn}.{ext}
I've downloaded the AMC script and is running it locally so I can control where the ignored files should be placed however I would like to have every ignored file placed into its own subfolder with the name of the torrent. This way it would be easier for me to see what everything ignored is, as the filenames alone often don't give any clue
I've fried to put different format arguments into the AMC script where the ignore path is created but haven't got much luck in getting it to work. eg will {n} in the path not work and im guessing its because the files are ignored so the name is never found.
Then I tried to inset {file} into the path and it worked but I'm getting the full path to the file so I tried to add the after function like this {file.after(XYZ)} but that didn't work either :/
So is there a way where i can get only the name of the parent folder of the original file and put it into the path so the output would be like this:
/unsorted/{original.file.perantfolder}/{fn}.{ext}
Re: unpacking torrent to dir based on label with AMC script?
This will do:
Code: Select all
Unsorted/{folder.name}/{file.name}