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)



- frater - 2009-10-02

Amet Wrote:the only reason the XBMC cant't put the sub in the same movie folder is if the movie is on SMB drive or if the movie is in the RAR archive.Those are the only two reasons why the script would ask for the Custom folder.

I dont have any issues using the latest SVN builds on ATV, OSX and Win but I also dont have any RAR files or SMB drive.

Zeljko
But don't you want to try to get that working? It would help a lot.
Is it a limitation in the python engine or in XBMC?
Maybe you could ask for an extra feature or help from the devs...
I assume you're entitled to some sort of premium support having contributed to the project and all....?


- amet - 2009-10-02

frater Wrote:But don't you want to try to get that working? It would help a lot.
Is it a limitation in the python engine or in XBMC?
Maybe you could ask for an extra feature or help from the devs...
I assume you're entitled to some sort of premium support having contributed to the project and all....?

EDIT: apparently we can write to SMB drives but it has to have write permissions.I will look into it. the script should first check if it can write to a specific folder, if not, ask for the custom folder.

As for the RAR files, I will see if there is anything that can be done.I first need to get some movies in RAR format Smile

Zeljko


- Bram77 - 2009-10-02

Amet Wrote:I am aware of that, it can happen for two reasons, one is that sometimes subtitle file is not actual the correct sub file(error from the web site or similar), other the more frequent error is the XBMC not activating the sub file correctly and it throws error in a Debug Log. I have done endless tests to try and figure out why and when it happens and as far as I can see it is totally random. I would download same file 15-20 times without problems and sometimes it will have and error on the first try.

I have no idea how to replicate the problem as it is not consistent, that's what makes it so difficult to trace.

One file that didn't extract was a zip. It was downloaded, but couldn't be extracted by the script somehow. I tried deleting it from the XBOX and downloading it again with the same result. Seems consistent Smile

I'm using the Rapier skin with the SVN version of XBMC for the XBOX of today.


- amet - 2009-10-02

Bram77 Wrote:One file that didn't extract was a zip. It was downloaded, but couldn't be extracted by the script somehow. I tried deleting it from the XBOX and downloading it again with the same result. Seems consistent Smile

I'm using the Rapier skin with the SVN version of XBMC for the XBOX of today.

what happens if you manually unzip it? maybe send me the zip file that fails and I will have a look. you still have my e-mail?

Zeljko


- GizmoID - 2009-10-03

