View Full Version : [RELEASE] Sublight ("video") plugin - Download subtitles from Sublight website
Dan Dare
2009-05-18, 03:57
Video plugin to download subtitles from Sublight (http://www.subtitles-on.net/) website.
Big hand to macofaco (http://xbmc.org/forum/member.php?u=43284) (Sublight developer) for offering the service and his help in developing the plugin.
Screenshots:
my blog (http://dandar3.blogspot.com/2009/05/sublight-v10-xbmc-video-plugin.html);
Google Code wiki (http://code.google.com/p/dandar3-xbmc-addons/wiki/Sublight);
Download:
XBMC Zone (http://xbmczone.com/plugin_details.asp?id=98) (use XBMC Zone Installer (http://xbmczone.com/plugin_details.asp?id=66));
Google Code (http://code.google.com/p/dandar3-xbmc-addons/downloads/list?can=2&q=sublight&colspec=Filename+Summary+Uploaded+Size+DownloadCou nt) (use SVN Repo Installer (http://code.google.com/p/dandar3-xbmc-addons/wiki/HowToInstallUsingSVNRepoInstaller));
Changes :
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);
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.
Dan Dare
2009-05-18, 16:15
@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.
Unfortunately on Linux always crash and restart XBMC :(
Log: (look at after line 800)
http://xbmc.pastebin.com/m32e5123f
Dan Dare
2009-05-18, 18:47
@queeup
Thanks man, sorry to hear that guys, I'll have a look at that as well tonight.
macofaco
2009-05-18, 18:59
@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...
Dan Dare
2009-05-18, 19:11
@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:
macofaco
2009-05-18, 19:25
No problem, this is easy. It will be implemented this weekend and I will send you more details when it's done.
Dan Dare
2009-05-18, 19:29
Thanks man!
Very cool Dan Dare. I'm going to check it out when I have time.
Dan Dare
2009-05-19, 03:18
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...
Dan Dare
2009-05-19, 03:48
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...
macofaco
2009-05-19, 19:44
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/SublightUtility.asmx?op=GetFullVideoHash
WSDL: http://www.subtitles-on.net/SublightUtility.asmx?WSDL
If you have additional questions please ask.
Dan Dare
2009-05-19, 21:18
Thanks macofaco! pretty detailed, and quick I must say :-)
Shouldn't though the MD5 only be 16 chars long?!
macofaco
2009-05-19, 21:38
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).
Dan Dare
2009-05-20, 03:08
Thanks macofaco, works much better now!
@all
Just uploaded version 1.1, please let me know how does it work for you.
I just have it a try with a bunch of well know movies and it always gets zero results. Any idea?
I get a "Scripts Error" with every try. If I have some time I'll enable error logging and post the result.
Ver. 1.1 also crash and restart XBMC all the time on Linux :(
debug log:
http://xbmc.pastebin.com/m4d7c5cbc
Dan Dare
2009-05-20, 15:16
@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.
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 :)
whufclee
2009-05-20, 15:29
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!
Dan Dare
2009-05-20, 16:05
@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
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?
macofaco
2009-05-20, 18:57
@Dan Dare
I did not yet have time to test your plugin (I must first install XBMC :)
For now just one advice: SearchSubtitles3 method (http://www.subtitles-on.net/SubtitlesAPI2.asmx?op=SearchSubtitles3) 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)
Dan Dare
2009-05-20, 19:49
@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.
macofaco
2009-05-20, 20:21
@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)
Dan Dare
2009-05-20, 20:39
@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...
Dan Dare
2009-05-21, 03:11
@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.
I'm going to concert tour today. I'll look at it after i come back.
Wish me luck :)
Dan Dare
2009-05-21, 12:12
if you're playing, good luck :-)
macofaco
2009-05-23, 13:29
I tested it and it works (Windows Vista 64 bit, fresh install of newest XBMC) :)
I suggest following:
-at top of list should be linked subtitles sorted by downloads DESC, following unlinked subtitles sorted by downloads DESC
-linked subtitles should be visually different from unlinked (color or text which says "unlinked" or something similar)
-Season + Episode information for TV series
Otherwise you did very good job!
Hi!
Nice work.
But the plugin is working only if you have a video locally stored on XBOX (on internal disk). If you select video from smb share then it does not work and returns error on plugin.
And it would be nice if user could select preferred language.
macofaco
2009-05-23, 14:35
Language can be selected. Check http://dandar3.blogspot.com/2009/05/sublight-v10-xbmc-video-plugin.html (second screenshot)
Sorry did not know that. Will try later.
About SMB share. It is also possible to write to the folder on SMB if you have set the permissions.
Otherwise it would be also nice if you could select the folder where should Sublight plugin save the subtitles.
Dan Dare
2009-05-24, 18:16
@macofaco
Thanks for your for feedback, glad you liked it.
Trouble is to be able to display the second label (column) on the right (with downloads & cds) I had to enable the genre sorting, which obviously controls how the entry are sorted (asc or desc). I might be able to do something though, as in prefix the "linked" entries with something like "[L]" or "[Linked]" which should make them appear hmmm probably at the botom, I'll think about it. I might be able to do something with colors though for the second column.
I was also thinking to move the movie name to the top right corner (some skins like PMIII are able to display that) and display in the list the release, might be more useful, we'll see how it goes.
I don't have any seasons / episodes, but what I could do is get the information and display it in the Movie Info panel (on an entry press "i" key). If you have an example I might change a version so you can try it.
Thanks again for your help!
Dan Dare
2009-05-24, 18:20
@illiac4
I don't know about the SMBs I thought if XBMC is able to browse for the file it will return the URL and I can use that to read the file - I might check it sometime, I don't share files over the network.
For the subtitle location, I was thinking to add a propery (btw, see the Plugin Settings, that's where you can select the prefered languages) where to save the subtitles with 3 options - movie dir, ask (you are presented with a dialog to navigate to the save location) or the XBMC subtitle custom directory (http://xbmc.org/wiki/?title=Videos_Settings#Subtitles), sometime soon, I don't know when...
This crashes xbmc whenever I select a video file unfortunately :( (linux)
Dan Dare
2009-05-26, 15:12
@slight
Using version 1.1? Xbmc version? Linux flavour/version? please report the issue at http://dandar3-xbmc-addons.googlecode.com/ so I can keep of them.
Someone reported that same before I might have to install a Linux and try it on I guess...
Vampirebat
2009-05-26, 23:23
very nice plugin its functioning flawlessly on vista 32 ty.
my copy of casino royal is labeled 007 - Casino Royale.avi the sub downloaded was named Casino Royale(2006).srt
currently it will DL subs but it doesnt rename them to match my media files name and thus when i play a movie i have to search the movie folder and force it to load the subs alternately i can rename them manually to make them load automattically but does sublight have the option to rename the .srt to the medias name?
if it does not i would like to add that as a feature request if possible.
and if it does already how would i go about enabling it?
Dan Dare
2009-05-27, 02:00
@Vampirebat
Thanks for your feedback - it's on the list (http://code.google.com/p/dandar3-xbmc-addons/issues/detail?id=3), hopefully having a stab at it this weekend, i'll keep you posted.
Vampirebat
2009-05-27, 03:42
awesome
really glad to hear it and ty for the fast reply.
keep up the good work.
Dan Dare
2009-05-27, 15:19
thanks Vampirebat, it helps if you have users asking for things :-)
Sorry for my late response on my earlier comment about an error result on the XBOX. I've had to reinstall XBMC twice, then I unexpectedly came across an XBOX that's better than the one I had and configured that one. Hens the delay... :)
When I select a movie file to search subtitles for I get an error. I've enabled error logging and searched for the lines where the error occurs. Somehow Sublight can't find the file I selected earlier event hough the path is correct. I'm running the 20678 SVN version for the XBOX. The new XBOX and fresh installation generates the exact same result as the XBOX installation on my old XBOX.
15:18:13 M: 14618624 NOTICE: Traceback (most recent call last):
15:18:13 M: 14618624 NOTICE: File "Q:\plugins\video\Sublight\default.py", line 46, in ?
15:18:13 M: 14618624 NOTICE:
15:18:13 M: 14618624 NOTICE: plugin.Main()
15:18:13 M: 14618624 NOTICE: File "Q:\plugins\video\Sublight\resources\lib\sublight_s earch.py", line 52, in __init__
15:18:13 M: 14618624 NOTICE:
15:18:13 M: 14618624 NOTICE: video_hash_md5 = sublight_utils.calculateMD5VideoHash(movieFullPath )
15:18:13 M: 14618624 NOTICE: File "Q:\plugins\video\Sublight\resources\lib\sublight_u tils.py", line 45, in calculateMD5VideoHash
15:18:13 M: 14618624 NOTICE:
15:18:13 M: 14618624 NOTICE: f = open(filename, mode="rb")
15:18:13 M: 14618624 NOTICE: IOError
15:18:13 M: 14618624 NOTICE: :
15:18:13 M: 14618624 NOTICE: [Errno 2] No such file or directory: 'smb://bram:****@NAS1/Films/A Scanner Darkly/A.Scanner.Darkly[2006]DvDrip[Eng]-aXXo.avi'
15:18:13 M: 14618624 NOTICE:
15:18:13 M: 14618624 ERROR: Scriptresult: Error
Dan Dare
2009-05-27, 20:01
@Bram77
There's a few issues/enhancement requests going on at the same time here, can you please create an issue at http://code.google.com/p/dandar3-xbmc-addons/issues/list and post a debug xbmc.log as well, with a few details like what XBMC distribution are you using etc so I can try to replicate it. From what it seems it's not able to open the file from a Windows share, is that right? might be a bug in the SVN build, might be the code I'm using to open the file, we'll see, thanks.
I've submitted the bug including the xbmc.log.
I've tried selecting several video files, all on the network. Some files are on a NAS, some on my Linux machine and some on my girlfriends Window XP machine. I've tried video files from every possible source all resulting in the same error. All the files I've tested are playing in XBMC nicely and are not corrupted.
Dan Dare
2009-05-28, 15:13
Thanks Bram77, I'll look at this soon.
i tried it on gentoo linux 64-bit -- crashes with any movie file i select.
But sounds like a very nice application, looking forward to use it and being merged in xbmc eventually would be nice :D
Dan Dare
2009-05-29, 19:36
@sike420
Good thing you mentioned Linux x64, just looking at the XBMC 9.04.1 release notes:
http://xbmc.org/blog/2009/05/27/xbmc-9041-released/
[LINUX] Some plugins were crashing on 64bit
might want to try that and let me know how it works, thanks.
Dan Dare
2009-05-30, 22:51
v1.2, see the first post - going back to the old xbmc.Player().play() when no hash can be found, may lock again, i've tried it all day though on Windows XBMC 9.04.1, hopefully it got fixed...
I have tested it. Well too bad that it is still not usable for network videos (on NAS or other network computers) like Bram77 has also mentioned. It always return script error.
So it is usable only on computer but on XBOX most people uses one of the network connections to read the video.
Are you planing to look also into that problem?
TNX
Dan Dare
2009-06-01, 00:26
I did but I couldn't find an explanation, i just posted on the forums hopefully someone will come back, if not we need to talk it further to an XBMC Trac ticket.
http://xbmc.org/forum/showthread.php?t=51926
Wonderful update Dan Dare. To bad it always locks up when there are no results returned. Sporadically it also locks up even when there there are results. I do hope you are still planning to add a search by filename? Thank you for your work.
Dan Dare
2009-06-01, 14:51
@Sora
Is that on Xbox? I believe I already found a fix for that, coming today - forcing to use DVD Player not only that it doesn't lock (uhuu!) but it does the playing in the background you don't even notice it...
Unfortunately it's on XBMC for Windows .rev 20720 if I remember correctly. I can post a full debug log tonight if you are interested.
Dan Dare
2009-06-01, 20:17
I've been testing XBMC 9.04.1 on Windows (r20672) all today, in fairness with only a couple movies though... Please do, if you can.
Dan Dare
2009-06-02, 02:52
@Sora
I've made a few changes, can you please get v1.3 using the SVN Repo Installer (not released yet on XBMC Zone).
I found that forcing to use DVDPlayer does not seem to lock XBMC on Xbox and I'm just thinking the way I was calling player.play() and immediately player.stop() it may be possible that the Python thread went on past the stop and somehow messed up the internal player statuses... I've introduced a pause of up to 3 seconds to wait for the video to start first and then stop if, hopefully it will fix the issue on Windows as well.
if you could try again with the same video you tried earlier and let me know how it goes, thanks.
I'll give it a try later today. Sorry for the debug log. I was going to post it but it was around midnight when I was done with my work for today so I didn't feel like booting up my HTPC. Thanks for the update tough.
Dan Dare: Will there be a working version of this for Linux?
Dan Dare
2009-06-05, 17:31
@Jaco2k
It should work on Linux as it is, try it on and see how does it work for you.
There is a known issue, logged a XBMC Trac bug ticket as well, see below for more details
http://code.google.com/p/dandar3-xbmc-addons/issues/detail?id=4
@Jaco2k
It should work on Linux as it is, try it on and see how does it work for you.
There is a known issue, logged a XBMC Trac bug ticket as well, see below for more details
http://code.google.com/p/dandar3-xbmc-addons/issues/detail?id=4
Yeps that's about what I am experiencing with a similar setup :(
So... will follow the trac report and this thread in the hope it gets fixed.
Plugin starts but crashes XBMC when trying to fetch subtitles.
@Dan
Im having a similar problem of Dora , my xmbc is running on Win XP , last version of XBMC e Sublight Plugin (1.3).
But every time that I search a film a have 2 problem :
1 - I Never find a subtitles
2 - After returns no subtitles freezes XBMC (Looking the code I saw every time that you try to create the OK dialog freezes. I comment and it works without alert that not exist subtitles )
thank in advance
idioteque
2009-06-07, 16:07
@Dan
Im having a similar problem of Dora , my XBMC is running on Win XP , last version of XBMC e Sublight Plugin (1.3).
But every time that I search a film a have 2 problem :
1 - I Never find a subtitles
2 - After returns no subtitles freezes XBMC (Looking the code I saw every time that you try to create the OK dialog freezes. I comment and it works without alert that not exist subtitles )
thank in advance
I have the same thing
XBMC freezes and never finds any subtitles (since version 1.1)
Dan Dare
2009-06-08, 00:37
@MarcosX
Interesting find, thanks for that. Can you please try with v1.35 - although it might still lock it might be able to find some subtitles though.
Also, can both of you please confirm the XBMC version you're using?
@Dan
My Installed Version is XBMC_for_Windows-9.04.1-repack
Im travelling now. But I will try the new version tomorrow morning.
Dan Dare
2009-06-08, 01:14
That's I've been using as well on XP SP3, I don't know what to say. Try the version 1.35 as well, produce a debug log (http://xbmc.org/wiki/?title=HOW-TO_submit_a_proper_Bug_Report), maybe I can work something with that, thanks.
Same thing with version 1.35 (no subtitles and freezes). Im using XP SP3 too.
At sublight_search.py
#
# No subtitles found...
#
if len(subtitles) == 0 :
#dialog = xbmcgui.Dialog() - Locks here !!
#dialog.ok("Sublight", xbmc.getLocalizedString(30304))
# End of directory...
xbmcplugin.endOfDirectory( handle=int( sys.argv[ 1 ] ), succeeded=False )
I will send the log as soon as possible. My PC´s power supply blows up after test.:sad:
Any news on the samba shares problem?
Dan Dare
2009-06-09, 00:53
@MarcosX
Can you please confirm something for me please? Can you move the xbmcplugin .endOfDirectory() line before the dialog lines and enable those back and see if it locks again? I'm just hoping that might solve the problem. Tip: duck when running the test :)
@Bram77
No news on that, sorry.
@Dan
Worked OK , thanks.
But I cant find a subtitle ? Exist some kind of expression ?
All of my videos are using filename = movie (year).mkv .
Example: Quantum of Solace (2008).mkv
Att.
Dan Dare
2009-06-10, 00:26
Thanks MarcosX, I'll make a change sometime this week, hopefully it will fix the problem on Linux as well...
Check with the Sublight application, if that is able to find your subtitles, might be some sort of a bug in my code, otherwise I can't do much sorry...
@Dan
I changed code here and now its working ....
in sublight_utils.py
def SearchSubtitles(self, sessionId, videoHash, language1, language2, language3):
# Build request XML...
requestXML = """<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<SearchSubtitles3 xmlns="http://www.subtitles-on.net/">
<session>%s</session>
<videoHash>%s</videoHash>
<title>%s</title>
<year xsi:nil="true" />
<season xsi:nil="true" />
<episode xsi:nil="true" />
<languages>
%s
%s
%s
</languages>
<genres>
<Genre>Movie</Genre>
<Genre>Cartoon</Genre>
<Genre>Serial</Genre>
<Genre>Documentary</Genre>
<Genre>Other</Genre>
<Genre>Unknown</Genre>
</genres>
<rateGreaterThan xsi:nil="true" />
</SearchSubtitles3>
</soap:Body>
</soap:Envelope>""" % (sessionId,
videoHash,
"The Dark Knight",
"<SubtitleLanguage>%s</SubtitleLanguage>" % language1,
( "<SubtitleLanguage>%s</SubtitleLanguage>" % language2, "" ) [ language2 == "None" ],
( "<SubtitleLanguage>%s</SubtitleLanguage>" % language3, "" ) [ language3 == "None" ] )
Dan Dare
2009-06-10, 21:32
@MarcosX
You passed in the movie title, but usually the filename is not a clean movie title, try putting as title The Dark Knignt (2008) and you might not get any replies.
The original intention was to add a new entry in the main menu called "search by movie name", where it basically presents you with a keyboard control and asks for the movie title, does the search by name and then asks you where to save the subtitles or save them directly into XBMC custom subtitle not sure.
Now I'm just thiking is that since you've already selected the movie name, maybe when is cannot find a movie using the video hash data, maybe ask you whether you want to search by title and present you with the keyboard with the movie name already in there, you can clean it up or type it again, whichever you prefer (ok, maybe I could do some cleaning up as in replacing dots with spaces and things like that)...
What you guys think?
I trust you :) just hope someone find Linux crash reason.
@Dan
I think the plugin have to work the same way of IMDB scrappers.
Reading the XBMCs document is suggested to use filaneme = MOVIE NAME (YEAR) or TVSHOW - SxxExx
The XBMC automatically retrieves the informantion from IMDB.
Why not use with the same way ? Get movie name and set MOVIE parm. Get Year and set Year parm.
In case not found , open the dialog to change the criteria.
In future, why not start the process automatic like the scrappers IMDB?
Dan Dare
2009-06-11, 13:49
@MarcosX
That might work, thanks, I'll see if that logic can be accessed from Python - I wouldn't like to rewrite all that logic again in Python.
This works on Xbox or not?
Dan Dare
2009-06-16, 20:07
@w3__
Do you want me to come over and try it on your xbox? :) Works fine on mine...
What about the Linux fix? ;) Any plans/estimate for that?
This works on Xbox or not?
It doesn't work with smb shares. There are probably very little people who store their media files on the XBOX, so in most cases....no....it won't work on the XBOX. I'm not sure if there are problems with samba shares on other platforms.
Does anyone know what the exact problem is, so I can try and address it somehow?
Yeah that's my situation. Would love to see SMB support there!
Actually I think this whole plugin really makes more sense as an integrated part of XBMC than something standalone in my video plugins folder?
Dan Dare
2009-06-17, 01:40
@Jaco2k
I haven't got time to try anything on Linux again and the TRAC thread is still there (http://xbmc.org/trac/ticket/6679) if you feel like posting your comments. In fact I even broke my grub loader with installing W7 RC last week, maybe I'll have sometime this weekend to fix it and try some more. I'll have a go maybe with a new SVN release as well, maybe it got fixed in XBMC, we'll see.
I'm running the most recent SVN build (for XBOX), always....no fixes yet :)
@Jaco2k
I'll have a go maybe with a new SVN release as well, maybe it got fixed in XBMC, we'll see.
Save your time - still borked ;)
...about adding something to the already logged error, well... no point in me saying "me too" :)
Dan Dare
2009-06-18, 02:43
@Bram77
Have you defined the shares as public (no username/password)? you might try to do that and see how it works. I think there's some problem in how the networks credentials are being used with Python programs.
Dan Dare
2009-06-18, 02:46
@Jaco2k
Lemme try it sometime this weekend - planning to make things easier and use EasyBCD to add the Linux boot entry and save me some time, I'll keep you posted.
rasmuskarlsen
2009-06-22, 23:09
How excactly does this works!?
Have updates XBMC to latest SVN...
Have downlaoded latest Sublight thourg SVN-Repo...
I have now found the plugin in Video Plugins menu... have tryed to search for a movie name, ex. "21" But when selectning the movie, all text on the screen disapers, and i can only see det "background-config image"... Neither can i push any buttons... So i have to restart XBMC! Any clues!?
abusharif
2009-06-23, 14:12
Yepp same issues here....it just hangs and does nothing until you restart xbmc :(
(latest version). Previous versions worked so-so, but they never hung.
Dan Dare
2009-06-23, 20:21
@abusharif, @rasmuskarlsen
Sorry guys, I'm only supporting it with the SVN builds for Xbox, on the other platforms only the XBMC 9.04.1 release.
Dan Dare
2009-07-05, 17:48
Good news for Linux users, I've applied a workaround that should avoid crashing XBMC when searching by movie hash - you might be missing OpenSubtitles results, but at least it works.
To complement the search by hash a new option was added to search by movie title - you will still have to browse for a file, it will try to clean up the name and detect the title and year (thanks to queeup and credit going to FlexGet), asks the webservice for similar titles, presents you with a list of results to choose from and does the search by title. If no titles returned by the webservice it will ask to correct the title yourself.
Enjoy.
macofaco
2009-07-05, 18:17
I tested it on Windows Vista and works for me!
My only comment is that maybe you could automatically display "Search by movie title..." when "Search by movie file..." returns no results. I hope this version will work also for Linux users.
Dan Dare
2009-07-05, 18:32
@macofaco
:-) I was thinking about that, basically to follow the way you implemented in the Sublight app. But for now I think it's best to keep them separate, see that it works fine for everyone and then merge them together.
Maybe in a way where if it doesn't find any results when searching by hash to follow up and do the title search logic.
Had some problems on Linux not only with the player.Play() but also with array.fromfile(), had to change the logic in there, but it seems to work fine now.
Thanks for your help and feedback.
I'm still unable to use the plugin because of the smb shares problem. The OpenSubtitles plugin does seem to be able to work with smb shares though! Even though I get an error about the availability of the OpenSubtitles database, it does not seem related to the smb share.
http://xbmc.org/forum/showthread.php?t=49749
Dan Dare
2009-07-05, 22:19
@Bram77
Please post the problem with OpenSubtitles plugin to the other thread. If you are having problems with this one, please post your xbmc.log at pastebin and I can have another look (http://www.xbmc.org/wiki/index.php?title=HOW-TO_Submit_a_Proper_Bug_Report)
Dan Dare
2009-07-05, 23:28
Wow, I'm on a roll today! :laugh:
The new "Search for playing movie" should work pretty much for everyone and it does a full blown search using the hash as well as the movie title & year (if you used a scraper to get the movie info before looking for subtitles, which most people do anyways...).
macofaco
2009-07-07, 20:11
Where are comments from Linux users? :)
Dan Dare
2009-07-08, 01:07
I guess that could mean it's working, people don't usually post when things are working fine :) Or maybe the two Linux users just didn't have the time to try it :)
Hi!
I hope now it is SMB time to attack and resolve that long present problem ;)
Dan Dare
2009-07-08, 18:38
@illiac4
Well, unfortunatelly I can't help much with that - if I would have the time I'd love to get the sources and suggest code patches to Team XBMC, but unfortunatelly I don't have it...
But I what I could suggest is maybe use the local custom subtitle directory and change accordingly the setting in the Plugin Settings, or maybe even trying an FTP setup instead of SMB, might work better (for Windows I would suggest installing Filezilla Server).
macofaco
2009-08-15, 10:15
Dan Dare, could you please in one of future releases change web service url from http://www.subtitles-on.net/SubtitlesAPI2.asmx to http://www.sublight.si/SubtitlesAPI2.asmx ?
Dan Dare
2009-08-15, 14:34
@macofaco
No problem, I will that this weekend and release it soon.
100.000 users and 40.000 hashed, not bad, well done!
macofaco
2009-08-15, 15:30
Thank you!
Yes, numbers are increasing. This is also why I switched to new server!
Hi!
Is it possible to use the logic or. better to say handling of the subtitles like the script Subtitles_osd does? As far as i could see it can also handle the SMB shares.
Cheers
Dan Dare
2009-08-16, 19:31
I can't seem to download the Subtitles_OSD script, I've just asked Amet to upload to XBMCZone.com - I'll have a look a it and see how it does it.