[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.
kloaknet
Posts: 335
Joined: 23 Jul 2014, 08:52

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

Post by kloaknet » 28 Jan 2015, 17:28

Me again ;)

I noticed that the show 12 monkeys had the name monkeys only for the sub checking. Didnt bother, guess I grabbed them manually, but I noticed this post: http://nzbget.net/forum/viewtopic.php?f ... 728#p11714 maybe it helps?

About the addic7ed login part, It helps for when you want to set the sign for the music notes to #, the music note, or something else, when you are logged in. That must be why the stuff from podnapisi returen 'atm' with 'tm' in superscirpt, and the addic7ed stuff for me has the music note in it.

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

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

Post by l2g » 30 Jan 2015, 13:59

kloaknet wrote:I noticed that the show 12 monkeys had the name monkeys only for the sub checking. Didnt bother, guess I grabbed them manually, but I noticed this post: http://nzbget.net/forum/viewtopic.php?f ... 728#p11714 maybe it helps?
Thanks Kloaknet, I'll try to have a look at it this weekend if i can.
kloaknet wrote:About the addic7ed login part, It helps for when you want to set the sign for the music notes to #, the music note, or something else, when you are logged in. That must be why the stuff from podnapisi returen 'atm' with 'tm' in superscirpt, and the addic7ed stuff for me has the music note in it.
This went over my head a bit... i'm not sure what you mean. When i browse the website manually, i can fetch anything without an account. So if there is something the login makes easier, i'm sure it can still be backported to work without a sign-in too. Can you give me an example of something that doesn't work with a login vs one without? I tried both versions of the scripts on a few shows, and it appears to work okay in both cases.

As for podnapisi part of your comment; this is also over my head! lol (sorry); can you justify what you mean a bit further here so i can look into it too for you?

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

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

Post by kloaknet » 30 Jan 2015, 16:25

when logged in to addic7ed, this page: http://addic7ed.com/panel_edit_profile.php give you the option to define what kind of marking you like for the music note:

♪ or ¶ or # or * (also the -- can be replaced by ...)

By default addic7ed seems to return the ♪ so that would mean I dont need the login. (so there is no need to add the login back :oops: )

but I did some digging, and it seems that at podnapisi they also embed the ♪ (when using notepad, but on my player its something different: . Still when stuff is grabbed from podnapisi it returns a a™. Must be the encoding type I guess :roll:

another question is about the show the americans. Subliminal doesnt find any subs on addi7ed and podnapisi based on the filename like The.Americans.2013.SX1E0X.720p.HDTV.X264-DIMENSION.mkv for the whole season. I guess its because the show name used is The.Americans.2013, and the sub sites use The Americans.

and again no hurry to fix stuff ;), I can do it manually too!

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

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

Post by kloaknet » 31 Jan 2015, 15:45

Got a little update on the music notes:

some files from addic7ed have the ANSI encoding, others have UTF-8 w/o BOM (according Notepad++) in the ANSI the notes appear just fine, with the other file format, they appear like ♪. So its something on the sub providers end.

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

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

Post by l2g » 01 Feb 2015, 22:10

Kloaknet: try fetching from the nokarma branch (no tag release for it yet) (commit). It doesn't tackle your 12 monkeys issue thing with the numbers. i haven't looked into that yet. Could you provide me with a filename i can use for that one? even PM me one?

The fix i did however will stop appending the year to the end of series names. I may have broke something else by doing this, so i can roll back. The next step will be doing a dual query... query once with the year in the series name and if it fails to find anything, query without. But keep in mind; even this is a iffy fix. Series like 'The Flash' will pull results for 'The Flash S0101' differently then 'the Flash 2014 S0101' on Addic7ed. So if we play too much in this area, what's going to happen is your going to match against 2 possible lists later on. Sorry to ramble so much; hopefully this is making sense. Your thoughts?

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

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

Post by kloaknet » 02 Feb 2015, 17:42

The fix i did however will stop appending the year to the end of series names. I may have broke something else by doing this, so i can roll back. The next step will be doing a dual query... query once with the year in the series name and if it fails to find anything, query without. But keep in mind; even this is a iffy fix. Series like 'The Flash' will pull results for 'The Flash S0101' differently then 'the Flash 2014 S0101' on Addic7ed. So if we play too much in this area, what's going to happen is your going to match against 2 possible lists later on. Sorry to ramble so much; hopefully this is making sense. Your thoughts?
About the year stuff, it's important to somehow use the year as an identifier, there are numerous shows with the same name and only different year. This means you need to sort of assign scores to the matching of the file names. Then there are release groups that forget to include the year, so even the filename could be the wrong show...