Zeljko vec se gubim polako u ovome... :-( .Moze li pomoc? Baci neki mail da ne trujem temu ovdje. Moj je [email protected]. Hvala unaprijed.


- Bram77 - 2009-10-03

You've got mail Amet Smile


- frater - 2009-10-03

Amet...
I was wondering why your script can't find a subtitle for the TV-show "Cupid.(2009).S01E02.avi"

It may be the year between brackets, but I need these to get it properly scraped at thetvdb.com
http://www.thetvdb.com/?string=cupid&searchseriesid=&tab=listseries&function=Search

If I go to their website I can find subtitles for that show....


Code:
16:11:19 T:1928 M:388874240  NOTICE: INFO: Manual Search : [False]
16:11:19 T:1928 M:388874240  NOTICE: INFO: Service : [OpenSubtitles]
16:11:19 T:1928 M:388874240  NOTICE: INFO: SL Service : [False]
16:11:19 T:1928 M:388874240  NOTICE: INFO: PN Service : [False]
16:11:19 T:1928 M:388874240  NOTICE: INFO: OS Service : [True]
16:11:19 T:1928 M:388874240  NOTICE: INFO: Search String: [Cupid+(2009)+S01E02]
16:11:19 T:1928 M:388874240  NOTICE: INFO: Temp?: [True]
16:11:19 T:1928 M:388874240  NOTICE: INFO: File Path: [smb://MYBOOK2/Public/Shared Videos/TV/Cupid.(2009)/Cupid.(2009).S01/Cupid.(2009).S01E02.avi]
16:11:19 T:1928 M:388870144  NOTICE: INFO: Year: [0]
16:11:19 T:1928 M:388870144  NOTICE: INFO: Subtitle Folder: [L:\Shared Videos\TV\Cupid.(2009)\Cupid.(2009).S01\]
16:11:19 T:1928 M:388870144  NOTICE: INFO: Language 1: [dut]
16:11:19 T:1928 M:388870144  NOTICE: INFO: Language 2: [eng]
16:11:19 T:1928 M:388870144   DEBUG: ------ Window Init (special://home/skin/Rapier/720p/script-OpenSubtitles_OSD-main.xml) ------
16:11:19 T:1928 M:388870144    INFO: Loading skin file: special://home/skin/Rapier/720p/script-OpenSubtitles_OSD-main.xml
16:11:19 T:1928 M:388845568   DEBUG: Load special://home/skin/Rapier/720p/script-OpenSubtitles_OSD-main.xml: 7.29ms
16:11:19 T:1928 M:388845568   DEBUG: Alloc resources: 7.46ms (7.38 ms skin load)
16:11:19 T:1928 M:388845568   DEBUG: CGUIMediaWindow::GetDirectory (?)
16:11:19 T:1928 M:388845568   DEBUG:   ParentPath = []
16:11:19 T:1928 M:388845568   ERROR: DIRECTORY::CDirectory::GetDirectory - Error getting ?
16:11:19 T:1928 M:388845568   ERROR: CGUIMediaWindow::GetDirectory(?) failed
16:11:19 T:1928 M:388845568  NOTICE: INFO: onInit
16:11:19 T:1928 M:388907008  NOTICE: INFO: XBOX System: []
16:11:19 T:1928 M:388898816  NOTICE: INFO: Search by hash and name Cupid.(2009).S01E02.avi
16:11:20 T:5980 M:388898816   DEBUG: Thread 5980 terminating (autodelete)
16:11:20 T:1928 M:388874240  NOTICE: INFO: File Hash: [52cf1590a90c8164]
16:11:20 T:1928 M:388845568  NOTICE: INFO: File Size: [367053744]
16:11:20 T:1928 M:388415488   DEBUG: LoadLibraryA('ws2_32')
16:11:20 T:1928 M:388415488   DEBUG: Win32DllLoader::Load(C:\WINDOWS\system32\ws2_32.dll)
16:11:20 T:1928 M:388415488   DEBUG: LoadLibrary('ws2_32.dll') returning: 0B904440
16:11:20 T:1928 M:388878336  NOTICE: INFO: Token:[o8fldjqta78sic197jb5ai29i3]
16:11:21 T:1928 M:388878336  NOTICE: INFO: Hash and Name Search:
16:11:23 T:5924 M:388861952   DEBUG: Thread 5924 terminating (autodelete)
16:11:24 T:5848 M:388845568   DEBUG: Thread 5848 terminating (autodelete)
16:11:32 T:2440 M:388730880   DEBUG: SDLKeyboard: scancode: 1, sym: 27, unicode: 27, modifier: 0
16:11:32 T:2440 M:388730880   DEBUG: CApplication::OnKey: 61467 pressed, action is 10
16:11:32 T:1928 M:388730880   DEBUG: ------ Window Deinit (special://home/skin/Rapier/720p/script-OpenSubtitles_OSD-main.xml) ------
16:11:32 T:1928 M:388739072   ERROR: CLocalizeStrings::ClearBlock: Trying to clear non existent block C:\Program Files\XBMC\scripts\OpenSubtitles_OSD
16:11:32 T:368 M:388739072   DEBUG: CDVDPlayerAudio:: Discontinuty - was:50747195.135493, should be:72502383.490191, error:21755188.354698
16:11:32 T:1928 M:388739072    INFO: Scriptresult: Success
16:11:32 T:2440 M:388653056   DEBUG: ------ Window Deinit (DialogSeekBar.xml) ------
16:11:32 T:1928 M:388493312    INFO: Python script stopped
16:11:32 T:1928 M:388489216   DEBUG: Thread 1928 terminating
16:11:32 T:2440 M:388554752   DEBUG: python thread 1 destructed
16:11:32 T:2440 M:388554752    INFO: Python, unloading python24.dll because no scripts are running anymore



- amet - 2009-10-03

frater Wrote:Amet...
I was wondering why your script can't find a subtitle for the TV-show "Cupid.(2009).S01E02.avi"

It may be the year between brackets, but I need these to get it properly scraped at thetvdb.com
http://www.thetvdb.com/?string=cupid&searchseriesid=&tab=listseries&function=Search

If I go to their website I can find subtitles for that show....


Code:
16:11:19 T:1928 M:388874240  NOTICE: INFO: Manual Search : [False]
16:11:19 T:1928 M:388874240  NOTICE: INFO: Service : [OpenSubtitles]
16:11:19 T:1928 M:388874240  NOTICE: INFO: SL Service : [False]
16:11:19 T:1928 M:388874240  NOTICE: INFO: PN Service : [False]
16:11:19 T:1928 M:388874240  NOTICE: INFO: OS Service : [True]
16:11:19 T:1928 M:388874240  NOTICE: INFO: Search String: [Cupid+(2009)+S01E02]
16:11:19 T:1928 M:388874240  NOTICE: INFO: Temp?: [True]
16:11:19 T:1928 M:388874240  NOTICE: INFO: File Path: [smb://MYBOOK2/Public/Shared Videos/TV/Cupid.(2009)/Cupid.(2009).S01/Cupid.(2009).S01E02.avi]
16:11:19 T:1928 M:388870144  NOTICE: INFO: Year: [0]
16:11:19 T:1928 M:388870144  NOTICE: INFO: Subtitle Folder: [L:\Shared Videos\TV\Cupid.(2009)\Cupid.(2009).S01\]
16:11:19 T:1928 M:388870144  NOTICE: INFO: Language 1: [dut]
16:11:19 T:1928 M:388870144  NOTICE: INFO: Language 2: [eng]
16:11:19 T:1928 M:388870144   DEBUG: ------ Window Init (special://home/skin/Rapier/720p/script-OpenSubtitles_OSD-main.xml) ------
16:11:19 T:1928 M:388870144    INFO: Loading skin file: special://home/skin/Rapier/720p/script-OpenSubtitles_OSD-main.xml
16:11:19 T:1928 M:388845568   DEBUG: Load special://home/skin/Rapier/720p/script-OpenSubtitles_OSD-main.xml: 7.29ms
16:11:19 T:1928 M:388845568   DEBUG: Alloc resources: 7.46ms (7.38 ms skin load)
16:11:19 T:1928 M:388845568   DEBUG: CGUIMediaWindow::GetDirectory (?)
16:11:19 T:1928 M:388845568   DEBUG:   ParentPath = []
16:11:19 T:1928 M:388845568   ERROR: DIRECTORY::CDirectory::GetDirectory - Error getting ?
16:11:19 T:1928 M:388845568   ERROR: CGUIMediaWindow::GetDirectory(?) failed
16:11:19 T:1928 M:388845568  NOTICE: INFO: onInit
16:11:19 T:1928 M:388907008  NOTICE: INFO: XBOX System: []
16:11:19 T:1928 M:388898816  NOTICE: INFO: Search by hash and name Cupid.(2009).S01E02.avi
16:11:20 T:5980 M:388898816   DEBUG: Thread 5980 terminating (autodelete)
16:11:20 T:1928 M:388874240  NOTICE: INFO: File Hash: [52cf1590a90c8164]
16:11:20 T:1928 M:388845568  NOTICE: INFO: File Size: [367053744]
16:11:20 T:1928 M:388415488   DEBUG: LoadLibraryA('ws2_32')
16:11:20 T:1928 M:388415488   DEBUG: Win32DllLoader::Load(C:\WINDOWS\system32\ws2_32.dll)
16:11:20 T:1928 M:388415488   DEBUG: LoadLibrary('ws2_32.dll') returning: 0B904440
16:11:20 T:1928 M:388878336  NOTICE: INFO: Token:[o8fldjqta78sic197jb5ai29i3]
16:11:21 T:1928 M:388878336  NOTICE: INFO: Hash and Name Search:
16:11:23 T:5924 M:388861952   DEBUG: Thread 5924 terminating (autodelete)
16:11:24 T:5848 M:388845568   DEBUG: Thread 5848 terminating (autodelete)
16:11:32 T:2440 M:388730880   DEBUG: SDLKeyboard: scancode: 1, sym: 27, unicode: 27, modifier: 0
16:11:32 T:2440 M:388730880   DEBUG: CApplication::OnKey: 61467 pressed, action is 10
16:11:32 T:1928 M:388730880   DEBUG: ------ Window Deinit (special://home/skin/Rapier/720p/script-OpenSubtitles_OSD-main.xml) ------
16:11:32 T:1928 M:388739072   ERROR: CLocalizeStrings::ClearBlock: Trying to clear non existent block C:\Program Files\XBMC\scripts\OpenSubtitles_OSD
16:11:32 T:368 M:388739072   DEBUG: CDVDPlayerAudio:: Discontinuty - was:50747195.135493, should be:72502383.490191, error:21755188.354698
16:11:32 T:1928 M:388739072    INFO: Scriptresult: Success
16:11:32 T:2440 M:388653056   DEBUG: ------ Window Deinit (DialogSeekBar.xml) ------
16:11:32 T:1928 M:388493312    INFO: Python script stopped
16:11:32 T:1928 M:388489216   DEBUG: Thread 1928 terminating
16:11:32 T:2440 M:388554752   DEBUG: python thread 1 destructed
16:11:32 T:2440 M:388554752    INFO: Python, unloading python24.dll because no scripts are running anymore

have you tried manually entering "Cupid S01E02" as search string?

as far as I know the files dont need to be named with the year, the folder does.

this is the snip from Tv show Wiki

Quote: The scraper picks the wrong TV Show

You can influence the search by having nfo files alongside your media

You can also try adding the year within parentheses to the end of the TV Show folder-name. (Note the showname on the selected site to be scraped must then include the year). This might be need for some TV Shows such as "Battlestar Galactica", "Doctor Who", "Jericho", and "Knight Rider" which will have multiple entries on a given TV metadata database because of remakes of the original show.

See the examples below:

\TV Shows\Battlestar Galactica\Season 1\Battlestar Galactica - S01E01.avi (TheTVDB omits the year from the original shows)
\TV Shows\Battlestar Galactica (2003)\Season 1\Battlestar Galactica - S01E01.avi (Remakes will include year at theTVDB.com)
\TV Shows\Cupid (1998)\Season 1\Cupid - S01E01.avi
\TV Shows\Cupid (2003)\Season 1\Cupid - S01E01.avi
\TV Shows\Cupid (2009)\Season 1\Cupid - S01E01.avi
\TV Shows\Doctor Who (1963)\Season 1\Doctor Who - S01E01.avi
\TV Shows\Doctor Who (2005)\Season 1\Doctor Who - S01E01.avi
\TV Shows\Jericho (1995)\Season 1\Jericho - S01E01.avi
\TV Shows\Jericho (2006)\Season 1\Jericho - S01E01.avi
\TV Shows\Knight Rider (1982)\Season 1\Knight Rider - S01E01.avi
\TV Shows\Knight Rider (2008)\Season 1\Knight Rider - S01E01.avi

Note! "AVI" is just an example as the same applies to all video formats that XBMC support.

Regards
Zeljko


- amet - 2009-10-03

Bram77 Wrote:You've got mail Amet Smile

Thanks,

see my reply...

Zeljko


- frater - 2009-10-03

Amet Wrote:have you tried manually entering "Cupid S01E02" as search string?
No, nothing either...
If I search "Cupid" I'm only getting the pilot.
It may be something at subtitles.org....

Amet Wrote:as far as I know the files dont need to be named with the year, the folder does.

this is the snip from Tv show Wiki
This may be, but the the whole creation of the directory-structure is made by a script which takes the raw downloaded file from the net, cleans it up and puts the file in the right place....
It even decides itself if it's a TV-show or a normal movie....

In bash I would erase it like this:

Code:
# echo "Cupid 2009 S01E02"   | sed s/[12][90][0-9][0-9]// | sed 's/()//' | tr -s ' ._'
Cupid S01E02
# echo "Cupid.2009.S01E02"   | sed s/[12][90][0-9][0-9]// | sed 's/()//' | tr -s ' ._'
Cupid.S01E02
# echo "Cupid.(2009).S01E02" | sed s/[12][90][0-9][0-9]// | sed 's/()//' | tr -s ' ._'
Cupid.S01E02

http://wd.mirmana.com/mvmovie


- amet - 2009-10-03

frater Wrote:No, nothing either...
If I search "Cupid" I'm only getting the pilot.
It may be something at subtitles.org....


This may be, but the the whole creation of the directory-structure is made by a script which takes the raw downloaded file from the net, cleans it up and puts the file in the right place....
It even decides itself if it's a TV-show or a normal movie....

In bash I would erase it like this:

Code:
# echo "Cupid 2009 S01E02"   | sed s/[12][90][0-9][0-9]// | sed 's/()//' | tr -s ' ._'
Cupid S01E02
# echo "Cupid.2009.S01E02"   | sed s/[12][90][0-9][0-9]// | sed 's/()//' | tr -s ' ._'
Cupid.S01E02
# echo "Cupid.(2009).S01E02" | sed s/[12][90][0-9][0-9]// | sed 's/()//' | tr -s ' ._'
Cupid.S01E02

http://wd.mirmana.com/mvmovie

if you are searching OpenSubtitles and manually enter "cupid S01E02" it should return 2 subs, Portuguese(Brazilian) and Hungarian, unless you are searching for one of those languages(which you are not) you will get no results.

here is what the search string would look like http://www.opensubtitles.org/en/search/sublanguageid-all/moviename-cupid+S01E02/simplexml. We are no longer searching the web site, only XMLRPC, but it should give the indication of available subs in their DB.


- frater - 2009-10-03

I guess it's opensubtitles...
http://www.opensubtitles.org/nl/search2/sublanguageid-dut/moviename-cupid+s01e02


- amet - 2009-10-03

frater Wrote:I guess it's opensubtitles...
http://www.opensubtitles.org/nl/search2/sublanguageid-dut/moviename-cupid+s01e02

the one that I gave you is "http://www.opensubtitles.org/en/search/" the one you found subs on is "http://www.opensubtitles.org/nl/search2/". I will contact the owner of OpenSubtitles.org and confirm what the difference is.


- bpivk - 2009-10-03

Hy
I have a problem with your script.
I'm running XBMC_for_Windows-9.04.1-repack2 and using a mediastream skin. I have downloaded and installed the script using the instructions and I have rewritten the files from the MediaStream package found on your website (http://opensubtitles-osd.googlecode.com/files/MediaStream.zip). I don't have a screen like yours.
When I click on script settings I get this: http://www.shrani.si/f/25/lO/1knQ4cvg/screenshot000.png
And clicking on scripts gives me this: http://www.shrani.si/f/Z/rL/1fUxcPn7/screenshot001.png

I'd like to setup the script to check podnapisi.net and I don't have an option like that (eg. http://www.exhibit-a.co.za/XBMC/1.3Setings.jpg).

EDIT: Never mind. It works now. I had to update to the latest SVN build.


- amet - 2009-10-03

bpivk Wrote:Hy
I have a problem with your script.
I'm running XBMC_for_Windows-9.04.1-repack2 and using a mediastream skin. I have downloaded and installed the script using the instructions and I have rewritten the files from the MediaStream package found on your website (http://opensubtitles-osd.googlecode.com/files/MediaStream.zip). I don't have a screen like yours.
When I click on script settings I get this: http://www.shrani.si/f/25/lO/1knQ4cvg/screenshot000.png
And clicking on scripts gives me this: http://www.shrani.si/f/Z/rL/1fUxcPn7/screenshot001.png

I'd like to setup the script to check podnapisi.net and I don't have an option like that (eg. http://www.exhibit-a.co.za/XBMC/1.3Setings.jpg).

use svn repo installer, but this time select OpenSubtitle_OSD. You downloaded opensubtitles, its different than opensubtitles_osd.

After that go to the settings and enable podnapisi service.

Zeljko