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)



- amet - 2009-09-22

mindweaver Wrote:Moving those files made it work Smile but now I'm at the same point as I am with old "stable" svn of XBMC. No GUI background for osOSD.

Log:

Code:
09:44:36 T:2396 M:1179537408  NOTICE: OpenSubtitles_OSD version [1.35]
09:44:36 T:2396 M:1179537408  NOTICE: Skin Folder: [ aeon auriga ]
09:44:36 T:2396 M:1179537408  NOTICE: OpenSubtitles_OSD skin XML: [ Aeon ]
09:44:36 T:2396 M:1178800128   DEBUG: LoadLibraryExA called with flags:
                                             - LOAD_WITH_ALTERED_SEARCH_PATH
09:44:36 T:2396 M:1178800128   DEBUG: LoadLibraryA('pyexpat.pyd')
09:44:36 T:2396 M:1178800128   DEBUG: Win32DllLoader::Load(special://xbmc/system/python/DLLs\pyexpat.pyd)
09:44:36 T:2396 M:1178775552   DEBUG: LoadLibraryA('python24.dll')
09:44:36 T:2396 M:1178775552   DEBUG: LoadLibrary('python24.dll') returning: 06F27E60
09:44:36 T:2396 M:1178775552   DEBUG: LoadLibraryA('MSVCR71.dll')
09:44:36 T:2396 M:1178775552   DEBUG: LoadLibrary('MSVCR71.dll') returning: 030C7E50
09:44:36 T:2396 M:1178775552   DEBUG: LoadLibrary('pyexpat.pyd') returning: 0D1138F0
09:44:36 T:2396 M:1177313280   DEBUG: LoadLibraryExA called with flags:
                                             - LOAD_WITH_ALTERED_SEARCH_PATH
09:44:36 T:2396 M:1177313280   DEBUG: LoadLibraryA('_socket.pyd')
09:44:36 T:2396 M:1177313280   DEBUG: Win32DllLoader::Load(special://xbmc/system/python/DLLs\_socket.pyd)
09:44:36 T:2396 M:1177288704   DEBUG: LoadLibraryA('python24.dll')
09:44:36 T:2396 M:1177288704   DEBUG: LoadLibrary('python24.dll') returning: 06F27E60
09:44:36 T:2396 M:1177288704   DEBUG: LoadLibraryA('MSVCR71.dll')
09:44:36 T:2396 M:1177288704   DEBUG: LoadLibrary('MSVCR71.dll') returning: 030C7E50
09:44:36 T:2396 M:1177284608   DEBUG: LoadLibrary('_socket.pyd') returning: 064F1E50
09:44:36 T:2396 M:1177276416   DEBUG: LoadLibraryExA called with flags:
                                             - LOAD_WITH_ALTERED_SEARCH_PATH
09:44:36 T:2396 M:1177276416   DEBUG: LoadLibraryA('_ssl.pyd')
09:44:36 T:2396 M:1177276416   DEBUG: Win32DllLoader::Load(special://xbmc/system/python/DLLs\_ssl.pyd)
09:44:36 T:2396 M:1176866816   DEBUG: LoadLibraryA('python24.dll')
09:44:36 T:2396 M:1176866816   DEBUG: LoadLibrary('python24.dll') returning: 06F27E60
09:44:36 T:2396 M:1176866816   DEBUG: LoadLibraryA('MSVCR71.dll')
09:44:36 T:2396 M:1176866816   DEBUG: LoadLibrary('MSVCR71.dll') returning: 030C7E50
09:44:36 T:2396 M:1176866816   DEBUG: LoadLibrary('_ssl.pyd') returning: 064F0BE0
09:44:36 T:5204 M:1174843392   DEBUG: CPullupCorrection: detected pattern of length 24: 42000.00 42000.00 42000.00 41000.00 42000.00 42000.00 41000.00 42000.00 42000.00 42000.00 41000.00 42000.00 42000.00 41000.00 42000.00 42000.00 41000.00 42000.00 42000.00 42000.00 41000.00 42000.00 42000.00 41000.00
09:44:36 T:2396 M:1172774912   DEBUG: LoadLibraryExA called with flags:
                                             - LOAD_WITH_ALTERED_SEARCH_PATH
09:44:36 T:2396 M:1172774912   DEBUG: LoadLibraryA('unicodedata.pyd')
09:44:36 T:2396 M:1172774912   DEBUG: Win32DllLoader::Load(special://xbmc/system/python/DLLs\unicodedata.pyd)
09:44:36 T:2396 M:1172746240   DEBUG: LoadLibraryA('python24.dll')
09:44:36 T:2396 M:1172746240   DEBUG: LoadLibrary('python24.dll') returning: 06F27E60
09:44:36 T:2396 M:1172746240   DEBUG: LoadLibraryA('MSVCR71.dll')
09:44:36 T:2396 M:1172746240   DEBUG: LoadLibrary('MSVCR71.dll') returning: 030C7E50
09:44:36 T:2396 M:1172746240   DEBUG: LoadLibrary('unicodedata.pyd') returning: 0D112720
09:44:36 T:2396 M:1172045824  NOTICE: INFO: Manual Search : [False]
09:44:36 T:2396 M:1172045824  NOTICE: INFO: Service : [OpenSubtitles]
09:44:36 T:2396 M:1172045824  NOTICE: INFO: SL Service : [True]
09:44:36 T:2396 M:1172045824  NOTICE: INFO: PN Service : [False]
09:44:36 T:2396 M:1172045824  NOTICE: INFO: OS Service : [True]
09:44:36 T:2396 M:1172045824  NOTICE: INFO: Search String: [24+S07E02]
09:44:36 T:2396 M:1172045824  NOTICE: INFO: Temp?: [True]
09:44:36 T:2396 M:1172045824  NOTICE: INFO: File Path: [v]
09:44:36 T:2396 M:1172045824  NOTICE: INFO: Year: [0]
09:44:36 T:2396 M:1172045824  NOTICE: INFO: Subtitle Folder: [C:\Users\xxxxx\Downloads\]
09:44:36 T:2396 M:1172045824  NOTICE: INFO: Language 1: [eng]
09:44:36 T:2396 M:1172045824  NOTICE: INFO: Language 2: [swe]
09:44:36 T:2396 M:1172045824   DEBUG: ------ Window Init (special://home/skin/Aeon Auriga/720p/script-OpenSubtitles_OSD-Aeon.xml) ------
09:44:36 T:2396 M:1172045824    INFO: Loading skin file: special://home/skin/Aeon Auriga/720p/script-OpenSubtitles_OSD-Aeon.xml
09:44:36 T:2396 M:1172017152   DEBUG: Load special://home/skin/Aeon Auriga/720p/script-OpenSubtitles_OSD-Aeon.xml: 5.97ms
09:44:36 T:2396 M:1171972096   DEBUG: Alloc resources: 10.62ms (6.01 ms skin load)
09:44:36 T:2396 M:1171972096   DEBUG: CGUIMediaWindow::GetDirectory (?)
09:44:36 T:2396 M:1171972096   DEBUG:   ParentPath = []
09:44:36 T:2396 M:1171972096   ERROR: DIRECTORY::CDirectory::GetDirectory - Error getting ?
09:44:36 T:2396 M:1171972096   ERROR: CGUIMediaWindow::GetDirectory(?) failed
09:44:36 T:2396 M:1171972096  NOTICE: INFO: onInit
09:44:36 T:2396 M:1171001344  NOTICE: INFO: XBOX System: []
09:44:37 T:2396 M:1170870272  NOTICE: INFO: Search by hash and name 24.S07E02.720p.HDTV.X264-DIMENSION.mkv
09:44:37 T:2400 M:1170853888   DEBUG: thread start, auto delete: 0
09:44:37 T:2404 M:1170845696   DEBUG: thread start, auto delete: 0
09:44:37 T:2404 M:1170550784   DEBUG: Thread 2404 terminating
09:44:37 T:2400 M:1170010112   DEBUG: Thread 2400 terminating
09:44:37 T:2396 M:1170046976  NOTICE: INFO: File Hash: [45bfa45639cacaee]
09:44:37 T:2408 M:1170038784   DEBUG: thread start, auto delete: 0
09:44:37 T:2408 M:1170018304   DEBUG: Thread 2408 terminating
09:44:37 T:2396 M:1170042880  NOTICE: INFO: File Size: [1173131318]
09:44:37 T:2396 M:1169469440   DEBUG: LoadLibraryA('ws2_32')
09:44:37 T:2396 M:1169457152   DEBUG: LoadLibrary('ws2_32.dll') returning: 07284850
09:44:37 T:2396 M:1168080896  NOTICE: INFO: Token:[pirnoiso2cp87ht8fke552p1k3]
09:44:38 T:2396 M:1231941632  NOTICE: INFO: 30 subtitles found
09:44:38 T:2396 M:1231941632  NOTICE: INFO: Hash and Name Search: 30 subtitles found
09:44:46 T:3928 M:1203306496   DEBUG: CWinEventsWin32::WndProcWindow is active
09:44:46 T:3928 M:1203322880   DEBUG: CWinEventsWin32::WndProcWindow lost focus

Image

If you dont mind, can you zip your complete OpenSubtitles Folder and e-mail it to me?(I will send you my e-mail via PM)

It is very strange that you have both logos on the screen.

try deleting the whole OpenSubtitles_OSD folder and installing again from SVN installer.

Do not forget to copy the files again:

Quote: - copy script-OpenSubtitles_OSD-Aeon.xml file from scripts 720p folder to skins 720p folder
- copy all the files from scripts media folder to skins media folder.

EDIT:

Does it work with any other skin?

Zeljko


- mindweaver - 2009-09-22

Amet Wrote:If you dont mind, can you zip your complete OpenSubtitles Folder and e-mail it to me?(I will send you my e-mail via PM)

It is very strange that you have both logos on the screen.

try deleting the whole OpenSubtitles_OSD folder and installing again from SVN installer.

Do not forget to copy the files again


Zeljko

That did the trick. Now it works.


- amet - 2009-09-22

mindweaver Wrote:That did the trick. Now it works.


Excellent! Smile

Cheers
Zeljko


- mindweaver - 2009-09-22

Thanks for a great script!


- scarfa - 2009-09-24

I've integrated this script into my skin Rapier

Image


This is a great script. Nod


- amet - 2009-09-24

scarfa Wrote:I've integrated this script into my skin Rapier

Image


This is a great script. Nod

Great! Thanks Smile

I will let you know if anything changes in xml file.

Nice skin BTW Nod

Zeljko


- fidoboy - 2009-09-24

Hoy can i open the config screen for this plugin? It could be useful to put it on the script page. Right now, when you try to open the script from the scripts page, it says that the script must be executed from... bla, bla bla... But i think that it could be better to show the config screen instead...

regards,


- amet - 2009-09-24

fidoboy Wrote:Hoy can i open the config screen for this plugin? It could be useful to put it on the script page. Right now, when you try to open the script from the scripts page, it says that the script must be executed from... bla, bla bla... But i think that it could be better to show the config screen instead...

regards,

Quote from the first page:

Quote:Settings menu has changed in new version. To enter the settings go to Scripts:

Apple Tv: Highlight OpenSubtitles_OSD and hold "menu", then select script settings

Keyboard: Highlight OpenSubtitles_OSD and press "c", then select script settings

XBOX: Highlight OpenSubtitles_OSD and select 'select' button on IR, then select script settings

Zeljko


- fidoboy - 2009-09-24

Yes thanks, i found them after write my post. But i'm still thinking that doing it when the user tries to execute the script, could be more intuitive...

just my two cents...


- amet - 2009-09-24

fidoboy Wrote:Yes thanks, i found them after write my post. But i'm still thinking that doing it when the user tries to execute the script, could be more intuitive...

just my two cents...

I am adding the upload feature that will be using that, as well as an option to upload from OSD.

The difference will be that from the Scripts menu you will have to select the movie file, subtitle file and language, while from OSD it will be semi-automated upload.

Zeljko


- frater - 2009-09-24

I just installed opensubtitles-osd and it's great to have such a feature....
It does seem to have some problem placing the subtitle in the directory of the movie. Is it because it is in a multiple path entry?

My movies have their names exactly as they are on iMDB.
To differentiate between different movies some have their year behind it in brackets....

I noticed this year is being sent too which results in 0-hits in your script...
Could you strip it in your query?
It would look like this in a bash-script...
Code:
sed 's/ \([12][90][0-9][0-9]\)$//'

PS.... I wrote these bash-scripts to rename and move movies after they are downloaded.....
I didn't write the perl imdb-script, but it's needed for the script to work...

http://wd.mirmana.com/mvmovie
http://wd.mirmana.com/mkdvd
http://wd.mirmana.com/imdb


- amet - 2009-09-24

frater Wrote:I just installed opensubtitles-osd and it's great to have such a feature....
It does seem to have some problem placing the subtitle in the directory of the movie. Is it because it is in a multiple path entry?

It will use the movie directory by default unless you specify otherwise in scripts settings. If your movies are on SMB drive you will have to specify the custom folder for subtitles as it cannot write to the smb.

frater Wrote:My movies have their names exactly as they are on iMDB.
To differentiate between different movies some have their year behind it in brackets....

I noticed this year is being sent too which results in 0-hits in your script...
Could you strip it in your query?
It would look like this in a bash-script...
Code:
sed 's/ \([12][90][0-9][0-9]\)$//'

PS.... I wrote these bash-scripts to rename and move movies after they are downloaded.....
I didn't write the perl imdb-script, but it's needed for the script to work...

http://wd.mirmana.com/mvmovie
http://wd.mirmana.com/mkdvd
http://wd.mirmana.com/imdb

I am not sure I understand.

The script collects the name of the movie from the library. So if your movie name shows in OSD

Image

in this case it would pick it up as "ratatouille" and that would be the search string, additionally it would get the year as well as it searches on some sites with "ratatouille+2007" as a search string.

if your movie is not in a library and its called "ratatouille (2007).avi" it will handle it in the same way.But if it is called "rttolle-{name of the release group}.avi it will not find anything with the name search but it might find it with the hash search.

Hope that helps.

EDIT: if you still cant get it to work or you think something is wrong please post the log file. Note that you will need to enable debug log in scripts settings.

Zeljko


- frater - 2009-09-24

I'm doing my utter best to clean those names, so no I don't have the names of those "release groups" in there....

I have these 2 files: Eternal.Sunshine.of.the.Spotless.Mind-CD1.avi Eternal.Sunshine.of.the.Spotless.Mind-CD2.avi
Which get in the library as 1 entry and no year behind it.

Somehow I'm only getting English results although Dutch is my preferred language... I thought it had something to do with the year.


- amet - 2009-09-24

frater Wrote:I'm doing my utter best to clean those names, so no I don't have the names of those "release groups" in there....

I have these 2 files: Eternal.Sunshine.of.the.Spotless.Mind-CD1.avi Eternal.Sunshine.of.the.Spotless.Mind-CD2.avi
Which get in the library as 1 entry and no year behind it.

Somehow I'm only getting English results although Dutch is my preferred language... I thought it had something to do with the year.

unfortunately it wont play nicely with the 2 CD movies Sad

Its one of those things on my to-do list but I dont have any 2Cd movies. I'll have to get some and start testing.

Sorry ...

Zeljko


- frater - 2009-09-25

I have another issue I just noticed, although I don't understand yet why it doesn't alway fail.
All my movies have dots where there should be spaces (in their filename). This, because most of my movies are on a Linux NAS and I don't like to put everything in quotes.
XBMC translates these dots automatically to spaces.

I just scraped "Cougar.Town.S01E01.avi" and it gave me "Cougar Town S01E01.en.srt".. only after replacing the spaces with dots I had a working subtitle...

I would love it if this could get fixed
Keep up the good work....

PS... I also noticed you use ".nl" for Dutch subtitles. I've always used ".dut" and ".eng" which both refer to the language and not the country (they speak Dutch in Belgium too)