Kodi Community Forum
[RELEASE] OpenSubtitles OSD (Script) - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Subtitle Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=143)
+---- Thread: [RELEASE] OpenSubtitles OSD (Script) (/showthread.php?tid=56083)



- Bram77 - 2009-08-18

Do all skin files support v1.2b5?


- amet - 2009-08-18

Bram77 Wrote:Do all skin files support v1.2b5?

Yes, as in 1.11

Zeljko


- illiac4 - 2009-08-18

Hi!

Well much better now. It unzip to predefined folder on internal disk on XBOX.
But there are still few things which could be better.

1. When you first run the script it asks you for all the settings. But how to call this setup again to change settings?

2. I could test only sublight searching but it looks like it does not use the md5 hash, but it uses only file name to look up for the subtitle. I think the feature that makes sublight so special is ability to search with hash. Oh yeah and it could be also nice to change the searching name, if there is no hash in the database (so the user can change the searching name.)

3. Because of hash searching not working is also sync icon not helpful, which could be really nice feature.

4. As far as i know sublight is searching on many subtitles databases. So also on opensubtitles. Does when you select sublight as prefered search engine also searching or using opensubtitle database or not? It would be nice if both databases would be used.

Cheers


- amet - 2009-08-18

illiac4 Wrote:Hi!

Well much better now. It unzip to predefined folder on internal disk on XBOX.
But there are still few things which could be better.

1. When you first run the script it asks you for all the settings. But how to call this setup again to change settings?

2. I could test only sublight searching but it looks like it does not use the md5 hash, but it uses only file name to look up for the subtitle. I think the feature that makes sublight so special is ability to search with hash. Oh yeah and it could be also nice to change the searching name, if there is no hash in the database (so the user can change the searching name.)

3. Because of hash searching not working is also sync icon not helpful, which could be really nice feature.

4. As far as i know sublight is searching on many subtitles databases. So also on opensubtitles. Does when you select sublight as prefered search engine also searching or using opensubtitle database or not? It would be nice if both databases would be used.

Cheers


1. its on the first page. Run the script from scripts menu. Not OSD...

2. I am assuming you are on smb://, I have disabled hash search for smb... if you are willing to test with it enabled please let me know and I'll make it up.... I don't have smb to test with...sorry

3. same as above

4.as far as I know the Sublight uses its own data base... When script connects to Sublight it only searches their data base...It would be very easy to list results from both sites, but complicated to download them as two sites use totaly different way of search and download... I am not sure if its worth the effort. Not to mention it would take longer and if the Opensubtitles hangs, like it does sometimes, it would hang the whole script...

Zeljko


- macofaco - 2009-08-18

It is true that Sublight client searches subtitles from multiple sources. Its primary source is Sublight server, but it supports also other providers via its plugin framework. Btw, new versions of Sublight do not support OpenSubtitles.org anymore (because of some unresolved issues).

On the other hand, Sublight server offers subtitles ONLY from its own database.


- amet - 2009-08-18

macofaco Wrote:It is true that Sublight client searches subtitles from multiple sources. Its primary source is Sublight server, but it supports also other providers via its plugin framework. Btw, new versions of Sublight do not support OpenSubtitles.org anymore (because of some unresolved issues).

On the other hand, Sublight server offers subtitles ONLY from its own database.

Thanks for clearing it up

Zeljko


- revned - 2009-08-18

I really love this script, but I have one question. Is it possible to add support for the website http://www.bierdopje.com? They have a lot of subtitles for tv series in dutch and english, and because I'm dutch I use them a lot. It would be fantastic if I could download them from within XBMC.


- Bram77 - 2009-08-18

I think it would be more productive to add http://www.tvsubs.net/ instead, but I'm not sure if they are offering some kind of api. Parsing the website is a lot more work.


- ronie - 2009-08-19

hi there,

i'm running xbmc r22265 on ubuntu linux.
version 1.21 of the plugin doesn't return any subtitles for me.
it fails to find any subs on both opensutitles and sublight.

here's my Debug Log.


- amet - 2009-08-19

ronie Wrote:hi there,

i'm running xbmc r22265 on ubuntu linux.
version 1.21 of the plugin doesn't return any subtitles for me.
it fails to find any subs on both opensutitles and sublight.

here's my Debug Log.

Hi ronie,

The problem you are having is VideoOSD.xml is not sending enough arguments.

If you look at the VideoOSD.xml that I supplied as "hack" for Transparency! you will see 2 buttons

PHP Code:
            <control type="button" id="9040">
                <
description>DVD menu button</description>
                <
posx>50</posx>
                <
posy>220</posy>
                <
width>175</width>
                <
height>40</height>
                <
texturenofocus border="7">button-nofocus.png</texturenofocus>
                <
texturefocus border="7">button-focus2.png</texturefocus>
                <
label>Subtitle Download</label>
                <
font>font-20</font>
                <
textcolor>white</textcolor>
                <
align>center</align>
                <
onleft>999</onleft>
                <
onright>999</onright>
                <
onup>903</onup>
                <
ondown>9041</ondown>
                <
