Rookie needs help with last steps of se

Support for Ubuntu and other Desktop Linux distributions
Post Reply
oldmike60
Posts: 18
Joined: 30 May 2016, 00:50

Rookie needs help with last steps of se

Post by oldmike60 »

Latest FB installed today according to Software Manager (the $10 version). Deluge starts a download into /mnt/media/Downloading. When done, the folder moves to /mnt/media/ToProcess. The folder has three files:

RARBG.com.txt
title.nfo
title.mkv

Then nothing more happens. I have scripts set up in Deluge:

Torrent added: /home/user/scripts/handleTorrent
Torrent complete: /home/user/scripts/deluge-postprocessing

I'm too ignorant re: Linux for directions as to processes to do: I need to know exactly what to type and where. I think I must be pretty close to working, just need something to get the system to take the next step of actually running Filebot.
oldmike60
Posts: 18
Joined: 30 May 2016, 00:50

Re: Rookie needs help with last steps of se

Post by oldmike60 »

Should have included:

Using Ubuntu 14.04
Torrent client is Deluge; I would post the version if I could find it
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

[deluge] Help with setting up the amc script

Post by rednoah »

1.
What does the output say if you run filebot -script fn:sysinfo?


2.
Did you make sure that your script is executable?
viewtopic.php?f=4&t=215#p3382

The first step of figuring out what's not working is to confirm that your script is actually called by deluge:
viewtopic.php?f=4&t=3067#p17142
:idea: Please read the FAQ and How to Request Help.
oldmike60
Posts: 18
Joined: 30 May 2016, 00:50

Re: Rookie needs help with last steps of se

Post by oldmike60 »

#1:

Code: Select all

FileBot 4.6.1 (r3315)
JNA Native: 4.0.1
MediaInfo: MediaInfoLib - v0.7.69
7-Zip-JBinding: 9.20
May 29, 2016 10:30:56 PM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
Chromaprint: fpcalc version 1.1.0 (/opt/filebot/fpcalc)
Extended Attributes: OK
GVFS: OK
Groovy Engine: 2.4.5
JRE: Java(TM) SE Runtime Environment 1.8.0_66
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 4 Core / 878 MB Max Memory / 25 MB Used Memory
OS: Linux (amd64)
Package: USC
Data: /root/.config/FileBot
uname: Linux MediaMike 3.19.0-43-generic #49~14.04.1-Ubuntu SMP Thu Dec 31 15:44:49 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Done ヾ(@⌒ー⌒@)ノ
oldmike60
Posts: 18
Joined: 30 May 2016, 00:50

Re: Rookie needs help with last steps of se

Post by oldmike60 »

I have an idea of then purposes are of #2 and #3, but I don't know what to do. The links describe doing things beyond my ability.
oldmike60
Posts: 18
Joined: 30 May 2016, 00:50

Re: Rookie needs help with last steps of se

Post by oldmike60 »

What if I add

echo "post processing" and

echo "torrent handling"

Will these pop up to tell me they ran?
oldmike60
Posts: 18
Joined: 30 May 2016, 00:50

Re: Rookie needs help with last steps of se

Post by oldmike60 »

I tried the echoes: nothing happened.
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Rookie needs help with last steps of se

Post by rednoah »

Did you redirect the output of "echo" to a file? I don't know if deluge makes the console output of scripts accessible anywhere. Probably not.

Have a look at the debug script:
https://github.com/filebot/plugins/blob ... h/debug.sh

It's running all sorts of commands and redirecting the output to /tmp so if the script is run the output will be stored in files in your /tmp directory.

First you try the script manually and see if it works (i.e. confirm output is stored in /tmp). Once you know that your script is working you set it up with deluge.

If it works from console, but not from deluge, then you will need to ask the deluge developers how to debug deluge issues. ;)
:idea: Please read the FAQ and How to Request Help.
oldmike60
Posts: 18
Joined: 30 May 2016, 00:50

Re: Rookie needs help with last steps of se

Post by oldmike60 »

No I did not know to send echo to a file. So I reran with {printenv > "/path/to/log.txt"} as the first line in both scripts and nothing popped up. If there is a file to look for, where would it be? I did a search for log.txt and no hits.
oldmike60
Posts: 18
Joined: 30 May 2016, 00:50

Re: Rookie needs help with last steps of se

Post by oldmike60 »

