[PP-Script / Scan-Script] Automatically Fetch Subtitles

Share your scripts or request scripts with specific features.
Forum rules
Please keep the forum clean - one topic per script. Questions not related to a specific script should be posted in Support forum.
hugbug
Developer & Admin
Posts: 7542
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [PP-Script] Automatically Fetch Subtitles

Post by hugbug » 27 Aug 2014, 14:11

In the downloaded archive there is sometimes another archive, which contains subtitles (usually in sub/idx format, not .srt). NZBGet doesn't unpack second level archives.
This is indeed not related to the subliminal script.

Ayla
Posts: 21
Joined: 26 Aug 2014, 17:02

Re: [PP-Script] Automatically Fetch Subtitles

Post by Ayla » 27 Aug 2014, 15:06

Thanks for the reply guys, I'll se if it happens with other downloads.

Any ideas on the second issue (the re-downloading of certain subtitles)?

l2g
Posts: 228
Joined: 27 Jun 2014, 22:13
Contact:

Re: [PP-Script] Automatically Fetch Subtitles

Post by l2g » 27 Aug 2014, 15:39

Ayla wrote:Any ideas on the second issue (the re-downloading of certain subtitles)?
Ayla, below is copied and pasted from your previous email (reordered in line with the events as they took place).
  1. INFO Wed Aug 27 2014 11:30:03 Subliminal: Downloading subtitle <PodnapisiSubtitle [en]> with score 30 into u'/Volumes/Promise/Movies/The Rover (2014)/T.R.2014.720p.WEB-DL.x264-ETRG.en.srt'
  2. INFO Wed Aug 27 2014 11:30:04 Subliminal: Listing subtitles with provider 'opensubtitles' for video <Movie [u'The Rover', 2014]> with languages set([<Language [und]>])
  3. INFO Wed Aug 27 2014 11:30:04 Subliminal: Found 0 subtitles
  4. INFO Wed Aug 27 2014 11:30:04 Subliminal: Matched 1 possible subtitle(s) for T.R.2014.720p.WEB-DL.x264-ETRG.mkv
  5. ERROR Wed Aug 27 2014 11:30:04 Subliminal: Could not locate subtitle previously fetched!
I can not say for sure what is happening unless you enable 'Debug' mode for me and capture the same trace. The logs almost speak contradictory to what your saying though; they're reporting that no subtitles were found, yet your claiming it's downloading them again. Just analyzing the results you got, the following could be happening:
  • You're actually successfully downloading the subtitle as mentioned above (log entry #1 above) and it is getting placed in some location I never considered to check in my script (a bug). My script will take the (.srt) file downloaded and pair it up with the movie it goes with. But the error (log entry #5 above) tells us that nothing was found. Are you positive content is being 're-downloaded'? Is it even present to begin with? If an SRT file is already found (with the same name as the movie), it gracefully skips over those.
  • There was a bug in an earlier version of this script where i removed the srt file after it was downloaded (it was a stupid bug, i can't justify it any more than that). But reguardless, i'm quite confident i fixed it. IF however, this is actually what is happening to you, the deletion takes place right between log entry #4 and entry #5 above. I can't say for sure until you enable debug mode.
The one thing that has me scratching my head is log entry #2 and #3. I think this is related to a fix i tried to do that prevents subs from downloading twice. I'll look into it (it may even be related to the issue your having; i'm not sure). If the subs download successfully, there is no reason for the script to keep looking at other providers. Either way, it's not fetching a second time which is good :)

Ayla
Posts: 21
Joined: 26 Aug 2014, 17:02

Re: [PP-Script] Automatically Fetch Subtitles

Post by Ayla » 28 Aug 2014, 08:49

Thanks for the reply, I have enabled debug and here's a link for an excerpt of the debug log (I can only see the last 1000 lines, so it doesn't seem to show anything regarding 'The Rover (2014)', I'm seeing a lot of other errors though.

When I look at the modification date on the subtitle .srt for that movie, it's updated every 30 minutes, that's why I think that a new subtitle is downloaded on every run.

http://pastebin.com/itwD76QR

EDIT: OK, I got some info from the log file (searched for 'Rover'):
http://pastebin.com/Y7xfBSFd
Last edited by Ayla on 28 Aug 2014, 09:06, edited 1 time in total.

hugbug
Developer & Admin
Posts: 7542
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [PP-Script] Automatically Fetch Subtitles

Post by hugbug » 28 Aug 2014, 08:57

Ayla wrote:I can only see the last 1000 lines
More data is in the log-file (if enabled).

Ayla
Posts: 21
Joined: 26 Aug 2014, 17:02

Re: [PP-Script] Automatically Fetch Subtitles

Post by Ayla » 28 Aug 2014, 09:08

hugbug wrote:
Ayla wrote:I can only see the last 1000 lines
More data is in the log-file (if enabled).
Thanks I opened the log file and searched, updated the other post with a new link.

It still seems that it downloads the .srt for The Rover, the modification date is 5 minutes ago (after the last run).

kloaknet
Posts: 335
Joined: 23 Jul 2014, 08:52

Re: [PP-Script] Automatically Fetch Subtitles

Post by kloaknet » 28 Aug 2014, 13:56

@Ayla, maybe it is a bit much to check for new subs every 30 minutes. It could result in being banned fromthose subtitle sites. I search only once a day, somewhere before I get home. No need for more checks.


@i2g:

found a little issue again :D

Code: Select all

info	Thu Aug 28 2014 15:47:06	Subliminal: [DEBUG] get_files('/share/Series') with 11 filter(s)
info	Thu Aug 28 2014 15:47:06	Subliminal: [DEBUG] get_files('share/Downloads') with 11 filter(s)
info	Thu Aug 28 2014 15:47:06	Subliminal: [DEBUG] get(config) SINGLE="yes"
info	Thu Aug 28 2014 15:47:06	Subliminal: [DEBUG] get(config) SCANDIRECTORIES="/share/Series/,/share/Downloads/"
but the Downloads folder is not scanned (files are not listed as for the series folder) tried it with and without space after the ','

Still no other issues with the series part ;)

