POSTBUCKET - where random posts in unrelated topics go
Re: How about sharing our format expressions?
{s00e00.lower()} 
Re: Fully Automated Media Center
Is there a way to override the "format" expressions in the "utorrent-postprocess" function to specify my own preferences for the filepaths? I mean that I'd rather not put my TV shows and movies into separate subdirectories, and I like the {n}.{s00e00}.{t} episode filename format better than the default with the spaces and the hyphens.
I tried creating my own version of utorrent-postprocess.groovy, with the following changes, and referencing it locally, but my files just got un-rar-ed, no renaming or moving happened.
I tried creating my own version of utorrent-postprocess.groovy, with the following changes, and referencing it locally, but my files just got un-rar-ed, no renaming or moving happened.
Code: Select all
def format = [
tvs: '''{n}{episode.special ? " - Special" : " - Season "+s.pad(2)}/{n}.{episode.special ? "S00E"+special.pad(2) : s00e00}.{t}''',
anime: '''Anime/{n}/{n} - {sxe} - {t}''',
mov: '''{n} ({y})/{n} [{y}]{" CD$pi"}{".$lang"}'''
]Re: Fully Automated Media Center
What's the error output? Did you forget to copy lib/*.groovy? It'll need that for artwork/email/etc
Re: Fully Automated Media Center
Ah, yes, that did it. Once I downloaded the /lib/*.groovy files, my homebrew version of utorrent-postprocess.groovy worked great. Thanks for the info and for this great program. FileBot with these customizations should save me tons of time versus my old workflow!
-
ohadbenita
- Posts: 9
- Joined: 26 Nov 2012, 07:38
Re: How about sharing your CLI scripts?
filebot -script fn:revert path/to/files --action rename doesn't work:
C:\Users\HTPC>filebot -script fn:revert "a:/tv shows/homeland/" --action rename
IllegalArgumentException: Illegal rename action: rename
java.lang.IllegalArgumentException: Illegal rename action: rename
at net.sourceforge.filebot.StandardRenameAction.forName(Unknown Source)
at net.sourceforge.filebot.StandardRenameAction$forName.call(Unknown Sou
rce)
at Script3.revert(Script3.groovy:9)
at Script3$_run_closure1.doCall(Script3.groovy:18)
at Script3.run(Script3.groovy:16)
at net.sourceforge.filebot.cli.ScriptShell.evaluate(Unknown Source)
at net.sourceforge.filebot.cli.ScriptShell.runScript(Unknown Source)
at net.sourceforge.filebot.cli.ArgumentProcessor.process(Unknown Source)
at net.sourceforge.filebot.Main.main(Unknown Source)
Failure (░_░)
C:\Users\HTPC>filebot -script fn:revert "a:/tv shows/homeland/" --action rename
IllegalArgumentException: Illegal rename action: rename
java.lang.IllegalArgumentException: Illegal rename action: rename
at net.sourceforge.filebot.StandardRenameAction.forName(Unknown Source)
at net.sourceforge.filebot.StandardRenameAction$forName.call(Unknown Sou
rce)
at Script3.revert(Script3.groovy:9)
at Script3$_run_closure1.doCall(Script3.groovy:18)
at Script3.run(Script3.groovy:16)
at net.sourceforge.filebot.cli.ScriptShell.evaluate(Unknown Source)
at net.sourceforge.filebot.cli.ScriptShell.runScript(Unknown Source)
at net.sourceforge.filebot.cli.ArgumentProcessor.process(Unknown Source)
at net.sourceforge.filebot.Main.main(Unknown Source)
Failure (░_░)
Re: How about sharing your CLI scripts?
Sorry, you'll need to grab the latest build or wait for the next release if you really need --action rename.
Re: Fully Automated Media Center
Great script!
2 quick questions -
Is there a way to include the style of file name format desired in the command line? I've modified the GUI usage to output the files in the format I want but the command line output doesn't seem to match the format I was hoping for.
While artwork=yes seems to get all the nfo and other pieces for the Show in question it doesn't appear to get an nfo for the specific Episode being worked on. Am I missing something there?
Thanks again for the great script!
2 quick questions -
Is there a way to include the style of file name format desired in the command line? I've modified the GUI usage to output the files in the format I want but the command line output doesn't seem to match the format I was hoping for.
While artwork=yes seems to get all the nfo and other pieces for the Show in question it doesn't appear to get an nfo for the specific Episode being worked on. Am I missing something there?
Thanks again for the great script!
Re: Fully Automated Media Center
1. Cmdline is configured via cmdline options only, it does not magically use random GUI settings (albeit easy to add, that'd be very unclean).
2. Added support for overriding the default naming formats via --def:
--def "seriesFormat=TV/…"
--def "animeFormat=Anime/…"
--def "movieFormat=Movies/…"
Not gonna advertise that much since people are just gonna mess up the cmdline arguments with unescaped quotes. If you don't understand how arguments are parsed in your shell you will probably run into problems if you use single/double quotes, ampersands, etc in your format.
3. Episode Nfos are pretty much useless and with well-named files any HTPC software can grab that info easily anyway.
2. Added support for overriding the default naming formats via --def:
--def "seriesFormat=TV/…"
--def "animeFormat=Anime/…"
--def "movieFormat=Movies/…"
Not gonna advertise that much since people are just gonna mess up the cmdline arguments with unescaped quotes. If you don't understand how arguments are parsed in your shell you will probably run into problems if you use single/double quotes, ampersands, etc in your format.
3. Episode Nfos are pretty much useless and with well-named files any HTPC software can grab that info easily anyway.
-
verysofttoiletpaper
- Posts: 141
- Joined: 05 Jul 2012, 09:44
Re: Fully Automated Media Center
Hi!
I was just expanding the functionality of the deluge adaptor, and just realised symlinks don't work.
Why does filebot need to run as with root privileges in order to create symlinks?
Cheers!
I was just expanding the functionality of the deluge adaptor, and just realised symlinks don't work.
Why does filebot need to run as with root privileges in order to create symlinks?
Cheers!
-
verysofttoiletpaper
- Posts: 141
- Joined: 05 Jul 2012, 09:44
Re: Fully Automated Media Center
Actually, I was wrong.
It is failing even running it with sudo.
I get "Exception: Unsupported Operation: createSymbolicLink"
Any idea why?
It is failing even running it with sudo.
I get "Exception: Unsupported Operation: createSymbolicLink"
Any idea why?
Re: Fully Automated Media Center
On Windows it needs to be admin. Linux should work fine as normal users. You'll need Java 7 though.
-
verysofttoiletpaper
- Posts: 141
- Joined: 05 Jul 2012, 09:44
Re: Fully Automated Media Center
Yes, installing Java 7 from oracle fixed the problem thanks 
-
verysofttoiletpaper
- Posts: 141
- Joined: 05 Jul 2012, 09:44
Re: Fully Automated Media Center
Would be useful to have a script option to disable archive extraction..
Cheers and good work!
Cheers and good work!
Re: Fully Automated Media Center
Why would that be useful? Right now it'll only extract archives that contain video files.
-
verysofttoiletpaper
- Posts: 141
- Joined: 05 Jul 2012, 09:44
Re: Fully Automated Media Center
Oh.. in that case..
I thought it was extracting all files first
Thanks
I thought it was extracting all files first
Thanks
-
verysofttoiletpaper
- Posts: 141
- Joined: 05 Jul 2012, 09:44
Re: Fully Automated Media Center
By the way, Plex integration doesn't seem to be working, maybe due to a new version...
http://$server:$port/plex doesn't seem to contain any useful information anymore: http://hastebin.com/cafivirihi.xml
On the other hand, http://miner:32400/library/sections/ seems to have all the needed information: http://hastebin.com/pifugopihe.xml
Can you make it work again?
http://$server:$port/plex doesn't seem to contain any useful information anymore: http://hastebin.com/cafivirihi.xml
On the other hand, http://miner:32400/library/sections/ seems to have all the needed information: http://hastebin.com/pifugopihe.xml
Can you make it work again?
Re: Fully Automated Media Center
Does the rescan request still work like this?
http://$server:$port/library/sections/$key/refresh/
http://$server:$port/library/sections/$key/refresh/
-
cheesemaker
- Posts: 49
- Joined: 03 Sep 2012, 10:52
Re: Fully Automated Media Center
Yes, http://$server:$port/library/sections/all/refresh, worked for me.
http://wiki.plexapp.com/index.php/PlexN ... g_Sections
http://wiki.plexapp.com/index.php/PlexN ... g_Sections
Re: Fully Automated Media Center
Updated it the way you suggested. Should take effect by tomorrow.
Re: Fetch Artwork and Nfo for Movies
Hello, thanks for the great program. It's really helped me begin the quest to get organized!rednoah wrote:Description:Usage:
- Download artwork for all your Movies from TheMovieDB. Fetch Movie nfo and all kinds of artwork and save files according to XBMC standards.
- Disable GUI tv series confirmation dialogs via -non-strict option (on headless machines this is the default).
Options:Code: Select all
filebot -script fn:artwork.tmdb /path/to/movies/
--conflict override to fetch artwork from scratch (not just missing artwork)
-non-strict to disable user-interaction and run headless
Notes:
* Movies are expected to be organized into folders. The movie is determined using the name of the parent folder of each video file.
Download Script:
http://filebot.sf.net/scripts/artwork.tmdb.groovy
I have got this script working from the command line but it returns 'Movie Not Found' for each movie in the folder.
I have all movies in their own folder as suggested, but the folder names have the format:
{n} [{y},{director}][{source}]
As a test, I changed the folder for the first film to {n} [{y}] and this worked.
How could I modify the script to be able to pick up the movie name correctly?
Or would it be better to just use the {n} [{y}] naming convention?
Much appreciated
Bee
-
danielsokolowski
- Posts: 9
- Joined: 03 Jan 2013, 01:55
Re: [MANUAL] Configure OpenSubtitles and Sublight login
Sublight now allows free API keys again: http://www.sublight.si/RegisterClient.aspx. This is the wrong thread for this but why aren't there any GUI options for all these 'filebot -script fn:<commands>' ? As a new user I find it intimidating.
Re: [MANUAL] Configure OpenSubtitles and Sublight login
Well, one thing is that many people use FileBot without any GUI so this works for everybody.
More importantly if your run -script fn:configure it'll download the script and since API client/keys are hard-coded (currently FileBot identifies itself as SublightCmd) in the script I can easily auto-update these settings without a new release.
More importantly if your run -script fn:configure it'll download the script and since API client/keys are hard-coded (currently FileBot identifies itself as SublightCmd) in the script I can easily auto-update these settings without a new release.
-
beeblebrox42
- Posts: 3
- Joined: 05 Jan 2013, 19:52
Re: Fully Automated Media Center
I'm not integrating with utorrent, but this script via cli mode almost does everything I need it to, so thanks!
However I can't figure out how to get the hardlink action to work which I really need. The output claims it is a hardlink rename but it only creates the directories and not the file link. The docs say utorrent must be ran as 'admin', so I am guessing I must run filebot as root? In my script I sudo run filebot but that didn't resolve the issue. I'm a bit stuck and looking for help.
I'm running on a 64bit linux distribution.
Thanks,
James
However I can't figure out how to get the hardlink action to work which I really need. The output claims it is a hardlink rename but it only creates the directories and not the file link. The docs say utorrent must be ran as 'admin', so I am guessing I must run filebot as root? In my script I sudo run filebot but that didn't resolve the issue. I'm a bit stuck and looking for help.
I'm running on a 64bit linux distribution.
Thanks,
James
Re: Fully Automated Media Center
What's the cmdline output? If you're using --action hardlink it'll do that or print errors if it doesn't work. Make sure you're using Java 7, on linux you don't need to be root to create hardlinks.
-
beeblebrox42
- Posts: 3
- Joined: 05 Jan 2013, 19:52
Re: Fully Automated Media Center
Thanks for the rapid response. I knew hardlinks in linux normally didn't require root, thought it was a java limitation.rednoah wrote:What's the cmdline output? If you're using --action hardlink it'll do that or print errors if it doesn't work. Make sure you're using Java 7, on linux you don't need to be root to create hardlinks.
If hardlinking requires Java 7 that might be the issue. I am using OpenJDK 1.6.0_24. I'll try to see if can upgrade to 1.7 and report back.
Code: Select all
FileBot 3.2 (r1372)
JNA Native: 3.5.0
MediaInfo: MediaInfoLib - v0.7.61
7-Zip-JBinding: OK
Extended Attributes: java.lang.NoClassDefFoundError: Ljava/nio/file/attribute/BasicFileAttributeView;
GVFS: OK
OpenJDK Runtime Environment 1.6.0_24 (headless)
64-bit OpenJDK 64-Bit Server VM
Linux (amd64)
Code: Select all
[HARDLINK] Rename [/mnt/torrents/finished/NCIS.S10E01.HDTV.x264-LOL/ncis.1001.hdtv-lol/NCIS.S10E01.HDTV.x264-LOL.mp4] to [/mnt/torrents/organized/TV Shows/NCIS/Season 10/NCIS - S10E01 - Extreme Prejudice.mp4]
-
beeblebrox42
- Posts: 3
- Joined: 05 Jan 2013, 19:52
Re: Fully Automated Media Center
Switching to OpenJDK 1.7 fixed the issue, thanks again.
Re: Fully Automated Media Center
Hey Folks,
Brand new Nubie here I've been thinking about automating my xbmc setup for downloading and I'm absolutely blown away by what this script says it does.
Great work!
My question is probably stupid, where do I put this actual script file? I know you have steps entering it into uTorrent etc but what about other steps like saving the script somewhere?
thanks
Brand new Nubie here I've been thinking about automating my xbmc setup for downloading and I'm absolutely blown away by what this script says it does.
Great work!
My question is probably stupid, where do I put this actual script file? I know you have steps entering it into uTorrent etc but what about other steps like saving the script somewhere?
thanks
Re: Fully Automated Media Center
You don't have to do anything. Just copy and paste the cmd and it'll work out of the box.
The -script fn:name argument means that FileBot will automatically grab the script from my online repository (it'll also auto-update every day).
The -script fn:name argument means that FileBot will automatically grab the script from my online repository (it'll also auto-update every day).
Re: Fully Automated Media Center
Wow,
That's really great stuff thank you for this great piece of work.
I'll test it out tonight and see how it gets on... Watch this space for more dunce questions
Great work,
That's really great stuff thank you for this great piece of work.
I'll test it out tonight and see how it gets on... Watch this space for more dunce questions
Great work,
Re: Fully Automated Media Center
This seems really tits..
Im wondering how i can set my output to different disks?
eg my tv is on C: and movies is on E:
Im wondering how i can set my output to different disks?
eg my tv is on C: and movies is on E:
Re: Fully Automated Media Center
Override the format expression => @see Customize Paths
Re: Fully Automated Media Center
Ok, sorry for the noobiness.
So, id set for example --output /my/tv/dir
and something like: --def "movieFormat="E:movies"/{n} {y}/{fn}"
So, id set for example --output /my/tv/dir
and something like: --def "movieFormat="E:movies"/{n} {y}/{fn}"
Re: Fully Automated Media Center
Reading this thread should answer all your questions:
http://filebot.sourceforge.net/forums/v ... ?f=8&t=429
http://filebot.sourceforge.net/forums/v ... ?f=8&t=429
-
SyAccursed
- Posts: 1
- Joined: 30 Jan 2013, 19:12
Forcing Show Names via CSV file
Quite new to this tool but it is rather awesome so I thought I'd share this after working it out!
It's kind of an 'everyman' code to move and rename files into a fairly simplistic format.
Having shared this with my brother (on mac) we hit some issues with it (to do with file paths and such) and it needs to be done like this to work (basically just exact past no ~ shortcuts and swapped \ for / in the file path.
What it does is:
1) Move files into:
2) Has an inbuilt force show name directed at
E:/Videos/names.csv
Using the format of:
This also proves handy for forcing extra folders in example:
Avatar: The Last Air Bender;Avatar/The Last Air Bender
The Legend of Korra;Avatar/The Legend of Korra
Causes these two shows to be neatly organised into E:/Videos/Avatar/Show Name/Season/Episode
3) Inbuilt multi-part episode handle that outputs format of
4) Replaces part numbers on episodes with (Part 0)
5) If a special episode is included it is placed within its related Season and formatted as Special 00 - Title
6) General house-keeping. Capitalises first initials for all words on show title and episode titles + knocks out ? . and : from titles (probably could do with a few more knockced out but I just add in illegals as I find em)
It's kind of an 'everyman' code to move and rename files into a fairly simplistic format.
Code: Select all
E:\Videos\{def a; new File('E:/Videos/names.csv').splitEachLine(';'){ if (n == it[0]) a = it[1]}; a ?: n.upperInitial().replaceTrailingBrackets()}\Season {s.pad(2)}\{es*.pad(2).join(' & ').replaceAll('null',{episode.special ? 'Special '+special.pad(2):''})} - {t.upperInitial().replaceAll(/[?.:]/).replacePart(' (Part $1)')}Code: Select all
/Users/Symon/Television/{def a; new File('/Users/Symon/Television/names.csv').splitEachLine(';'){ if (n == it[0]) a = it[1]}; a ?: n.upperInitial().replaceTrailingBrackets()}/Season {s.pad(2)}/{es*.pad(2).join(' & ').replaceAll('null',{episode.special ? 'Special '+special.pad(2):''})} - {t.upperInitial().replaceAll(/[?.:]/).replacePart(' (Part $1)')}1) Move files into:
Code: Select all
E:/Videos/Show Name/Season 00/00 - TitleE:/Videos/names.csv
Using the format of:
Code: Select all
Actual Show Name;Show name you wantAvatar: The Last Air Bender;Avatar/The Last Air Bender
The Legend of Korra;Avatar/The Legend of Korra
Causes these two shows to be neatly organised into E:/Videos/Avatar/Show Name/Season/Episode
3) Inbuilt multi-part episode handle that outputs format of
Code: Select all
01 & 02 - Title5) If a special episode is included it is placed within its related Season and formatted as Special 00 - Title
6) General house-keeping. Capitalises first initials for all words on show title and episode titles + knocks out ? . and : from titles (probably could do with a few more knockced out but I just add in illegals as I find em)
Re: [SNIPPET] Put the "The" at the end
Thank you for this rednoah, much appreciated. I was just wondering if its possible to reverse this process for the input file? (I don't have much knowledge in this areas, if my last sentence didn't make it obvious). But if I run filebot in command prompt on "Avengers, The" is it possible to make it "The Avengers" before it tries to look up the film... I hope that made sense...
Any help would be greatly appreciated
Any help would be greatly appreciated
Re: [SNIPPET] Put the "The" at the end
Yes, but only with your own customised scripting. The cmdline allows you to force the query.
Though for the sake of simplicity I suggest you:
* make sure to add .nfo files with imdbid (can be generated by the artwork.* scripts).
OR
* include {imdbid} in the filename
OR
* if you renamed it before with FileBot and have "ExtendedAttributes" enabled it'll already know everything because it can read all metadata from filesystem attributes. (This is only enabled on Windows when installed via .msi and running with Java 7).
Though for the sake of simplicity I suggest you:
* make sure to add .nfo files with imdbid (can be generated by the artwork.* scripts).
OR
* include {imdbid} in the filename
OR
* if you renamed it before with FileBot and have "ExtendedAttributes" enabled it'll already know everything because it can read all metadata from filesystem attributes. (This is only enabled on Windows when installed via .msi and running with Java 7).
Re: Fully Automated Media Center
How would I find this? I read through the api page for serviio but have no clue on how to combine it.rednoah wrote:What's not working with serviio? Just initiating a rescan is plex/xbmc specific. If you find out how to do that with serviio I can add that.
Re: POSTBUCKET - where random posts in unrelated topics go
Whats it say? Send http requests?
Re: [GUIDE] Fully Automated Media Center with Transmission (
Hi!
Thanks for all that, I've been waiting a long time for a guide on how to use it with transmission!
I carefully followed the steps above, but when a download ends, nothing happens.
Is there any pre-requisite before doing any of this ?
About the part in the nano editor, I have two questions:
is this part in the code "output "Path/to/folder" supposed to be replaced by something ?
secondly it may be irrelevant but when I copy and paste that part, the first time i do it, only the first and third line are copied, I have to paste it a second time so that the second line appears, is that a normal behavior?
Once again thanks for working on that!
Thanks for all that, I've been waiting a long time for a guide on how to use it with transmission!
I carefully followed the steps above, but when a download ends, nothing happens.
Is there any pre-requisite before doing any of this ?
About the part in the nano editor, I have two questions:
is this part in the code "output "Path/to/folder" supposed to be replaced by something ?
secondly it may be irrelevant but when I copy and paste that part, the first time i do it, only the first and third line are copied, I have to paste it a second time so that the second line appears, is that a normal behavior?
Once again thanks for working on that!
Re: [GUIDE] Fully Automated Media Center with Transmission (
You can also use your favourite text editor to edit the script. It's just text.
Of course you'll need to replace this part and specify where the files will go:
Of course you'll need to replace this part and specify where the files will go:
Code: Select all
--output "path/to/folder"Re: [GUIDE] Fully Automated Media Center with Transmission (
Thanks I got it to work!
For the record I installed Java, and changed the output path.
The only thing is it doesn't fetch the subtitles, which makes sense as I don't see "subtitles=en " as i see on the utorrent version.
Now my question is does all the options of the utorrent version works with this version ?
Sorry about these questions I'm a real noob, hopefully I'm not the only one and this might help others...
For the record I installed Java, and changed the output path.
The only thing is it doesn't fetch the subtitles, which makes sense as I don't see "subtitles=en " as i see on the utorrent version.
Now my question is does all the options of the utorrent version works with this version ?
If so do I just have to copy and paste the parts I want?Options:
--def music=n Don't process music files
--def subtitles=en,de,fr Download subtitles for the given languages
--def artwork=n Don't fetch artwork/nfo
--def backdrops=y Fetch all available backdrops (not just one as with artwork=y)
--def xbmc=hostname Tell the given XBMC instance to rescan it's library
--def plex=hostname Tell the given Plex instance to rescan it's library
--def myepisodes=username:password Use the following MyEpisodes account to mark episodes as 'acquired'
--def pushover=userkey Send update notifications to your devices via Pushover
--def gmail=username:password Use the following gmail account to send and recieve reports
--def mailto=email Send report to the given email address (optional, email to yourself if not set)
--def ignore=regex Ignore filepaths that match the given regular expression
--def clean=y Automatically empty folders and clutter files that may be left behind after moving the video files or temporary extracted files after copying
Sorry about these questions I'm a real noob, hopefully I'm not the only one and this might help others...
Re: [GUIDE] Fully Automated Media Center with Transmission (
Yes, you can just append options to the cmdline above and it'll work:
The startup script is just glue logic between transmission and filebot. Also it's were you can set additional options for filebot and the amc script. The amc script itself is always the same, called via utorrent, transmission, or just directly from cmdline.
Code: Select all
--def subtitles=enRe: [GUIDE] Fully Automated Media Center with Transmission (
Thanks ! it works! and it's pretty awesome.
Re: [GUIDE] Fully Automated Media Center with Transmission (
I suppose I should have added that to the guide, but I couldn't remember if Java came with the bundle. Another thought, did you have to do anything special with your filebot install?Maxbn wrote:Thanks I got it to work!
For the record I installed Java, and changed the output path.
The only thing is it doesn't fetch the subtitles, which makes sense as I don't see "subtitles=en " as i see on the utorrent version.
Now my question is does all the options of the utorrent version works with this version ?If so do I just have to copy and paste the parts I want?Options:
--def music=n Don't process music files
--def subtitles=en,de,fr Download subtitles for the given languages
--def artwork=n Don't fetch artwork/nfo
--def backdrops=y Fetch all available backdrops (not just one as with artwork=y)
--def xbmc=hostname Tell the given XBMC instance to rescan it's library
--def plex=hostname Tell the given Plex instance to rescan it's library
--def myepisodes=username:password Use the following MyEpisodes account to mark episodes as 'acquired'
--def pushover=userkey Send update notifications to your devices via Pushover
--def gmail=username:password Use the following gmail account to send and recieve reports
--def mailto=email Send report to the given email address (optional, email to yourself if not set)
--def ignore=regex Ignore filepaths that match the given regular expression
--def clean=y Automatically empty folders and clutter files that may be left behind after moving the video files or temporary extracted files after copying
Sorry about these questions I'm a real noob, hopefully I'm not the only one and this might help others...
Re: [GUIDE] Fully Automated Media Center with Transmission (
Not that I can remember, I just downloaded the bundle, and installed the app without doing anything.
[FAQ] How can I change the filename?
The format engine allows you to fully automatically make any kind of change to show names and episode titles via Groovy expressions.
Q: Some episodes start with '...Name' - Is it possible to ignore the dots when renaming?
A: Sure, just use after(regex) function.
Q: Some episodes start with '...Name' - Is it possible to ignore the dots when renaming?
A: Sure, just use after(regex) function.
Code: Select all
{t.after(/^[.]+/)}Re: How about sharing our format expressions?
This is the format that I use for YAMJ (and should work well with any other media center)
All my movies are staged into a directory that I rename from and check before moving to my main movie folder.
"..\" moves the movie from it's staging directory to a correctly named folder
Renames the folder to be "name, the (year)" for better sorting
Renames the file to be "the name (year).format.resolution.[cd#]"
Code: Select all
..\{n.replaceFirst(/^(?i)(The|A)\s(.+)/, /$2, $1/)} {'('+y+')'}\{n} {'('+y+')'}{'.'+source}{'.'+vf}{".[CD$pi]"}{fn.match(/[.]fanart|[.]mkv/)}
"..\" moves the movie from it's staging directory to a correctly named folder
Code: Select all
{n.replaceFirst(/^(?i)(The|A)\s(.+)/, /$2, $1/)} {'('+y+')'}\
Code: Select all
{n} {'('+y+')'}{'.'+source}{'.'+vf}{".[CD$pi]"}{fn.match(/[.]fanart|[.]mkv/)}
Re: [MANUAL] Configure OpenSubtitles and Sublight login
How can I manually modify the preferences file in linux? I'm trying to login into opensubtitles only (I don't have a sublight account) and when I'm running filebot -script fn:configure.login, This is what I get:
and the files in ~/.java/.userPrefs are empty. I'm running Filebot on Ubuntu.
Code: Select all
Testing OpenSubtitles... OK
Testing Sublight... WebServiceException: Response indicates error: You must log in first.
javax.xml.ws.WebServiceException: Response indicates error: You must log in first.
at net.sourceforge.filebot.web.SublightSubtitleClient.checkError(Unknown Source)
at net.sourceforge.filebot.web.SublightSubtitleClient.getSubtitleList(Unknown Source)
at net.sourceforge.filebot.web.SublightSubtitleClient$getSubtitleList.call(Unknown Source)
at Script3.run(Script3.groovy:36)
at net.sourceforge.filebot.cli.ScriptShell.evaluate(Unknown Source)
at net.sourceforge.filebot.cli.ScriptShell.runScript(Unknown Source)
at net.sourceforge.filebot.cli.ArgumentProcessor.process(Unknown Source)
at net.sourceforge.filebot.Main.main(Unknown Source)
Failure (°_°)
Re: [MANUAL] Configure OpenSubtitles and Sublight login
Updated the configure.login script so you can set/unset osdb or sublight.
Re: [MANUAL] Configure OpenSubtitles and Sublight login
Still the same.
Can you please post the contents of a sample Pref file? I can manually edit the files in ~/.java/.userPref for open subtitles login data, can't I?
Can you please post the contents of a sample Pref file? I can manually edit the files in ~/.java/.userPref for open subtitles login data, can't I?
Re: [MANUAL] Configure OpenSubtitles and Sublight login
Make sure you get my updates immediately:
Code: Select all
filebot -clear-cache -script fn:configure.loginRe: [MANUAL] Configure OpenSubtitles and Sublight login
Ok so now it seems to work fine:
But still, when I'm trying to download subtitles, this is what I get:
Code: Select all
Testing OpenSubtitles... OK
Done ヾ(@⌒ー⌒@)ノ
Code: Select all
WARNING: Not in GZIP format: anti-leech limit may have been reached
Re: [MANUAL] Configure OpenSubtitles and Sublight login
When it said "Testing OpenSubtitles... OK" it had already configured and setup your user. From then on FileBot was using your user.
Just because you're logged in doesn't mean OpenSubtitles gives you infinite quotas. Try again tomorrow. Or talk to the devs and make a seizable donation.
Just because you're logged in doesn't mean OpenSubtitles gives you infinite quotas. Try again tomorrow. Or talk to the devs and make a seizable donation.
Re: [MANUAL] Configure OpenSubtitles and Sublight login
Oh, thank you. I thought if I login I'll have unlimited quota. Sorry for the trouble.
Re: [MANUAL] Configure OpenSubtitles and Sublight login
Honestly I have no idea, it keeps changing. Though I have the feeling that since I donated 15 euro and got a VIP account I run into those limits much less.
Re: [MANUAL] Configure OpenSubtitles and Sublight login
And apparently it's not some specific number of downloads per hour/day. I have this large collection of TV subtitles and I need to download all the subtitles for my brother. Sometimes I can download more than 200 subtitles in one session, and sometimes it starts playing out after a season or two.
Re: Automated Media Center
Filebot is the final chapter of the holygrail.
Holly Moses....CouchPotato+Utorrent+Filebot+YamJ=Slick as Shit!...I need some help customizing this script as follows:
1. I know Utorrent locks the file, but is there way to move instead of copy?
2. Can it set it to download the NFO file only and not any poster art, or have them removed
3. Customize the output folder name from "Movies"?
Appreciate any help that can assisted.
Regards.
Holly Moses....CouchPotato+Utorrent+Filebot+YamJ=Slick as Shit!...I need some help customizing this script as follows:
1. I know Utorrent locks the file, but is there way to move instead of copy?
2. Can it set it to download the NFO file only and not any poster art, or have them removed
3. Customize the output folder name from "Movies"?
Appreciate any help that can assisted.
Regards.
Re: Automated Media Center
1. No, only with lots of extra effort and interfacing with utorrent. Why not use hardlinks?
2. No, not by default. And Yes, but you'll need to modify the scripts.
3. RTFM
2. No, not by default. And Yes, but you'll need to modify the scripts.
3. RTFM
-
verysofttoiletpaper
- Posts: 141
- Joined: 05 Jul 2012, 09:44
Re: Automated Media Center
What do you use YamJ for and how do you use it?dacari wrote:Filebot is the final chapter of the holygrail.
Holly Moses....CouchPotato+Utorrent+Filebot+YamJ=Slick as Shit!...I need some help customizing this script as follows:
1. I know Utorrent locks the file, but is there way to move instead of copy?
2. Can it set it to download the NFO file only and not any poster art, or have them removed
3. Customize the output folder name from "Movies"?
Appreciate any help that can assisted.
Regards.
Re: Automated Media Center
@rednoah
1. Thanks
2. Thanks
3. KMA
@verysofttoiletpaper
Yamj is a code for downloading info & indexing for NMT players:
http://code.google.com/p/moviejukebox/
1. Thanks
2. Thanks
3. KMA
@verysofttoiletpaper
Yamj is a code for downloading info & indexing for NMT players:
http://code.google.com/p/moviejukebox/
- ashfallen0
- Power User
- Posts: 32
- Joined: 14 Jan 2012, 10:44
Re: Automated Media Center
dacari:
#1:
I personally have great success with this. My utorrent is set to download (with .ut) to a partial directory, then move on complete to a competed directory, which is where filebot takes over and moves that to the clean directory after rename. It allows me to monitor failed launches of the filebot script and re-run from the logger entry to diagnose. The torrent HAS to be stopped for that to work. Preferences: Queueing: "When utorrent reaches the seeding goal" Enable checkbox "Limit the upload rate to (kB/s): [0 = stop] Change that to 0. That will allow you to seed to a good ratio, then discontinue and unlock the file.
#3: rednoah is saying that he defined the script to use the relative directory, so if you use: and change that to what ever you want that directory to be e.g it will add a subdirectory named X:/OutputDir/Films/
#1:
Code: Select all
--action moveI personally have great success with this. My utorrent is set to download (with .ut) to a partial directory, then move on complete to a competed directory, which is where filebot takes over and moves that to the clean directory after rename. It allows me to monitor failed launches of the filebot script and re-run from the logger entry to diagnose. The torrent HAS to be stopped for that to work. Preferences: Queueing: "When utorrent reaches the seeding goal" Enable checkbox "Limit the upload rate to (kB/s): [0 = stop] Change that to 0. That will allow you to seed to a good ratio, then discontinue and unlock the file.
#3: rednoah is saying that he defined the script to use the relative directory, so if you use:
Code: Select all
--def "movieFormat=Movies/{n} {y}/{fn}"Code: Select all
--def "movieFormat=Films/{n} {y}/{fn}"Re: Automated Media Center
Thank you ashfallen0,
Ahh this is great...I also tried the fbcpto.groovy script but could not get it to work. Couple little questions as I am a noob.
1. What do you mean by (.ut)
2. Would you be able to advise how to modify the script so that only the NFO file is created and not any poster art.
This is what I have:
Thanks Much
Ahh this is great...I also tried the fbcpto.groovy script but could not get it to work. Couple little questions as I am a noob.
1. What do you mean by (.ut)
2. Would you be able to advise how to modify the script so that only the NFO file is created and not any poster art.
This is what I have:
Code: Select all
filebot -script fn:amc --output "\\NAS\Volume_2\Media\Movies" --action move --conflict override -non-strict --def music=n subtitles=en artwork=n "ut_dir=%D" "ut_file=%F" "ut_kind=%K" "ut_title=%N" "ut_label=%L" "ut_state=%S" "clean=y" --def "movieFormat=Films/{n} {y}/{fn}"Thanks Much
- ashfallen0
- Power User
- Posts: 32
- Joined: 14 Jan 2012, 10:44
Re: Automated Media Center
1: Preferences: General: "When downloading": checkbox "Append .!ut to incomplete files". Not really sure if it's necessary, but it allows me a visual of what is downloading but not complete, in case any files don't get moved by utorrent or the computer crashes/power failure.
2: Sorry, you're going to have to find a scripting guru. I wouldn't even know where to begin.
2: Sorry, you're going to have to find a scripting guru. I wouldn't even know where to begin.
PHPBB3 hates me.Re: Automated Media Center
Is it possible to adjust the script to organize only TVShows, and for everything else just unzip into current (download) folder?
Thanks
Thanks
Re: Automated Media Center
Foa,I met with Filebot and your script yesterday and thanks for hardwork.
I tried to use with Vuze via command runner plug in.
Since there is no %S defination in command runner, i only disabled this part of your script in my local drive.
and here is my command
I also tried to copy other script in amc.groovy and changed script like this. (I don't know if it's right way of coding groovy).
i.e
again i stucked after extracting and copying part.
Do you any idea how i can make work other parts of script also?
I tried to use with Vuze via command runner plug in.
Since there is no %S defination in command runner, i only disabled this part of your script in my local drive.
Code: Select all
// check user-defined pre-condition
// if (tryQuietly{ ut_state ==~ ut_state_allow }) {
// throw new Exception("Invalid state: ut_state = $ut_state (expected $ut_state_allow)")
// }It extract the G:\AFTER directory without problem. But that's all. Extracted part in orgjinal directory remains undeleted and there is no sub or artwork. Seems like script doesn't work after extracting part.filebot.exe -script "C:/Program Files/FileBot/amc.groovy" --output "G:/AFTER" --action copy --conflict override -non-strict --def "ut_dir=%D" "ut_file=%F" "ut_kind=%K" "ut_title=%N" "ut_label=%L"
I also tried to copy other script in amc.groovy and changed script like this. (I don't know if it's right way of coding groovy).
i.e
Code: Select all
if (pushover) {
// include webservice utility
include('C:/Program Files/FileBot/ws.groovy')
_log.info 'Sending Pushover notification'
Pushover(pushover).send("Finished processing ${tryQuietly { ut_title } ?: input*.dir.name.unique()} (${getRenameLog().size()} files).")
}Do you any idea how i can make work other parts of script also?
Re: Automated Media Center
You don't need to change anything, and the lines you commented out have no affect anyway if you don't pass in ut_state_allow.
Most importantly you'll first need to check Vuzes log or something for what command it's actually executing, after variables have been replaced etc
Changing the script without checking what the command and output is, is pretty much useless since you're working blind.
Most importantly you'll first need to check Vuzes log or something for what command it's actually executing, after variables have been replaced etc
Changing the script without checking what the command and output is, is pretty much useless since you're working blind.
Re: Automated Media Center
Ok, I stucked after extracting and copying part because i didn't use option on command.
Now i can confirm that your script works like a charm on Azureus (Vuze, with command runner plugin).
Only mail part doesn't work. When i tried to run in command line, it says i should look "http://mail.google.com/support/bin/answ ... swer=14257 ". I tried suggestion there but i didn't work but it isn't so important i think.
What i wonder is if it's possible to get ripper group name or torrent name in info file or somewhere like that.
Thanks again for the great app and script.
Now i can confirm that your script works like a charm on Azureus (Vuze, with command runner plugin).
Only mail part doesn't work. When i tried to run in command line, it says i should look "http://mail.google.com/support/bin/answ ... swer=14257 ". I tried suggestion there but i didn't work but it isn't so important i think.
What i wonder is if it's possible to get ripper group name or torrent name in info file or somewhere like that.
Thanks again for the great app and script.
Re: Automated Media Center
Email works. You probably pass in the wrong values. Note that by username I do mean username, not email address, which would be [email protected]
The other stuff you can add yourself if you're ok with a bit of groovy code.
The other stuff you can add yourself if you're ok with a bit of groovy code.
Re: Automated Media Center
Rednoah
Thanks for all your support- this is a really amazing program.
I'm trying to set filebot up with my vuze installation (as I feel uncomfortable running utorrent w/o peer blocking), and was wondering if there is a way to automatically rename some tv series by season-episode and some by airdate- specifically considering the daily show and the colbert report.
If it helps, I can automatically assign a different category for the by airdate series.
Thanks for all your support- this is a really amazing program.
I'm trying to set filebot up with my vuze installation (as I feel uncomfortable running utorrent w/o peer blocking), and was wondering if there is a way to automatically rename some tv series by season-episode and some by airdate- specifically considering the daily show and the colbert report.
If it helps, I can automatically assign a different category for the by airdate series.
Re: Automated Media Center
It's all in the episode naming scheme. Just something along the lines of {n ==~ /Daily.Show/ ? airdate : s00e00} so very very easy.
Re: Automated Media Center
Hi all,
I've been using this script for the past few months and it's brilliant! Really I couldn't be more grateful this is fantastic work.
I've been running it straight from utorrent posprocess and for some reason lately it's stopped working.
A movie or TV show downloads and nothing happens, the log out put in utorrent shows that the commands are being called but just nothing happens. I've added the filebot.log output too but the file isn't created.
I've tried to do some troubleshooting myself and I find that running a manual command works so this script is doing it's job, it's got to be something to do with uTorrent. Anyone seen this at all? It's so frustrating!
Any help is appreciated.
P
I've been using this script for the past few months and it's brilliant! Really I couldn't be more grateful this is fantastic work.
I've been running it straight from utorrent posprocess and for some reason lately it's stopped working.
A movie or TV show downloads and nothing happens, the log out put in utorrent shows that the commands are being called but just nothing happens. I've added the filebot.log output too but the file isn't created.
I've tried to do some troubleshooting myself and I find that running a manual command works so this script is doing it's job, it's got to be something to do with uTorrent. Anyone seen this at all? It's so frustrating!
Any help is appreciated.
P
Re: Automated Media Center
Check the docs again. Things changed a bit with v3.5, so if you redirect output you'll need to force utorrent to call with cmd. With v3.6 that i'll push on the weekend it'll get more streamlined and should then be stable.
Re: Automated Media Center
Thanks for the response!
Where are the docs? I'm reading the original post and I don't see any link to documents? Sorry if I'm being stupid I'm genuinely not being lazy
My script looks the same as the first post, also I notice it appears to be picking up files to try and unzip or move which it shouldn't. For example it seems to have picked up the sample file.
Where are the docs? I'm reading the original post and I don't see any link to documents? Sorry if I'm being stupid I'm genuinely not being lazy
My script looks the same as the first post, also I notice it appears to be picking up files to try and unzip or move which it shouldn't. For example it seems to have picked up the sample file.
Re: Automated Media Center
Sorry I see what you were referring to now,
This is strange, it works from the command line directly though? I'll try this change thanks for pointing it out.
P
This is strange, it works from the command line directly though? I'll try this change thanks for pointing it out.
P
Re: Add Blacklisted Terms and Improve Movie / Series Detecti
Movie detection failed in:
[BluRay Rip 1080p - ITA-ENG DTS-AC3-SUB] Machete (2011) LiFE [M@HD].mkv
that is detected as 'Machete 2011 LiFE M'
I suppose it's the fault of:
LiFE
[M@HD]
Can you add these terms to the blacklist?
EDIT:
The year isn't recognized too in v3.6...can you look into this?
[BluRay Rip 1080p - ITA-ENG DTS-AC3-SUB] Machete (2011) LiFE [M@HD].mkv
that is detected as 'Machete 2011 LiFE M'
I suppose it's the fault of:
LiFE
[M@HD]
Can you add these terms to the blacklist?
EDIT:
The year isn't recognized too in v3.6...can you look into this?
Re: Add Blacklisted Terms and Improve Movie / Series Detecti
Added.
But even without it does get it right:
But even without it does get it right:
Code: Select all
Parameter: ut_kind = multi
Parameter: ut_dir = D:\testdata\AMC-TEST
Parameter: ut_title = AMC-TEST
Input: D:\testdata\AMC-TEST\[BluRay Rip 1080p - ITA-ENG DTS-AC3-SUB] Machete (2011) LiFE [M@HD].mkv
[BluRay Rip 1080p - ITA-ENG DTS-AC3-SUB] Machete (2011) LiFE [M@HD].mkv [series: LiFE, movie: Machete (2010)]
Exclude Series: LiFE
Group: [tvs:null, mov:Machete (2010), anime:null] => [[BluRay Rip 1080p - ITA-ENG DTS-AC3-SUB] Machete (2011) LiFE [M@HD].mkv]
Rename movies using [TheMovieDB]
Auto-detect movie from context: [D:\testdata\AMC-TEST\[BluRay Rip 1080p - ITA-ENG DTS-AC3-SUB] Machete (2011) LiFE [M@HD].mkv]
[COPY] Rename [D:\testdata\AMC-TEST\[BluRay Rip 1080p - ITA-ENG DTS-AC3-SUB] Machete (2011) LiFE [M@HD].mkv] to [D:\output\Movies\Machete (2010)\Machete (2010).mkv]
Processed 1 files
Done ヾ(@⌒ー⌒@)ノRe: Add Blacklisted Terms and Improve Movie / Series Detecti
Movie Machete (2010)
www.imdb.com/title/tt0985694
6min TV Series Machete (2011)
http://www.imdb.com/title/tt2112196/
I'm pretty sure we're taking about Machete (2010) here. Works as expected. Better than even.
www.imdb.com/title/tt0985694
6min TV Series Machete (2011)
http://www.imdb.com/title/tt2112196/
I'm pretty sure we're taking about Machete (2010) here. Works as expected. Better than even.
Re: Add Blacklisted Terms and Improve Movie / Series Detecti
Yes I was talking about the film...and yes now is working...I'm a little confused about that xD
I don't know why before posting my report the software didn't recognized the film.
Thanks a lot for the support xD
I don't know why before posting my report the software didn't recognized the film.
Thanks a lot for the support xD
-
wisomtooth
- Posts: 6
- Joined: 02 May 2013, 05:49
-
wisomtooth
- Posts: 6
- Joined: 02 May 2013, 05:49
Re: How about sharing your CLI scripts?
On "Rename All Media Folder by Folder":
1. The script is not renaming the media files inside folders for me.
2. Some titles get renamed to their English equivalent, some don't (even when available).
e.g. "Kasi az gorbehaye irani khabar nadareh" doesn't rename to "No One Knows About Persian Cats" (http://www.imdb.com/title/tt1426378/)
I'm using IMDB as source.
1. The script is not renaming the media files inside folders for me.
2. Some titles get renamed to their English equivalent, some don't (even when available).
e.g. "Kasi az gorbehaye irani khabar nadareh" doesn't rename to "No One Knows About Persian Cats" (http://www.imdb.com/title/tt1426378/)
I'm using IMDB as source.
Re: [SNIPPET] Put the "The" at the end
Code: Select all
--format "your/format/anything"Re: How about sharing your CLI scripts?
1. It's not supposed to. Just run it twice if you first wanna rename folders and then files. If you restructure your stuff you'd normally define a format for that and move everything into the new structure rather then renaming files in place.
2. Depends on the database you're using. TMDB respects the --lang option. With IMDb you'll get what you get regardless of your prefs.
2. Depends on the database you're using. TMDB respects the --lang option. With IMDb you'll get what you get regardless of your prefs.
Re: Automated Media Center
You are a life saver! XD
Thank you so much!
Thank you so much!
Re: Automated Media Center
I have been using this successfully to rename and move my downloads to a specific location. It was working well, and it still is when i download a torrent manually. however, it no longer works with my RSS feed. When a torrent is downloaded through my feed into the same place as a manual torrent, the filebot script runs but it does not rename or move the file. I'm not sure what is going on. any thoughts? I'm using utorrent. Thanks.
Re: Automated Media Center
Definitely doesn't have anything to do with RSS feeds or whatnot. It's a simple cmdline tool that processes files.*** If you need help start a new thread and always include cmdline output! ***
-
AnIdeaWithin
- Posts: 6
- Joined: 12 May 2013, 16:29
Re: Add Blacklisted Terms and Improve Movie / Series Detecti
How about allowing the user to add user defined blacklist terms? I'm imagining that in a local "user-query-blacklist.txt". That way, filebot could be tailored to individual system infrastructures. On my NAS, e.g., I keep the unprocessed files in folders à la "_to_be_sorted_SERIES" or "_to_be_sorted_MOVIES", and filebot tries to match the "to" of that folder name, which leads to a whole bunch of utterly unwanted matches. Easy workaround: Get rid of the underscores. There's no "tobesortedXXX" available in the movie / series DBs, so it doesn't try to match those. But still, I'd be quite happy if I could tinker with the settings on my end in this case, as I don't see it would be much use to include this highly individual path name choice in the general public rules.
Re: Add Blacklisted Terms and Improve Movie / Series Detecti
Added to.be.sorted pattern.
You can always override the *.properties files in the jar and then use your own data files. But it's already full of individual stuff. However wierd it may be, I'm sure there's lots of other people that use the same naming. So I don't mind adding things like this. Makes sense to me.
You can always override the *.properties files in the jar and then use your own data files. But it's already full of individual stuff. However wierd it may be, I'm sure there's lots of other people that use the same naming. So I don't mind adding things like this. Makes sense to me.
-
AnIdeaWithin
- Posts: 6
- Joined: 12 May 2013, 16:29
Re: Add Blacklisted Terms and Improve Movie / Series Detecti
Somehow doesn't seem "clean" to me, but it's your baby, and if it works for me, I won't complain 
Anyway, all the superspeedy and HELPFUL support convinced me to make a donation. Keep up the good work!
Anyway, all the superspeedy and HELPFUL support convinced me to make a donation. Keep up the good work!
-
AnIdeaWithin
- Posts: 6
- Joined: 12 May 2013, 16:29
Transmission on Synology NAS
Hint for Synology users: The transmission installation sets up a user "transmission" with his own home dir. This home dir is "/usr/local/transmission/var", thus the config files can be found there:
This will work only if logged in as root. As admin, you'll have to prefix that with sudo, as most linux users will already know (sudo requires some extra setup on Synology though, you'll have to google for that or pm me).
@rednoah: If you think this is the wrong place for this extra info, feel free to move or delete the posting.
Code: Select all
vi /usr/local/transmission/var/settings.json
@rednoah: If you think this is the wrong place for this extra info, feel free to move or delete the posting.
Re: How about sharing your CLI scripts?
http://filebot.net/scripts/artwork.tmdb.groovy
I have all my movies in one folder. I am trying to modify the script to work with my setup but am failing horribly. I also only want the XML information and a single poster for each both (named the same as the movie just with .xml and .jpg extensions.)
I have all my movies in one folder. I am trying to modify the script to work with my setup but am failing horribly. I also only want the XML information and a single poster for each both (named the same as the movie just with .xml and .jpg extensions.)
Re: How about sharing your CLI scripts?
The artwork.* scripts define mostly how the folder structure is traversed and how movie/series detection works. The actual artwork downloading and naming is all in the lib/htpc include.
Best thing to do is to organize each movie into it's own folder.
Best thing to do is to organize each movie into it's own folder.
Re: How about sharing your CLI scripts?
I can read the scripts no problem I just can't write changes very well as my Java is weak and Groovy is non existent.
Where is sortBySimilarity defined? Does it.name really need the { and } around it?
Code: Select all
options = options.sortBySimilarity(query, { it.name })Re: How about sharing your CLI scripts?
Here's the stuff I pre-define:
https://sourceforge.net/p/filebot/code/ ... force=True
The { ... } is the toString function used for comparison. It's passing in a function, not a value. So you need the { ... }
https://sourceforge.net/p/filebot/code/ ... force=True
The { ... } is the toString function used for comparison. It's passing in a function, not a value. So you need the { ... }
Re: How about sharing your CLI scripts?
Code: Select all
args.getFiles{ it.isVideo() }
.each{
def movieName = detectMovie(it, false)
def movieInfo = TheMovieDB.searchMovie(movieName.name, _args.locale).sortBySimilarity(movieName.name, {it.name})[0]
println movieInfo
}Re: How about sharing your CLI scripts?
You first have filebot correctly detect it as Kiss Kiss Bang Bang (2005) via detectMovie(), then you go on and take only the movie name Kiss Kiss Bang Bang and do another search, that is completely useless btw, at best giving you the same result, at worst a different movie.
You only need detectMovie() and it'll get you the best-guess movie object with name/year/tmdbid.
You only need detectMovie() and it'll get you the best-guess movie object with name/year/tmdbid.
Re: How about sharing your CLI scripts?
Code: Select all
args.getFiles{ it.isVideo() }
.each{
def movieName = detectMovie(it, false)
println movieName
def movieInfo = TheMovieDB.searchMovie(movieName.name, _args.locale)
println movieInfo
println movieInfo.sortBySimilarity(movieName.toString(), {it.name})
}sortBySimilarity is not working movieName.toString() is exactly "Kiss Kiss Bang Bang (2005)" yet it does not move it to the front of array.Kiss Kiss Bang Bang (2005)
[Kiss Kiss... Bang Bang (1966), Kiss Kiss Bang Bang (2005), Kiss Kiss (Bang Bang) (2001)]
[Kiss Kiss... Bang Bang (1966), Kiss Kiss Bang Bang (2005), Kiss Kiss (Bang Bang) (2001)]
Re: How about sharing your CLI scripts?
It's sorting by the text similarity of movieName.toString() and it.name, since the ... is ignored both match equally by name, and since you do it.name you specifically make sure the year part is not part of the equasion. Just do sortBySimilarity(string) and let it use the default toString function for the comparison value.
Also, detectMovie already gives you the best result. If you use detectMovie it's a complete waste to do a TMDb.searchMovie afterwards. It's probably called internally as part of detectMovie already anyway, relevance sorting as well.
Also, detectMovie already gives you the best result. If you use detectMovie it's a complete waste to do a TMDb.searchMovie afterwards. It's probably called internally as part of detectMovie already anyway, relevance sorting as well.
Re: How about sharing your CLI scripts?
I am doing TMDb.searchMovie() because I would like to pull a couple more details but I think I will just write the movie name to file then use a more reasonable language to do the rest like I had originally planned.
Thanks for all the help and fast replies
Edit: I just realized detectMovie gets the tmdbId so I can just use TheMovieDB.getMovie() lol
Code: Select all
import groovy.json.JsonBuilder
args.getFiles{ it.isVideo() }.each{
def f = new File(it.name[0..-5] + '.json')
if (f.exists())
return
def m = detectMovie(it, false)
f.write(new JsonBuilder(m).toPrettyString())
}Edit: I just realized detectMovie gets the tmdbId so I can just use TheMovieDB.getMovie() lol