Debug script ran fine stand alone; files were created in /tmp. I deleted them, and am doing a torrent now with just the date test in {deluge-postprocessing}, then I'll run it again with the date debug in handletorrint.sh.
oldmike60
Posts: 18
Joined: 30 May 2016, 00:50

Re: Rookie needs help with last steps of se

Post by oldmike60 »

Deluge-postprocessing did not run. Trying handletorrent now.
oldmike60
Posts: 18
Joined: 30 May 2016, 00:50

Re: Rookie needs help with last steps of se

Post by oldmike60 »

handletorrent did not either, so going to the Deluge forum I guess. Thanks for your patience and help; I learned a lot here.
oldmike60
Posts: 18
Joined: 30 May 2016, 00:50

Re: Rookie needs help with last steps of se

Post by oldmike60 »

Completed files going to ToProcess. deluge-postprocess.sh and handleTorrent.sh both run (embedded flags write to /tmp file), but nothing happens; file just sits in Downloading and ToProcess. Here is the deluge-postprocess.sh text; I would post the handleTorrent.sh file but don't see how to upload it here.

#!/bin/sh

# Input Parameters
ARG_PATH="$3"
ARG_NAME="$2"
ARG_LABEL="N/A"

# Configuration
CONFIG_OUTPUT="$HOME/Media" # if this script is called by the deluge user, then $HOME will NOT refer to YOUR user home, but paths such as /var/lib/deluge instead

filebot -script fn:amc --output "$CONFIG_OUTPUT" --action duplicate --conflict skip -non-strict --log-file amc.log --def unsorted=y music=y artwork=y excludeList=".excludes" ut_dir="$ARG_PATH" ut_kind="multi" ut_title="$ARG_NAME" ut_label="$ARG_LABEL"
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Rookie needs help with last steps of se

Post by rednoah »

What's the console output of the filebot call?
:idea: Please read the FAQ and How to Request Help.
oldmike60
Posts: 18
Joined: 30 May 2016, 00:50

Re: Rookie needs help with last steps of se

Post by oldmike60 »

I dunno; where can I find it? Nothing comes to the screen.
oldmike60
Posts: 18
Joined: 30 May 2016, 00:50

Re: Rookie needs help with last steps of se

Post by oldmike60 »

I may be closer than I thought. I cleaned out {amc.log} and downloaded a TV show. The log indicates that it will not make a folder in /TV for the show because it already exists, but it does not. Here is the log

Run script [fn:amc] at [Mon May 30 08:36:20 PDT 2016]
Parameter: unsorted = y
Parameter: music = y
Parameter: artwork = y
Parameter: excludeList = .excludes
Parameter: ut_dir = /mnt/media/ToProcess
Parameter: ut_kind = multi
Parameter: ut_title = Veep.S05E06.HDTV.x264-KILLERS[ettv]
Parameter: ut_label = N/A
Using excludes: /home/mikec/Media/.excludes (512)
Input: /mnt/media/ToProcess/Veep.S05E06.HDTV.x264-KILLERS[ettv]/Veep.S05E06.HDTV.x264-KILLERS[ettv].mkv
Exclude: /mnt/media/ToProcess/Veep.S05E06.HDTV.x264-KILLERS[ettv]/Torrent-Downloaded-from-ExtraTorrent.cc.txt
Group: [tvs:veep] => [Veep.S05E06.HDTV.x264-KILLERS[ettv].mkv]
Rename episodes using [TheTVDB]
Auto-detected query: [Veep]
Fetching episode data for [Veep]
Stripping invalid characters from new path: TV Shows/Veep/Season 05/Veep - S05E06 - C**tgate
Skipped [/mnt/media/ToProcess/Veep.S05E06.HDTV.x264-KILLERS[ettv]/Veep.S05E06.HDTV.x264-KILLERS[ettv].mkv] because [/home/mikec/Media/TV Shows/Veep/Season 05/Veep - S05E06 - Ctgate.mkv] already exists
Processed 1 files
Fetching series artwork for [Veep] to [/home/mikec/Media/TV Shows/Veep/Season 05]
Generate Series NFO: Veep [237831]
Banner already exists: /home/mikec/Media/TV Shows/Veep/poster.jpg
Banner already exists: /home/mikec/Media/TV Shows/Veep/banner.jpg
Banner already exists: /home/mikec/Media/TV Shows/Veep/fanart.jpg
Banner already exists: /home/mikec/Media/TV Shows/Veep/Season 05/poster.jpg
Banner not found: /home/mikec/Media/TV Shows/Veep/Season 05/banner.jpg / season:seasonwide
Fanart already exists: /home/mikec/Media/TV Shows/Veep/clearart.png
Fanart already exists: /home/mikec/Media/TV Shows/Veep/logo.png
Fanart already exists: /home/mikec/Media/TV Shows/Veep/landscape.jpg
Fanart not found: /home/mikec/Media/TV Shows/Veep/Season 05/landscape.jpg / seasonthumb
Done ヾ(@⌒ー⌒@)ノ
oldmike60
Posts: 18
Joined: 30 May 2016, 00:50