EDIT: Its me! I dont have the folder /share/Downloads/ on my device, it is /share/Download? :oops:

This is the log with the wrong dir in the list, but no errors that the folder doesnt exist, but also, the series folder is not scanned:

Code: Select all

info	Thu Aug 28 2014 16:02:05	Subliminal: There were no files found.
info	Thu Aug 28 2014 16:02:05	Subliminal: [DEBUG] get_files('share/Series') with 11 filter(s)
info	Thu Aug 28 2014 16:02:05	Subliminal: [DEBUG] get_files('/share/Downloads') with 11 filter(s)
info	Thu Aug 28 2014 16:02:05	Subliminal: [DEBUG] get(config) SINGLE="yes"
info	Thu Aug 28 2014 16:02:05	Subliminal: [DEBUG] get(config) SCANDIRECTORIES="/share/Downloads/,/share/Series/"
info	Thu Aug 28 2014 16:02:05	Subliminal: [DEBUG] get(config) MAXAGE="48"
info	Thu Aug 28 2014 16:02:05	Subliminal: [DEBUG] get(config) VIDEOEXTENSIONS=".mkv,.avi,.divx,.xvid,.mov,.wmv,.mp4,.mpg,.mpeg,.vob,.iso"
info	Thu Aug 28 2014 16:02:05	Subliminal: Task ID assigned: 1
info	Thu Aug 28 2014 16:02:05	Subliminal: Script Mode: SCHEDULER
info	Thu Aug 28 2014 16:02:05	Subliminal: [DEBUG] Detecting possible script mode from: scheduler, postprocess
info	Thu Aug 28 2014 16:02:00	Subliminal: nzbget.conf(914): Option "StrictParName" is obsolete, ignored
info	Thu Aug 28 2014 16:02:00	Subliminal: nzbget.conf(488): Option "ReloadPostQueue" is obsolete, ignored
info	Thu Aug 28 2014 16:02:00	Subliminal: nzbget.conf(482): Option "ReloadUrlQueue" is obsolete, ignored
info	Thu Aug 28 2014 16:02:00	Executing scheduler-script Subliminal.py for Task1
info	Thu Aug 28 2014 16:01:01	Scheduler: unpausing download
info	Thu Aug 28 2014 16:01:01	nzbget 13.0 daemon-mode
Also did a check with the correct folder names, but only the first folder is scanned.

Ayla
Posts: 21
Joined: 26 Aug 2014, 17:02

Re: [PP-Script] Automatically Fetch Subtitles

Post by Ayla » 30 Aug 2014, 09:43

I'm getting a warning about lxml:

Code: Select all

Subliminal: NZBParse - Skipped; lxml is not installed
I have lxml installed with "pip install lxml" and I'm using OS X 10.9.4.

Maybe the script needs to know where to look for it on an OS X system?

l2g
Posts: 228
Joined: 27 Jun 2014, 22:13
Contact:

Re: [PP-Script] Automatically Fetch Subtitles

Post by l2g » 02 Sep 2014, 00:29

Sorry for the delays, i was gone for the long weekend
Ayla wrote:I'm getting a warning about lxml
Try opening a shell window and type to see if you get an error message.

Code: Select all

python -c "import lxml"
Alternatively, you could be right. Just to be safe, i added some more lxml backwards compatibility checking based on http://lxml.de/tutorial.html to this commit. This may or may not resolve your problem. It was just pushed a few minutes ago and only available on the master branch (at this time).

lxml requires 2 system librarys to work correctly. If pip successfully installed the python portion through pip, you're halfway there. See here. If your using a Mac it says you can do the following to haul in the extra packages as static objects:
:

Code: Select all

STATIC_DEPS=true sudo pip install lxml
It might be better though to correctly install libxml2 and libxslt though
kloaknet wrote:but the Downloads folder is not scanned (files are not listed as for the series folder) tried it with and without space after the ','
This is a ligit bug, but it was also fixed last week :). It's in the master branch. But what your describing 'does' exist in the 0.6.0 branch for sure (fixed here).

The problem was (with respect to your example is that this: SCANDIRECTORIES="/share/Downloads/,/share/Series/"
Becomes: ['/share/Downloads/', 'share/Series/'] instead of ['/share/Downloads/', '/share/Series/' ] (the slash prefixing share/Series is lost).

Edit: I just pushed all of the latest finds since 0.6.0 into an offical 0.7.0 release. (first post updated)

Ayla
Posts: 21
Joined: 26 Aug 2014, 17:02

Re: [PP-Script] Automatically Fetch Subtitles

Post by Ayla » 02 Sep 2014, 06:49

l2g wrote:Sorry for the delays, i was gone for the long weekend
Ayla wrote:I'm getting a warning about lxml
Try opening a shell window and type to see if you get an error message.

Code: Select all

python -c "import lxml"
Thanks for the reply,

That command doesn't produce any error messages.

I will try the latest version and see if it works with your new changes.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests