utorrent-postprocess not working?

Any questions? Need some help?
Post Reply
dinsfire64
Posts: 2
Joined: 11 Feb 2013, 06:35

utorrent-postprocess not working?

Post by dinsfire64 » 11 Feb 2013, 06:47

So I love using FileBot to organize my media and make it look as nice as possible. Today I started to automate the process with the utorrent-postprocess and ran into an issue.

I am using transmission-daemon as my torrent client and am calling the filebot script with the following bash file:

Code: Select all

#!/bin/bash
filebot --log all -script fn:utorrent-postprocess --output "/media/externalHD" --action copy --conflict override -non-strict --def artwork=n "ut_dir=$TR_TORRENT_DIR/$TR_TORRENT_NAME" "ut_kind=multi" "ut_title=$TR_TORRENT_NAME" >> /home/dinsfire/scripts/filebot.log
So here's the problem. The script is successfully called, but nothing is actually done. It successfully gets the show name and attempts to query TheTVDb, but never actually copies the file. Here is the output:

Code: Select all

Parameter: artwork = n
Parameter: ut_dir = /media/externalHD/Torrents/[HorribleSubs] Sword Art Online - 01 [720p].mkv
Parameter: ut_kind = multi
Parameter: ut_title = [HorribleSubs] Sword Art Online - 01 [720p].mkv
Input: /media/externalHD/Torrents/[HorribleSubs] Sword Art Online - 01 [720p].mkv
[HorribleSubs] Sword Art Online - 01 [720p].mkv [series: Sword Art Online, movie: null]
Group: [tvs:Sword Art Online, mov:null, anime:null] => [[HorribleSubs] Sword Art Online - 01 [720p].mkv]
Rename episodes using [TheTVDB]
Auto-detected query: [Sword Art Online]
Done ?(?????)?
So when I run the script manually everything works properly and it is magical.

Code: Select all