Re: Rookie needs help with last steps of se

Post by oldmike60 »

Though that show did not exist, it was not the first time I downloaded it, so though maybe a history some where was fooling FB. So I just did a show I have never fetched and the AMC.LOG looks like it all happened just fine, except it did not actually create the folder nor a copy of the show under /TV. AMC.LOG:

Run script [fn:amc] at [Mon May 30 08:45:51 PDT 2016]
Parameter: unsorted = y
Parameter: music = y
Parameter: artwork = y
Parameter: excludeList = .excludes
Parameter: ut_dir = /mnt/media/ToProcess
Parameter: ut_kind = multi
Parameter: ut_title = The.Big.Bang.Theory.S09E24.HDTV.x264-LOL[rarbg]
Parameter: ut_label = N/A
Using excludes: /home/mikec/Media/.excludes (514)
Input: /mnt/media/ToProcess/The.Big.Bang.Theory.S09E24.HDTV.x264-LOL[rarbg]/the.big.bang.theory.924.hdtv-lol.mkv
Exclude: /mnt/media/ToProcess/The.Big.Bang.Theory.S09E24.HDTV.x264-LOL[rarbg]/the.big.bang.theory.924.hdtv-lol.nfo
Exclude: /mnt/media/ToProcess/The.Big.Bang.Theory.S09E24.HDTV.x264-LOL[rarbg]/RARBG.com.txt
Group: [tvs:the big bang theory] => [the.big.bang.theory.924.hdtv-lol.mkv]
Rename episodes using [TheTVDB]
Auto-detected query: [The Big Bang Theory, The Big Bang]
Fetching episode data for [The Big Bang Theory]
Fetching episode data for [Eureka! The Big Bang Query]
[DUPLICATE] Rename [/mnt/media/ToProcess/The.Big.Bang.Theory.S09E24.HDTV.x264-LOL[rarbg]/the.big.bang.theory.924.hdtv-lol.mkv] to [/home/mikec/Media/TV Shows/The Big Bang Theory/Season 09/The Big Bang Theory - S09E24 - The Convergence Convergence.mkv]
Processed 1 files
oldmike60
Posts: 18
Joined: 30 May 2016, 00:50

Re: Rookie needs help with last steps of se

Post by oldmike60 »

I notice that the log indicates to target to be /home/mikec/Media/TV Shows/, but my path is /home/mikec/media/TV/, that is, lower case in "media" and "TV" not "TV SHows." I opened handleTorrents.sh and did a search: "TV Shows" is not found, so don't know where it is getting that. But I will make a new folder with that name and rerun.
oldmike60
Posts: 18
Joined: 30 May 2016, 00:50

Re: Rookie needs help with last steps of se

Post by oldmike60 »

Made a new folder {TV Shows}; still nothing.
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Rookie needs help with last steps of se

Post by rednoah »

It's working perfectly fine according to the logs. You will find your organised media in the "Media" folder in your home directory.
:idea: Please read the FAQ and How to Request Help.
oldmike60
Posts: 18
Joined: 30 May 2016, 00:50

Re: Rookie needs help with last steps of se

Post by oldmike60 »

And so it is (they are)!! I have had my folders in the /mnt/media/ path not /home/media. Should I move Downloading, ToProcess, etc, all to /home/media/? I note that the files in ToProcess do not get deleted. I can change the Plex pointers easy enough.
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Rookie needs help with last steps of se

Post by rednoah »

That's up to you. The output root is set in your post process script. I recommend that input and output be on the same file system so that it can duplicate the file without duplicating the data (I.e. Hardlink).
:idea: Please read the FAQ and How to Request Help.
oldmike60
Posts: 18
Joined: 30 May 2016, 00:50

Re: Rookie needs help with last steps of se

Post by oldmike60 »

All is working perfectly with Deluge and Plex now. Many, many thanks. Let me buy your lunch!

Mike
Post Reply