POSTBUCKET - where random posts in unrelated topics go

Any questions? Need some help?
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [MANUAL] Configure Sublight login

Post by rednoah »

It's using Java Preferences. On Windows it'll save stuff to the registry, Linux & Mac it'll be managed in properties files. The portable version will always use a properties file.

@see
http://docs.oracle.com/javase/7/docs/ap ... ences.html

* In anycase it's in clear text and easily readable.
:idea: Please read the FAQ and How to Request Help.
bawng
Posts: 6
Joined: 14 Sep 2012, 18:32

Re: POSTBUCKET - where random posts in unrelated topics go

Post by bawng »

Yeah, like I said it has worked perfectly well with all other films and series. Since this is the only problem I've had, it doesn't really matter. Thank you for the help anyway!
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Prevent cmd from stealing the focus

Post by rednoah »

If you're using this script with µTorrent on Windows you might find it annoying that it'll popup a cmd window stealing the focus each time. You can fix this by calling programs like this: cmd.exe /c start /min ... ^& exit

Code: Select all

cmd.exe /c start /min filebot -script fn:utorrent-postprocess --output "X:/path/to/media" --action copy --conflict override -non-strict --def subtitles=y artwork=y "ut_dir=%D" "ut_file=%F" "ut_kind=%K" "ut_title=%N" "ut_label=%L" "ut_state=%S" ^& exit
:idea: Please read the FAQ and How to Request Help.
bixtool
Posts: 11
Joined: 08 Sep 2012, 16:03

Re: Fully Automated Media Center

Post by bixtool »

Hi,
I have been using your script successfully now for several week, but recently problems have developed.
Now:
Utorrent appears to execute the my code on download completion but no files are processed (a window flashes too quickly to read).
However:
When I execute the code copied from Utorrent's logger screen at the command prompt, the script executes perfectly. All files are processed.

Here is my code:

Code: Select all

filebot -script "c:/tv/test.groovy" --output "j:" --action copy --conflict override -non-strict --def subtitles=y artwork=y  [email protected]:pass123  [email protected] "ut_dir=%D" "ut_file=%F" "ut_kind=%K" "ut_title=%N" "ut_label=%L" "ut_state=%S"
Any ideas?

How can I setup a detailed log for Filebot so I can determine why the script fails?

Thanks
B
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Fully Automated Media Center

Post by rednoah »

Try redirecting the output into by using a cmd like this:

Code: Select all

filebot -version 2>&1 >> log.txt
:idea: Please read the FAQ and How to Request Help.
bixtool
Posts: 11
Joined: 08 Sep 2012, 16:03

Re: Fully Automated Media Center

Post by bixtool »

Hi,
The script fails from utorrent, but works from the command line. The Filebot directory is added to my path statement. I even ran utorrent as an Administrator. I see the cmd window pop up when a download completes and the script is executed but it closes too quickly to see any errors.

Any reason why the script fails from utorrent, but when the logger line is pasted to a command window it works every time?

B
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Fully Automated Media Center

Post by rednoah »

Until we manage to see that console output I also wouldn't know what's going wrong.

Redirect console output into a file like I should you in my last post. That way the console output gets written to file instead of the console window. Then you can check that file to see the error messages.
:idea: Please read the FAQ and How to Request Help.
d33g
Posts: 2
Joined: 01 Oct 2012, 03:02

Re: Fully Automated Media Center

Post by d33g »

Hi all,

sorry i've been trying to get my head around this and not having a whole lot of success...

Below is the exact line that I have pasted into uTorrent;
filebot -script fn:utorrent-postprocess --output "R:/-=To Sort=-/_Renamed" --action copy --conflict override -non-strict --def subtitles=y artwork=y "ut_dir=%D" "ut_file=%F" "ut_kind=%K" "ut_title=%N" "ut_label=%L" "ut_state=%S"

And I downloaded and copied the utorrent-postprocess.groovy script and pasted into the filebot install dir changing the first line to match the above specifying my "R:/-=To Sort=-/_Renamed" which is where i want everything to be extracted and renamed then dumped into.

