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

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Dan Dare Offline
http://www.xbmc4xbox.org
Posts: 1,039
Joined: Sep 2004
Reputation: 146
Thumbs Up  [RELEASE] Sublight v1.8 ("video") plugin - Download subtitles from Sublight website
Post: #1
Video plugin to download subtitles from Sublight website.

Big hand to macofaco (Sublight developer) for offering the service and his help in developing the plugin.

Screenshots: Download: Changes :
  • v1.8 (30 April 2010):
    - Sublight API changes;
    - Calculate MD5 in smaller chunks (might benefit Xbox with large skins)
  • v1.7 (18 September 2009):
    - [xbox] if subtitle filename including language is too long, try again without language;
  • v1.6 (15 August 2009):
    - server moved to http://www.sublight.si;
  • v1.5 (5 July 2009) :
    - add "Search for playing movie";
  • v1.4 (5 July 2009):
    - workaround to avoid crashing XBMC on Linux (use GetFullVideoHash() method);
    - use movie name when searching (thanks to queeup, credits to FlexGet);
    - add option to search by title;
    - add language to the subtitle file name;
  • v1.35 (6 June 2009):
    - always use the full video hash;
    - not handling correctly empty text XML nodes;
  • v1.2 (30 May 2009):
    - allow to choose subtitles destination (movie directory or XBMC custom directory);
    - rename subtitle(s) to match video file(s);
    - when GetFullVideoHash not returning a video hash, fallback to xbmc.Player() method;
    - highlight (green) "linked" subtitles;
  • v1.1 :
    - alternate way of calculating the video hash (no need to play the video);
(This post was last modified: 2010-05-01 00:18 by Dan Dare.)
find quote
queeup Offline
Posting Freak
Posts: 762
Joined: Feb 2009
Reputation: 16
Post: #2
finally, thx man Smile
find quote
Bram77 Offline
Skilled Python Coder
Posts: 1,369
Joined: Feb 2008
Reputation: 32
Location: Netherlands
Post: #3
Great! I was unable to find the plugin with the SVN Repo Installer. But it installed fine with the XBMC Zone Installer.

I'm using the latest XBMC svn version for the XBOX. When I select a video file the file starts to play in the background (I can't see the video, but I can hear it) and I have to restart the XBOX to regain control over XBMC.

[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
Dan Dare Offline
http://www.xbmc4xbox.org
Posts: 1,039
Joined: Sep 2004
Reputation: 146
Post: #4
@Bram77

The SVN Repo Installer link in my first post here points to a wiki page that tells you how to access my source repository with the SVN Repo Installer - my plugins are not in the official SVN repository, well, for various reasons...

That sounds pretty bad - I've only tested it on Windows, it needs to play the video file to get the length in seconds (needed to calculate the unique video hash code to be able to find the correct subtitles), but it should stop it immediately - I will try it as well tonight and see if I can fix it, I believe Xbox uses mplayer as a default video player, while Windows uses DVDPlayer.

Thanks for letting me know.
find quote
queeup Offline
Posting Freak
Posts: 762
Joined: Feb 2009
Reputation: 16
Post: #5
Unfortunately on Linux always crash and restart XBMC Sad

Log: (look at after line 800)
http://xbmc.pastebin.com/m32e5123f
find quote
Dan Dare Offline
http://www.xbmc4xbox.org
Posts: 1,039
Joined: Sep 2004
Reputation: 146
Post: #6
@queeup
Thanks man, sorry to hear that guys, I'll have a look at that as well tonight.
find quote
macofaco Offline
Sublight Admin
Posts: 27
Joined: Jan 2009
Reputation: 4
Post: #7
@Dan Dare

If you are having troubles getting movie length I can write helper web service method which receives hash without movie length and returns you valid full hash.

This would not be big problem...

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: #8
@macofaco
Wow man, if you could do that would be great, as I won't have to stop the currently playing video. Users could actually leave the video playing, run the plugin (maybe I will even enhance it to look for subtitles for currently playing video later on) and that would allow them to download a subtitle, go back to full screen, load the subtitle, and if it doens't work and then come back and download the next one.

Let me know of the implementation details, and thanks a lot for your help! Nod
find quote
macofaco Offline
Sublight Admin
Posts: 27
Joined: Jan 2009
Reputation: 4
Post: #9
No problem, this is easy. It will be implemented this weekend and I will send you more details when it's done.

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: #10
Thanks man!
find quote
Sora Offline
Junior Member
Posts: 35
Joined: Dec 2008
Reputation: 0
Post: #11
Very cool Dan Dare. I'm going to check it out when I have time.
find quote
Dan Dare Offline
http://www.xbmc4xbox.org
Posts: 1,039
Joined: Sep 2004
Reputation: 146
Post: #12
You're welcome, Sora, but it's very likely it will lock-up for you as well.

Just tried it on Xbox and Windows and it locks most of the time when it plays the video to get the total time... Blush

I'm afraid we'll need to wait for macofaco's enhancement - until then I'll try to replicate it an maybe file a bug report or something...
find quote
Dan Dare Offline
http://www.xbmc4xbox.org
Posts: 1,039
Joined: Sep 2004
Reputation: 146
Post: #13
Hmmm, seems to only lock when the Player() object is called from the imported sublight_utils.py, if I move that directly in the sublight_search.py script, it almost doens't lock up at all...
find quote
macofaco Offline
Sublight Admin
Posts: 27
Joined: Jan 2009
Reputation: 4
Post: #14
I already managed to implement method GetFullVideoHash. It receives session and partial video hash (MD5 hash, it must be 32 characters long, more details http://www.subtitles-on.net/?id=6).

Method returns true on success, otherwise false (parameter GetFullVideoHashResult). Method also returns full hash which you can use in Search method (parameter bestMatchVideoHash). If method fails you also receive error description (parameter error).

Note: if there is no hash yet in database method returns true and bestMatchVideoHash is empty! False is returned only on errors!

Web service url: http://www.subtitles-on.net/SublightUtility.asmx
Method "GetFullVideoHash" details: http://www.subtitles-on.net/SublightUtil...lVideoHash
WSDL: http://www.subtitles-on.net/SublightUtility.asmx?WSDL

If you have additional questions please ask.

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: #15
Thanks macofaco! pretty detailed, and quick I must say :-)

Shouldn't though the MD5 only be 16 chars long?!
find quote
Post Reply