Page 1 of 1
process files from a certain torrentsite to its own folder?
Posted: 13 Aug 2014, 10:07
by beltoft
is it possible to get filebot to process files downloaded from 1 torrent site/tracker to get unpacked into its own folder disregarding if filebot recognize the file or not?
Right now I'm using the AMC script for my movie and series and its working perfect but when I download porn I want it to get unpacked into its own folder and not into the movies folder.
is this possible?
as of now I have just set AMC to ignore XXX altogether and then I'm unpacking it manually but it would be nicer if filebot could do it.
Re: process files from a certain torrentsite to its own fold
Posted: 13 Aug 2014, 11:28
by rednoah
You'll have to pass in custom formats, and branch one kind into one folder based on some kind of condition, and another kind in another folder. That condition could be the file location, or a label, or anything you can check in the format.
In any case, I'm not sure if XXX would even work at all. Not sure if TheMovieDB has lots of data on those, and if that information is available at all if fetching data as anonymous user.
Re: process files from a certain torrentsite to its own fold
Posted: 15 Aug 2014, 08:51
by beltoft
I don't really care if filebot could get any data for those file - all im interested in is that they get unpacked to the right folder based on that label.
How would i go about doing this? Is there a way to put "If label = {trackername} then unpack to {this/folder}" into the AMC
could i call it from the postprocess script that activates AMC?
Re: process files from a certain torrentsite to its own fold
Posted: 15 Aug 2014, 11:06
by rednoah
You can try this but it's probably not exactly what you're looking for:
--def unsorted=y Process files that cannot be sorted out and move them to a separate folder
Other than that you can always do your own processing before you call filebot.
Re: process files from a certain torrentsite to its own fold
Posted: 15 Aug 2014, 11:32
by beltoft
rednoah wrote:
Other than that you can always do your own processing before you call filebot.
I have no idea on how to do it. could you point me in the right direction?
should I call filebot with some other parameters before I call it with the AMC script?
Re: process files from a certain torrentsite to its own fold
Posted: 15 Aug 2014, 13:47
by rednoah
No, you'd have to write your own shell script.
Re: process files from a certain torrentsite to its own folder?
Posted: 23 Dec 2016, 15:20
by JamesBlond007
Hey,
did you find a way to do that? I think I'm near to the Solution but it gave me every time an error in the filename:
Code: Select all
movieFormat={fn =~ /3D/ ? 'Filme 3D' : fn =~ /XXX/ ? 'XXX' : 'Filme'}/{fn =~ /XXX/ ? {file} : {n}+' ('+{y}+')'}{fn =~ /3D/ ? ' [3D] [H-SBS]' : ''}/{fn =~ /XXX/ ? {fn} : {n}+' ('+{y}+')'}{fn =~ /3D/ ? ' H-SBS' : ''}
The Problem is only the {fn} and probably the {file}-Tag but i can live without that. if it only moves the files in that XXX folder and let the orginial file name.
Is everyone having a Solution for this? Tried with fn.ascii() Cause maybe it has a problem with letters, renamed the title manually, ect.
I thought maybe i can only ignore it and then move all ignored to that folder, but didn't find a way to move ignored files/folder
Re: process files from a certain torrentsite to its own folder?
Posted: 23 Dec 2016, 17:44
by rednoah
Use the Format Editor to prototype your format before you copy & paste it into the command-line. You'll get immediate feedback so you can figure out how the format works.
@see
viewtopic.php?f=5&t=1895
Re: process files from a certain torrentsite to its own folder?
Posted: 29 Dec 2016, 17:24
by JamesBlond007
Hey rednoah,
that helped me a lot. But i've still one problem.
i want to extract the last sequence from the filepath.
I saw the .after(pattern) tag and tried but it wont work. I tried
file.after(/) and ("/") and ('/') also (/*/) but nothing. One side it only puts file into unsorted and one side it named it '.mp4'
Also the Groovy Documentation didn't give me an answer. I think it's very easy but i don't have any idea.
Re: process files from a certain torrentsite to its own folder?
Posted: 29 Dec 2016, 17:36
by rednoah
Do you mean
fn (filename binding) or
f.name?
Re: process files from a certain torrentsite to its own folder?
Posted: 29 Dec 2016, 17:48
by JamesBlond007
I mean the last folder seqence in the path....from the
file - file object - <file path>
/media/harddrive135903/Downloads/Input/Foldertitle/Filetitle.mp4
I want the /Foldertitle/Filetitle.mp4. So the Filetitle do i get with {fn} but the problem is the last folder.
Re: process files from a certain torrentsite to its own folder?
Posted: 29 Dec 2016, 18:09
by rednoah
That would be folder.name or file.parentFile.name then.
FYI: The default unsorted format is Unsorted/{file.structurePathTail} which is more or less the same as Unsorted/{folder.name}/{fn} (depending on the current file and folder structure).