[email protected]:~/scripts$ filebot -script fn:utorrent-postprocess --output "/media/externalHD" --action copy --conflict override -non-strict --def artwork=y "ut_dir=/media/externalHD/Torrents/[HorribleSubs] Sword Art Online - 01 [720p].mkv" "ut_kind=multi" "ut_title=[HorribleSubs] Sword Art Online - 01 [720p].mkv"
Parameter: artwork = y
Parameter: ut_dir = /media/externalHD/Torrents/[HorribleSubs] Sword Art Online - 01 [720p].mkv
Parameter: ut_kind = multi
Parameter: ut_title = [HorribleSubs] Sword Art Online - 01 [720p].mkv
Input: /media/externalHD/Torrents/[HorribleSubs] Sword Art Online - 01 [720p].mkv
[HorribleSubs] Sword Art Online - 01 [720p].mkv [series: Sword Art Online, movie: null]
Group: [tvs:Sword Art Online, mov:null, anime:null] => [[HorribleSubs] Sword Art Online - 01 [720p].mkv]
Rename episodes using [TheTVDB]
Auto-detected query: [Sword Art Online]
Fetching episode data for [Sword Art Online]
[COPY] Rename [/media/externalHD/Torrents/[HorribleSubs] Sword Art Online - 01 [720p].mkv] to [/media/externalHD/TV Shows/Sword Art Online/Season 1/Sword Art Online - S01E01 - World of Swords.mkv]
Processed 1 files
Fetching artwork for /media/externalHD/TV Shows/Sword Art Online/Season 1 from TheTVDB
Fetching /media/externalHD/TV Shows/Sword Art Online/poster.jpg => {id=914040, BannerMirror=http://thetvdb.com/banners/, BannerPath=posters/259640-2.jpg, BannerType=poster, BannerType2=680x1000, Language=en, Rating=7.5714, RatingCount=7}
Fetching /media/externalHD/TV Shows/Sword Art Online/banner.jpg => {id=916002, BannerMirror=http://thetvdb.com/banners/, BannerPath=graphical/259640-g2.jpg, BannerType=series, BannerType2=graphical, Language=en, Rating=9.0000, RatingCount=2}
Fetching /media/externalHD/TV Shows/Sword Art Online/fanart.jpg => {id=914041, BannerMirror=http://thetvdb.com/banners/, BannerPath=fanart/original/259640-1.jpg, BannerType=fanart, BannerType2=1920x1080, Colors=|44,42,43|36,34,35|255,255,255|, Language=en, Rating=6.6000, RatingCount=5, SeriesName=false, ThumbnailPath=_cache/fanart/original/259640-1.jpg, VignettePath=fanart/vignette/259640-1.jpg}
Fetching /media/externalHD/TV Shows/Sword Art Online/Season 1/poster.jpg => {id=939015, BannerMirror=http://thetvdb.com/banners/, BannerPath=seasons/259640-1-2.jpg, BannerType=season, BannerType2=season, Season=1, Language=en, Rating=6.0000, RatingCount=1}
Banner not found: /media/externalHD/TV Shows/Sword Art Online/Season 1/banner.jpg / season:seasonwide
Fetching /media/externalHD/TV Shows/Sword Art Online/clearart.png => {type=clearart, id=19672, url=http://assets.fanart.tv/fanart/tv/259640/clearart/sword-art-online-50247eaa1d55d.png, lang=en, likes=1}
IOException: Server returned HTTP response code: 403 for URL: http://assets.fanart.tv/fanart/tv/259640/clearart/sword-art-online-50247eaa1d55d.png
Done ヾ(@⌒ー⌒@)ノ
The only thing that I can think of is transmission-daemon runs under it own user, but I have checked the permissions for all the folders and everything that it uses.

Running xbmcbuntu (based off 12.10) and here is the sysinfo data:

Code: Select all

FileBot 3.3 (r1412)
JNA Native: 3.5.0
MediaInfo: java.lang.UnsatisfiedLinkError: Unable to load library 'mediainfo': libzen.so.0: cannot open shared object file: No such file or directory
7-Zip-JBinding: OK
Extended Attributes: OK
GVFS: OK
OpenJDK Runtime Environment 1.7.0_09
32-bit OpenJDK Client VM
Linux (i386)
Done ヾ(@⌒ー⌒@)ノ
Thanks in advance! It's late and I'm running out of ideas :P

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

Re: utorrent-postprocess not working?

Post by rednoah » 11 Feb 2013, 06:55

Make sure to redirect stdout AND stderr
That output doesn't make sense because it's only stdout, without all the errors that have been written to stderr. I'm assuming the transmission-daemon user doesn't have write priviledges to your external drive.
:idea: Please read the FAQ and How to Request Help.

dinsfire64
Posts: 2
Joined: 11 Feb 2013, 06:35

Re: utorrent-postprocess not working?

Post by dinsfire64 » 11 Feb 2013, 07:23

Thank you for the prompt reply!

I did not realize that you were using sterr for logging purposes, I did search for documentation on the log flag but I didn't turn up any results on how to properly use the logs.

Anyway the external drive is mounted with ntfs-3g's defaults and anyone can read/write to it. I also ran the manual command as debian-transmisssion and it copied/renamed as it should.

You are correct about the permissions being an issue though, but in the wrong place. Here is the new log.

Code: Select all

Feb 11, 2013 1:16:20 AM net.sourceforge.filebot.Main initializeCache
WARNING: java.io.IOException: Failed to create cache dir: /.filebot/cache/0
java.io.IOException: Failed to create cache dir: /.filebot/cache/0
	at net.sourceforge.filebot.Main.initializeCache(Unknown Source)
	at net.sourceforge.filebot.Main.main(Unknown Source)

Parameter: artwork = n
Parameter: ut_dir = /media/externalHD/Torrents/[HorribleSubs] Sword Art Online - 01 [720p].mkv
Parameter: ut_kind = multi
Parameter: ut_title = [HorribleSubs] Sword Art Online - 01 [720p].mkv
Input: /media/externalHD/Torrents/[HorribleSubs] Sword Art Online - 01 [720p].mkv
Feb 11, 2013 1:16:36 AM net.sourceforge.filebot.mediainfo.MediaInfo <clinit>
WARNING: Failed to preload libzen
Feb 11, 2013 1:17:08 AM net.sourceforge.filebot.media.MediaDetection detectMovie
WARNING: OpenSubtitles: Disk store path can't be created: /.filebot/cache/default
[HorribleSubs] Sword Art Online - 01 [720p].mkv [series: Sword Art Online, movie: null]
Group: [tvs:Sword Art Online, mov:null, anime:null] => [[HorribleSubs] Sword Art Online - 01 [720p].mkv]
Rename episodes using [TheTVDB]
Auto-detected query: [Sword Art Online]
ExecutionException: net.sf.ehcache.CacheException: Disk store path can't be created: /.filebot/cache/default
Done ?(?????)?
Now the question is that why is it having trouble accessing the .filebot folder? The log mentions that it is trying to go to /.filebot instead of ~/.filebot, is that just how filebot logs or is it trying to access the root drive with a .filebot folder?

Thanks again!

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

Re: utorrent-postprocess not working?

Post by rednoah » 11 Feb 2013, 07:34

That startup script is setting things up like this:

Code: Select all

-Dapplication.dir=$HOME/.filebot
Is $HOME empty for the transmission-daemon user??
:idea: Please read the FAQ and How to Request Help.

Post Reply