NOTE// I currently have everything set to download to a "_Downloading" folder which then moves to a "_Completed" folder once the download is complete, if that is causing any problems...

I tried deleting my "R:/**" path and replacing it with log.txt but I could never find any log file being generated to find the issue...

Any help is GREATLY appreciated.

Thanks,
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Fully Automated Media Center

Post by rednoah »

1. You don't need to download anything, -script fn:name means it'll download/update the script automatically. No need to change the script.

2. --output <folder> is where files go to. Standard output is written to the console, you can pipe that into a file if you want.

3. You literally ONLY need to follow the steps. Most importantly that filebot is installed properly and that it'll run in console.

4. You can debug things by manually running the command from the console and see what happens. uTorrent somewhere has a log what commands it calls with exactly what arguments. You can copy that and try it.
:idea: Please read the FAQ and How to Request Help.
d33g
Posts: 2
Joined: 01 Oct 2012, 03:02

Re: Fully Automated Media Center

Post by d33g »

Thanks for such a quick reply.

Ok thanks for letting me know that.

If i run manually from console specifying an input folder it will work, when I run from uTorrent only removing the input information as it states that the command will interpret the input directly from uTorrent the console opens but closes before I can see whats its doing and it doesn't complete any task.

Sorry to be such a pain.

Many thanks for your help already.

DeeG
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Fully Automated Media Center

Post by rednoah »

That's why you have to >> REDIRECT OUTPUT INTO A FILE <<

Try this. See what happens. It's the very basics of using the cmdline. You can do this with any command.
filebot -version 2>&1 >> log.txt

YOU CAN PRINT CONSOLE OUTPUT TO A FILE INSTEAD OF THE CONSOLE VERY EASILY.
:idea: Please read the FAQ and How to Request Help.
warioguy64
Posts: 4
Joined: 01 Oct 2012, 11:19

Re: Fully Automated Media Center

Post by warioguy64 »

Hi,

Everything works perfectly for me but my xbmc window still minimizes when the command prompt is in use. This is after I added the fix by calling programs like this: cmd.exe /c start /min ... ^& exit
The command prompt window does start minimized but my xbmc minimizes too.
I want to add that if i use my remote for itunes to play music that xbmc also minimizes when I do this.

I use Windows 7 64x
xbmc Eden v11

Great scipt and thanks in advance.
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Fully Automated Media Center

Post by rednoah »

On the utorrent forums I read that you can make this work by running a .vbs script from utorrent and then kicking off the filebot call from the .vbs script. If anybody gets that working please share. ;)
:idea: Please read the FAQ and How to Request Help.
sam829
Posts: 22
Joined: 04 Sep 2012, 04:02

Re: Fully Automated Media Center

Post by sam829 »

First bit of code is a VB script, .vbs extension. You ONLY need to modify the location of your batch file.

Ex.) C:\Program Files\Filebot\tvdirwatcher.bat <-- Change this to the location of your batch file

Code: Select all

Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) & "C:\Program Files\Filebot\tvdirwatcher.bat" & Chr(34), 0
Set WshShell = Nothing
Second bit of code is a .bat file. Only being displayed as an example.

Code: Select all

filebot -rename M:/TVComplete --output \\ds212/TV --format "{n}/Season {s}/{n} {sxe} {t}" -non-strict --db TheTVDB
Very simple and works perfectly. If you have any questions at all please feel free to ask away! :D

One more thing, consider supporting RedNoah ;) I wouldn't have been so motivated to figure out the above problem if it wasn't for him.
bixtool
Posts: 11
Joined: 08 Sep 2012, 16:03

Re: Fully Automated Media Center

Post by bixtool »

hi rednoah,

When I add

Code: Select all

>>c:/log.log 
to my utorrent Run Program command and a download completes, I get an empty log file.

But when I run the same command, pasted from utorrents logger tab, I get all the info as it is processed

Code: Select all

