[RELEASE] Sublight ("video") plugin - Download subtitles from Sublight website

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
macofaco Offline
Sublight Admin
Posts: 27
Joined: Jan 2009
Reputation: 4
Post: #16
MD5 hash is 16 bytes long but because it is binary I convert it to hexadecimal string (every byte is converted to two hexadecimal characters).

For example:

Byte 0Xd5 is converted to string "d5" (two bytes), 0xff is converted to string "ff", and so on. This is also demonstrated in http://www.subtitles-on.net/?id=6 where you can see that 16 byte MD5 hash is represented as "18d5d8c1747b005aaa2800a18e81de97" (32 human readable characters).

Sublight - subtitle search utility
http://www.subtitles-on.net
find quote
Dan Dare Offline
http://www.xbmc4xbox.org
Posts: 1,039
Joined: Sep 2004
Reputation: 146
Post: #17
Thanks macofaco, works much better now!

@all
Just uploaded version 1.1, please let me know how does it work for you.
find quote
Sora Offline
Junior Member
Posts: 35
Joined: Dec 2008
Reputation: 0
Post: #18
I just have it a try with a bunch of well know movies and it always gets zero results. Any idea?
find quote
Bram77 Offline
Skilled Python Coder
Posts: 1,369
Joined: Feb 2008
Reputation: 32
Location: Netherlands
Post: #19
I get a "Scripts Error" with every try. If I have some time I'll enable error logging and post the result.

[Image: widget]

Please add to my reputation if you find my posts usefull (+/- button below posts)
Ubuntu 12.10 minimal XBMC auto-install script :: XBMControl :: Xbmc XBOX Skins :: XBMControl for Android :: Owner of Sudo Systems
find quote
queeup Offline
Posting Freak
Posts: 763
Joined: Feb 2009
Reputation: 16
Post: #20
Ver. 1.1 also crash and restart XBMC all the time on Linux Sad
debug log:
http://xbmc.pastebin.com/m4d7c5cbc
find quote
Dan Dare Offline
http://www.xbmc4xbox.org
Posts: 1,039
Joined: Sep 2004
Reputation: 146
Post: #21
@Sora
Try searching with the actual Sublight application and see if you get results.

@Bram77
Please do.

@queeup
Thanks for the log, I'll try it on Linux and see how it goes.
find quote
Bram77 Offline
Skilled Python Coder
Posts: 1,369
Joined: Feb 2008
Reputation: 32
Location: Netherlands
Post: #22
I've just f*cked up my XBMC installation on my xbox. So I'll have to reinstall. once that is complete I'll post my log Smile

[Image: widget]

Please add to my reputation if you find my posts usefull (+/- button below posts)
Ubuntu 12.10 minimal XBMC auto-install script :: XBMControl :: Xbmc XBOX Skins :: XBMControl for Android :: Owner of Sudo Systems
find quote
whufclee Offline
Fan
Posts: 318
Joined: Oct 2008
Reputation: 0
Location: Essex
Post: #23
It's working for me on the xbox nightly build (rev20445) pretty well. Only tried it on a few films, 2 of the newer ones had lots of results but 2 of the older classic ones came up with nothing. When it comes up with multiple results it just shows the film name for each download and no other information so it's a case of trial and error to find the correct subtitles - got subs for Transporter 3 in some foreign language, then one which just came up with weird numbers but third time lucky ENGLISH. Should this be the case or is it a little bug with xbox? Sorry I'm new to subtitle scripts/plugins, watched a couple of films lately which had foreign bits in them but had no subtitles so thought I'd try this out - pretty impressive stuff btw. Well done on this plugin I'm thinking this is going to be very useful to me now I know about it!
find quote
Dan Dare Offline
http://www.xbmc4xbox.org
Posts: 1,039
Joined: Sep 2004
Reputation: 146
Post: #24
@whufclee
Should try Sublight application (Windows, download from Sublight website) to check the results. The plugin for now only displays the language, the movie name & year, the number of downloads and number of "cds". I might be able to put some more info on the "Information" context menu entry / remote button since it's a video entry, let me know what you want to see. Do try it with Sublight and see what columns you find in there and I'm pretty sure I can get those in.

On the languages, see the plugin settings (right click the plugin, Plugin Settings) and select the languages you prefer - it allows for 3 languages, by default only English is enabled. It might be some problem in my plugin or some data on the Subglith website, either provide some more details here/screenshot or PM here or send me an email at dan.dar33 at gmail.com
find quote
Sora Offline
Junior Member
Posts: 35
Joined: Dec 2008
Reputation: 0
Post: #25
I think I've found why I'm not getting any results. When I search for "300" using the plugin or the client it works. However when I search for "300 (2006)" (all my movies are named this way) the plugin or the client returns zero results. Anything that can be done about this?
find quote
macofaco Offline
Sublight Admin
Posts: 27
Joined: Jan 2009
Reputation: 4
Post: #26
@Dan Dare