onclick>RunScript(special://home/scripts/OpenSubtitles_OSD/default.py, [MOVIE]$INFO[VideoPlayer.Title][/MOVIE])</onclick>
                
<visible>!IsEmpty(VideoPlayer.Title) + IsEmpty(VideoPlayer.TVShowTitle)</visible>
            </
control

will be visible when the movie is playing and will send the [MOVIE]$INFO[VideoPlayer.Title][/MOVIE] argument to the script when activating it.


PHP Code:
            <control type="button" id="9041">
                <
description>DVD menu button</description>
                <
posx>50</posx>
                <
posy>220</posy>
                <
width>175</width>
                <
height>40</height>
                <
texturenofocus border="7">button-nofocus.png</texturenofocus>
                <
texturefocus border="7">button-focus2.png</texturefocus>
                <
label>Subtitle Download</label>
                <
font>font-20</font>
                <
textcolor>white</textcolor>
                <
align>center</align>
                <
onleft>999</onleft>
                <
onright>999</onright>
                <
onup>9040</onup>
                <
ondown>904</ondown>
                <
onclick>RunScript(special://home/scripts/OpenSubtitles_OSD/default.py, [TV]$INFO[VideoPlayer.Season] $INFO[VideoPlayer.Episode] $INFO[VideoPlayer.TVshowtitle][/TV])</onclick>
                
<visible>!IsEmpty(VideoPlayer.TVshowtitle)</visible>
            </
control

Is active when TvShows are playing and sends [TV]$INFO[VideoPlayer.Season] $INFO[VideoPlayer.Episode] $INFO[VideoPlayer.TVshowtitle][/TV] argument to the script

Let me know if you need more info.

Zeljko


- illiac4 - 2009-08-19

Hi!

Yes it is true i'm using SMB share for movies. Of course i can test, if hash from SMB share is working. Just PM me a link or put beta link on the first page.

Strange but if i run the script from the script section it gives me error on runnig script like failed to run...... but running through OSD it works. This is why i aked for how to change the settings.

About 'Oh yeah and it could be also nice to change the searching name, if there is no hash in the database (so the user can change the searching name.)' can you implement this?

Cheers


- amet - 2009-08-19

illiac4 Wrote:Hi!

Yes it is true i'm using SMB share for movies. Of course i can test, if hash from SMB share is working. Just PM me a link or put beta link on the first page.

Strange but if i run the script from the script section it gives me error on runnig script like failed to run...... but running through OSD it works. This is why i aked for how to change the settings.

About 'Oh yeah and it could be also nice to change the searching name, if there is no hash in the database (so the user can change the searching name.)' can you implement this?

Cheers

http://opensubtitles-osd.googlecode.com/files/OpenSubtitles_OSD_v1.22.zip


Note: this is not tested...please, if you use it let me know your results

Quote:About 'Oh yeah and it could be also nice to change the searching name, if there is no hash in the database (so the user can change the searching name.)' can you implement this?

both services search by file name as well as hash.

if your file is called 10.TIHAY.avi for a movie that is called 10 Things I Hate About You it will find results if this file is added to your library. If it displays name of the movie on OSD it will search by that name.

if not it searches by file name and the results of a search will depend on how you named the movie file.

please send me your log about not being able to start it from scripts menu.



Zeljko


- illiac4 - 2009-08-19

Ok TNX i will test it in the afternoon.


- illiac4 - 2009-08-19

One thing. I still think that feature to manually enter/modify the name of the film would be nice because if you download something from the net the group who releases the movie always make some strange renaming (for ex. includes their name,....). So if you are accessing the file thought SMB you do not rename every move before you watch them (useful in case the hash is not working or. is not yet available).


Cheers


- amet - 2009-08-19

illiac4 Wrote:One thing. I still think that feature to manually enter/modify the name of the film would be nice because if you download something from the net the group who releases the movie always make some strange renaming (for ex. includes their name,....). So if you are accessing the file thought SMB you do not rename every move before you watch them (useful in case the hash is not working or. is not yet available).


Cheers

as I said, the search string is created from the name on the OSD.

for example: I have a movie "Twilight.[2008].PREMIERE.DVDRIP.XVID.[Eng]-DUQA.avi"

if the movie is in the library the search string is Name > Twilight, Year >2008

if the movie is not in a Library it will try and find out the name and year in which case it will be the same....

The "dvdrip", "hdtv", "cam" or so would be taken out of the search string

Quote:16:50:13 T:2963668992 M:2604666880 NOTICE: INFO: Service used: [Sublight]
16:50:13 T:2963668992 M:2604666880 NOTICE: INFO: File Path: [/Users/Amet/Movies/Twilight.[2008].PREMIERE.DVDRIP.XVID.[Eng]-DUQA.avi]
16:50:13 T:2963668992 M:2604666880 NOTICE: INFO: Search String: [Twilight]
16:50:13 T:2963668992 M:2604666880 NOTICE: INFO: Subtitle Folder: [/Users/Amet/Movies]
16:50:13 T:2963668992 M:2604666880 NOTICE: INFO: Language 1: [eng]
16:50:13 T:2963668992 M:2604666880 NOTICE: INFO: Language 2: [scc]

see the search string...thats what gets sent to the search server...

when the search results are returned it displays "59 subtitles found for "Twilight.[2008].PREMIERE.DVDRIP.XVID.[Eng]-DUQA.avi" "
The reason I left it there as the full name of the file is that I thought it's easier to match the subtitle if you know the real name of the file. It can be changed so it displays "Twilight (2008)" provided that you have the movie in Library.


searching for TvShows is a bit more complicated but if your TV show is displaying correctly in your library and the XBMC has recognized it as TvShow with season and episode name, it will create the appropriate search strings for OpenSubtitles and Sublight as they are not the same.

User input is doable but I just dont think its needed if you are using XBMC to its full potential.


Zeljko