Parameter: subtitles = y
Parameter: artwork = y
Parameter: gmail = [email protected]:pass123
Parameter: mailto = [email protected]
Parameter: ut_dir = C:\TV\Incomplete\[ www.Speed.Cd ] - Dexter.S07E01.720p.HDTV.x264-EVOLVE
Parameter: ut_file = dexter.s07e01.720p.hdtv.x264-evolve.nfo
Parameter: ut_kind = multi
Parameter: ut_title = [ www.Speed.Cd ] - Dexter.S07E01.720p.HDTV.x264-EVOLVE
Parameter: ut_label = 
Parameter: ut_state = 5
Read archive [dexter.s07e01.720p.hdtv.x264-evolve.rar] to [C:\TV\Incomplete\[ www.Speed.Cd ] - Dexter.S07E01.720p.HDTV.x264-EVOLVE\dexter.s07e01.720p.hdtv.x264-evolve]
Extracting files [C:\TV\Incomplete\[ www.Speed.Cd ] - Dexter.S07E01.720p.HDTV.x264-EVOLVE\dexter.s07e01.720p.hdtv.x264-evolve\Dexter.S07E01.720p.HDTV.x264-EVOLVE.mkv]
Input: C:\TV\Incomplete\[ www.Speed.Cd ] - Dexter.S07E01.720p.HDTV.x264-EVOLVE\dexter.s07e01.720p.hdtv.x264-evolve\Dexter.S07E01.720p.HDTV.x264-EVOLVE.mkv
Group: [tvs:Dexter] => [Dexter.S07E01.720p.HDTV.x264-EVOLVE.mkv]
Missing subtitles for 1 video files
Looking up subtitles by filehash via OpenSubtitles
Looking up subtitles by filehash via Sublight
Searching for [Dexter] at [OpenSubtitles]
Searching for [Dexter] at [Sublight]
Searching for [Dexter] at [Subscene]
Matched [Dexter.S07E01.720p.HDTV.x264-EVOLVE.mkv] to [Dexter.S07E01.720p.HDTV.x264-EVOLVE] via filename
Fetching [Dexter.S07E01.720p.HDTV.x264-EVOLVE]
Export [Dexter.S07E01.720p.HDTV.x264-EVOLVE.srt] as: SubRip / UTF-8
Writing [Dexter.S07E01.720p.HDTV.x264-EVOLVE.srt] to [Dexter.S07E01.720p.HDTV.x264-EVOLVE.eng.srt]
Rename episodes using [TheTVDB]
Auto-detected query: [Dexter]
Fetching episode data for [Dexter]
Auto-detected query: [Dexter]
Fetching episode data for [Dexter]
Stripping invalid characters from new path: Dexter/Season 7/Dexter.S07E01.Are You...?
Stripping invalid characters from new path: Dexter/Season 7/Dexter.S07E01.Are You...?
[COPY] Rename [C:\TV\Incomplete\[ www.Speed.Cd ] - Dexter.S07E01.720p.HDTV.x264-EVOLVE\dexter.s07e01.720p.hdtv.x264-evolve\Dexter.S07E01.720p.HDTV.x264-EVOLVE.mkv] to [j:\Dexter\Season 7\Dexter.S07E01.Are You....mkv]
[COPY] Rename [C:\TV\Incomplete\[ www.Speed.Cd ] - Dexter.S07E01.720p.HDTV.x264-EVOLVE\dexter.s07e01.720p.hdtv.x264-evolve\Dexter.S07E01.720p.HDTV.x264-EVOLVE.eng.srt] to [j:\Dexter\Season 7\Dexter.S07E01.Are You....srt]
Processed 2 files
Fetching artwork for j:\Dexter\Season 7 from TheTVDB
Fetching j:\Dexter\poster.jpg => {id=919566, BannerMirror=http://thetvdb.com/banners/, BannerPath=posters/79349-24.jpg, BannerType=poster, BannerType2=680x1000, Language=en, Rating=10.0000, RatingCount=1}
Fetching j:\Dexter\banner.jpg => {id=18143, BannerMirror=http://thetvdb.com/banners/, BannerPath=graphical/79349-g7.jpg, BannerType=series, BannerType2=graphical, Language=en, Rating=7.0303, RatingCount=33}
Fetching j:\Dexter\fanart.jpg => {id=30362, BannerMirror=http://thetvdb.com/banners/, BannerPath=fanart/original/79349-16.jpg, BannerType=fanart, BannerType2=1920x1080, Colors=|149,111,92|169,68,82|196,73,66|, Language=en, Rating=7.3488, RatingCount=43, SeriesName=false, ThumbnailPath=_cache/fanart/original/79349-16.jpg, VignettePath=fanart/vignette/79349-16.jpg}
Fetching j:\Dexter\Season 7\poster.jpg => {id=919409, BannerMirror=http://thetvdb.com/banners/, BannerPath=seasons/79349-7-4.jpg, BannerType=season, BannerType2=season, Season=7, Language=en, Rating=8.0000, RatingCount=2}
Banner not found: j:\Dexter\Season 7\banner.jpg / season:seasonwide
Fetching j:\Dexter\clearart.png => {type=clearart, id=4980, url=http://fanart.tv/fanart/tv/79349/clearart/4980/D_79349 (3).png, lang=en, likes=4}
Fetching j:\Dexter\logo.png => {type=clearlogo, id=20958, url=http://fanart.tv/fanart/tv/79349/clearlogo/20958/dexter-5057573260826.png, lang=en, likes=5}
Fetching j:\Dexter\landscape.jpg => {type=tvthumb, id=5012, url=http://fanart.tv/fanart/tv/79349/tvthumb/5012/D_79349 (10).jpg, lang=en, likes=1}
Fetching j:\Dexter\Season 7\landscape.jpg => {type=seasonthumb, id=18514, url=http://fanart.tv/fanart/tv/79349/seasonthumb/18514/dexter-4fc8e9fa79bf8.jpg, lang=en, likes=0, season=7}
     [mail] Sending email: [FileBot] [ www.Speed.Cd ] - Dexter.S07E01.720p.HDTV.x264-EVOLVE
     [mail] Sent email with 0 attachments
Done ?(?????)?

Is there a switch for filebot.cmd to leave the command prompt open when the script completes?

B
RekiM
Posts: 2
Joined: 01 Oct 2012, 23:13

Re: Fully Automated Media Center

Post by RekiM »

This script (and app) is awesome.

Is there any way this can output to different paths (or drives) for Movies and TV shows?

something like this:

Code: Select all

filebot -script fn:utorrent-postprocess --outputMovie "X:/Movies" --outputTV "Y:/TV" ... 
bixtool
Posts: 11
Joined: 08 Sep 2012, 16:03

Re: Fully Automated Media Center

Post by bixtool »

hi Rednoah,
I discovered my problem was windows 7 64bit related.

I added a "pause" to filebot.cmd and discovered java was not invoking at the command line for 32bit applications.

I only had 64bit java installed. I installed the 32bit java jre as well and now everything works as advertised.

Sorry for all the confusion

B
bixtool
Posts: 11
Joined: 08 Sep 2012, 16:03

Re: Fully Automated Media Center

Post by bixtool »

RekiM wrote:This script (and app) is awesome.

Is there any way this can output to different paths (or drives) for Movies and TV shows?

something like this:

Code: Select all

filebot -script fn:utorrent-postprocess --outputMovie "X:/Movies" --outputTV "Y:/TV" ... 
I'm not sure about the script, but you can run two instances of utorrent: one for movie downloads and one for tv downloads. You can specify different Run Program strings for each application.
I've used it in the past.

I have this from my notes... not sure of the source:
Create a shortcut and add /RECOVER with a space at the end for the target....

ex: "C:\Program Files\uTorrent\uTorrent 3.2\uTorrent\uTorrent.exe" /RECOVER

For each instance you must have a different port specified in uTorrent and forwarded in the router...

You will also need to check or manually add firewall rules for each version.

Run the shortcut and you should be good to go.
I believe I even ran each as a different user to keep things separated in windows.

B
bixtool
Posts: 11
Joined: 08 Sep 2012, 16:03

Re: Fully Automated Media Center

Post by bixtool »

gmcclelland wrote:Well, fancy that. I must have just not realised that. Thanks for that though.

I can't seem to get uTorrent to run a script after the torrent finishes either. No luck. :P
Do you have 32bit as well as 64bit java installed?

utorrent only uses the 32bit java runtime.
RekiM
Posts: 2
Joined: 01 Oct 2012, 23:13

Re: Fully Automated Media Center

Post by RekiM »

bixtool wrote: I'm not sure about the script, but you can run two instances of utorrent: one for movie downloads and one for tv downloads. You can specify different Run Program strings for each application.
I've used it in the past.
Thanks for the tip. I'll look into that if there's no other option within the script.
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Fully Automated Media Center

Post by rednoah »

You should be able to quite easily modify the script with those updated. Just look for the rename(...) calls and override the output:"...", format:"..." values the way you want.
:idea: Please read the FAQ and How to Request Help.
warioguy64
Posts: 4
Joined: 01 Oct 2012, 11:19

Re: Fully Automated Media Center

Post by warioguy64 »

Hi rednoah,

I have been using your script (with the vbscript) for a couple of days now and its been working like a dream. But I have one last teensy problem.
It seems that some torrents like to abbreviate the downloaded RAR files that come with the torrent. (for example; torrent name:The Hangover Part 2, extracted file name TH2.mkv) which results in the movie being extracted in the utorrent Downloads folder and not in the TV/Movie folders. The same happens with talk shows (like Conan, David Letterman, Daily Show etc.)
Do you know how to fix this?

Thanks in advance.
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Fully Automated Media Center

Post by rednoah »

Run the cmd manually with those parameters. Unpacking always extracts to its current location. It should extract to rar-parent-folder/rar-filename/*, it'll only be moved/copied as part of the renaming. Maybe that last part failed because of not being able to make sense of the input?
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Fully Automated Media Center

Post by rednoah »

1. If you specify the standard --lang ja argument it'll carry into the script, for subtitles and renaming. If you only want japanese subs but english episode titles you'll need to hard-code it in the script.

2. Nope, because you really should seed your stuff. :P Anyway, doesn't utorrent have something for that, like auto-remove if it's finished seeding?

3. Haha!! What's the filename? Just "Bolt"? I've got no idea how it'll get from here to "A Complete History Of My Sexual Failures (2008)" :D

-non-strict should make the strict more lenient = makes things work in much more cases, but risk of mismatches is higher as well

--conflict skip|override is for what should happen if the move/copy-destination file already exists, i.e. you downloaded the same episode twice (maybe HD the second time around)

* since that movie got completely messed up I suppose it's hash mismatch in the OpenSubtitles database. Usually it helps identify movies regardless of the filename... you can try what happens if you run the script on an empty file with the exact same name as your Bolt movie file, that way we can see if it's really the moviehash that's messing things up.

EDIT: With future releases I'm gonna try and throw out OpenSubtitles moviehash lookup for movie detection.
:idea: Please read the FAQ and How to Request Help.
ramsundaram
Posts: 24
Joined: 13 Oct 2012, 18:32

Re: Fully Automated Media Center

Post by ramsundaram »

sam829 wrote:

Code: Select all

filebot -script "C:\Program Files\Filebot\watcher.groovy"
Just add the full path to 'watcher.groovy'.
So it should be:

filebot -script "[fullpath & script file name]" fn:[filename] [...other options]

What I am asking is what goes into "fn:"

Ram

EDIT: Sorry, I found the answer to this in another post on the forums. It's either "-script [local filename] or fn:[online script name]"

Thanks.
Last edited by ramsundaram on 14 Oct 2012, 04:48, edited 1 time in total.
Post Reply