I did not yet have time to test your plugin (I must first install XBMC Smile

For now just one advice: SearchSubtitles3 method (http://www.subtitles-on.net/SubtitlesAPI...Subtitles3) returns "Subtitle" structures with all kind of information. Useful field is "IsLinked" which tells you if subtitle is synchronized with video (this link is done with Sublight client).

But please note:
-If "IsLinked" is false doesn't mean subtitle is not synchronized with video. It means that Sublight users did not yet "link" it with video (a lot of movies are not yet linked, but this number is increasing every day).
-If "IsLinked" is true also doesn't means subtitle is 100% synchronized with video (bad users can make invalid "links"). Such links are reported by other Sublight users and are removed by administrators.



(there are also web service methods for linking/voting/reporting movie links)

Sublight - subtitle search utility
http://www.subtitles-on.net
find quote
Dan Dare Offline
http://www.xbmc4xbox.org
Posts: 1,039
Joined: Sep 2004
Reputation: 146
Post: #27
@Sora
Currently the plugin finds the subtitle using the video data (MD5 hash of the first 5 MB of data), and that would guarantee that regardless of the name of the file, if anyone uploaded a subtitle for the same data, you will be able to find it.

Next on the list is to add another entry "Search by movie name" that if you used the first option and didn't find anything you can use this this, type in the movie name (a pain for Xbox users :-) and that will do the search by name. Obviosly there's less chances that the subtitles returned will match the video, but sometimes they do work fine - maybe sometime this weekend (MAYBE!)...

@Macofaco
Thanks for that, useful indeed. The "linking" is very useful, I might use all that information to display it to the user, their decision which one they choose.

The voting and linking, I'd love to do all that, but I think that's something that would probably be more suited to be built in somewhere in the video player or close to it, as the plugin will be generally used to search download and then try it in the video player, the leave the plugin. It's very unlikely that many people will return to vote or link the video to the subtitle... I might add the options if you want though, I do see the benefits of XBMC users contributing back to the information in the repository.
find quote
macofaco Offline
Sublight Admin
Posts: 27
Joined: Jan 2009
Reputation: 4
Post: #28
@Dan Dare

I also think that not many users would vote/report links from XBMC. I wrote about those methods just for information.

"Search by movie name" is of course interesting but I agree that it would be problematic for Xbox users. Maybe you should use "Suggest" feature from Sublight, where user enters few characters or words and application suggests him some movie titles. (Just an idea)

Sublight - subtitle search utility
http://www.subtitles-on.net
find quote
Dan Dare Offline
http://www.xbmc4xbox.org
Posts: 1,039
Joined: Sep 2004
Reputation: 146
Post: #29
@macofaco
I'll think about it - probably the best implementation would be something similar to what you have in Sublight, download the subtitle, ask the user whether they want to try them in the video player, let them watch it for a while, when they come back maybe ask whether the subtitle was right and then submit the link / vote.

Currently it downloads the subtitle, leaves them with the original file name and it's up to the user to go back to the video file, play it and select the subtitle - not quite leading them towards submitting the link / vote.

XBMC has a dialog where you can enter text, that's available for Xbox users as well, being one of them I know it can be pain cause have to use the controller / remote to navigate between keys :-) But what you say its interesting enough, people could type in partially a name of a movie and use the method to return close matches for them to choose from, I might use that with the name search next on the list...
find quote
Dan Dare Offline
http://www.xbmc4xbox.org
Posts: 1,039
Joined: Sep 2004
Reputation: 146
Post: #30
@queeup
I was hoping that I could run XBMC in Ubuntu in VirtualBox, but it probably lacks the video acceleration that XBMC needs, I don't know it just doesn't startup. I can't figure out what's the problem from the log you provided, there's only one error and that's in the middle of the log...

Judging from the my Windows log, it dies just before somewhere before returning (endOfDirectory).

01:12:18 T:3080 M:759873536 DEBUG: DIRECTORY::CPluginDirectory::WaitOnScriptResult- plugin returned successfully
01:12:18 T:928 M:759873536 INFO: Scriptresult: Succes
01:12:18 T:3080 M:759869440 DEBUG: Saving fileitems [plugin://video/Sublight/?action=search]

Did you get a message that there no subtitles found or something like that?

I also noticed messages that I don't have in my Windows build, they may be specific to Linux build...

DialogProgress::StartModal called (already running)!


@all
Anyone running it succesfully on Linux can you please confirm it works, thanks.
(This post was last modified: 2009-05-21 02:18 by Dan Dare.)
find quote
Post Reply