But what about this (assigning scores to files):

sending The.Flash.2014.SXXEXX to subliminal.
searching for show The.Flash.2014 <- most obvious one based on file name, should be a reason for the year addition.
- no hit, continue search for show The.Flash. (without year)
- 1 hit, compare length show name length, the better the length match lower a penalty on the score (difference in length is penalty)
- no multiple hits possible, I hope? :?
Search results for show The.Flash:
- no hit, bad luck, no show, go to next provider and hope for the best.
- 1 hit, great could be the correct one!, but assigning penalty on the score, because there is no 2014 in it (minus 4 based on length)
- multiple hits :shock:, apparently there is another show with same name, but different year, take the one with the shortest show name (i.e. without year extension), but assigning penalty on the score, because there is no 2014 in it (minus 4 based on length) (maybe even choose closest year)

Do this check for multiple sub providers and include show names length scan, and define a score based on how exact the show. And finally get the sub with the best score

I think the scoring might need to be separated from the hdtv 720p group matching score you currently use maybe?

For the 12 monkeys show, I googled some like these:
12.Monkeys.S01E03.720p.HDTV.x264-KILLERS
12.Monkeys.S01E03.Cassandra.Complex.1080p.WEB-DL.DD5.1.H.264-BS
12.Monkeys.S01E01.FRENCH.HDTV.x264-LiBERTY

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

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

Post by l2g » 04 Feb 2015, 13:55

kloaknet wrote:But what about this (assigning scores to files):
I think it's a fantastic idea!
It will take me some time because this has to happen in the subliminal-core again, I'll have to build some smarts into it allowing it to detect a date (specifically a year) at the end of the file name. and try again after stripping it off. Which means I'll also revert the change i made already back and have the date placed back onto these series.

The nice thing with Subliminal is it caches the results; so to scan for multiple series names just means scanning the cache twice (instead of once); so it'll be really fast!
kloaknet wrote:For the 12 monkeys show, I googled some like these:
12.Monkeys.S01E03.720p.HDTV.x264-KILLERS
12.Monkeys.S01E03.Cassandra.Complex.1080p.WEB-DL.DD5.1.H.264-BS
12.Monkeys.S01E01.FRENCH.HDTV.x264-LiBERTY
Thanks, i should have Googled myself, but i just assumed it was a specific file name that might have been acting up on you; clearly it's all of them. I'll have to tackle this as a different issue.

I'll be a little slow implementing this; but I'll post in here again when i do (taking Hugbug's suggestion that just updating the thread doesn't alert others who might also be interested).

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

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

Post by l2g » 18 Feb 2015, 02:33

Better late than never;

Added some smart parsing to TV Series (for just Addic7ed and Podnapisi). The date is carefully detected in TV Series and appropriately included in the site searching. This allows TV Series like 'The Flash 2014' to match correctly on Addic7ed (which also has 'The Flash' - minus the year identifying an older series). The same fix extracts the date from the TV Series and uses it as a separate search attribute for Podnapisi to help filter more accurate results. I did not apply anything like this on the other providers as they all seem to work as they did in the past.

you can fetch it here; it's part of the nokarma master branch only at this time. When or if i hear good feedback, i'll bundle it up as as a proper release.

Please let me know if anyone has any problems or comments with this new fix.

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

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

Post by l2g » 24 Feb 2015, 01:29

I pushed another update which allows you to force your subtitles to be re-encoded using an encoding of your choice. Hence you can force everything to be utf-8 or latin-1. Alternatively you can just leave it set to None to behave as it has in the past; that is... just use what is downloaded).

It now appears that recently Podnapisi only works if you create a user account for it; i will have to build this into the tool. I'm also getting a lot of "Max retries exceeded with url" messages which means i my also have to throttle the number of requests made per second to the server

Hopefully i'll have Podnapisi working again next week. If you use this as a provider, you'll need to create a user account. When i'm done, it will work similar to the way Addic7ed used to.

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

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

Post by kloaknet » 24 Feb 2015, 15:28

I just tested the new script, and got no issues with podnapisi yet, 4 files were checked, 2 subtitles downloaded, no errors. (got no other providers enabled at the moment)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest