XBMC Community Forum
[DEPRECIATED] XBMC Subtitles - Addon Script (previously OpenSubtitles OSD) - Printable Version

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Help and Support (/forumdisplay.php?fid=33)
+--- Forum: Add-ons Help and Support (/forumdisplay.php?fid=27)
+---- Forum: Subtitle Add-ons (/forumdisplay.php?fid=143)
+---- Thread: [DEPRECIATED] XBMC Subtitles - Addon Script (previously OpenSubtitles OSD) (/showthread.php?tid=75437)



- amet - 2010-10-10 22:33

rolandb5 Wrote:Same issue, working perfectly on xbmc (OSX) on my Macbook. Run into the same on my ATV (linux). I'll try to get the log of my ATV, though it can take a while, being a linux rookie.

1.9.7 should be out in a few hours, it will hopefully fix the issues you are having. what ATV(linux) flavor are you using?post a debug log please.


LegendasTV issue - ecsousa - 2010-10-11 07:42

Hello,

There is an issue in LegendasTV provider, when the downloaded archive contains more than one subtitle. Here what happens:

The subtitles are downloaded and extracted to ~/.xbmc/userdata/addon_data/script.xbmc.subtitles/sub_tmp

If there is more than one subtitle, the script shows a dialog box to select subtitle, from the ~/.xbmc/temp/sub_tmp directory. Hence, no subtitles are shown (this happens in linux, I don't known if it works correctly in Windows).

I've tried to modify the service.py, but I couldn't get it to work correctly. I've came out with a workaround: I've created a symbolic link in ~/.xbmc/userdata/addon_data/script.xbmc.subtitles/sub_tmp pointing to ~/.xbmc/temp/sub_tmp (But I known, this is not the right solution).


- amet - 2010-10-11 08:03

ecsousa Wrote:Hello,

There is an issue in LegendasTV provider, when the downloaded archive contains more than one subtitle. Here what happens:

The subtitles are downloaded and extracted to ~/.xbmc/userdata/addon_data/script.xbmc.subtitles/sub_tmp

If there is more than one subtitle, the script shows a dialog box to select subtitle, from the ~/.xbmc/temp/sub_tmp directory. Hence, no subtitles are shown (this happens in linux, I don't known if it works correctly in Windows).

I've tried to modify the service.py, but I couldn't get it to work correctly. I've came out with a workaround: I've created a symbolic link in ~/.xbmc/userdata/addon_data/script.xbmc.subtitles/sub_tmp pointing to ~/.xbmc/temp/sub_tmp (But I known, this is not the right solution).



in LegendasTV/service.py look for :

Code:
    if len(legendas_tmp) > 1:
        dialog = xbmcgui.Dialog()
        subtitle = dialog.browse(1, 'XBMC', 'files', '', False, False, [color=red]'special://temp/sub_tmp/'[/color])
        if subtitle == [color=Red]"special://temp/sub_tmp/"[/color]: subtitle = ""
    elif legendas_tmp:
        subtitle = legendas_tmp[0]

and change it to

Code:
    if len(legendas_tmp) > 1:
        dialog = xbmcgui.Dialog()
        subtitle = dialog.browse(1, 'XBMC', 'files', '', False, False, [color=red]tmp_sub_dir[/color])
        if subtitle == [color=red]tmp_sub_dir[/color] : subtitle = ""
    elif legendas_tmp:
        subtitle = legendas_tmp[0]


not sure why these paths are hardcoded, tmp_sub_dir was always there

let me know if that works for you and I will push an update

Thanks!

Zeljko


- gfjardim - 2010-10-11 16:10

Amet Wrote:not sure why these paths are hardcoded, tmp_sub_dir was always there

let me know if that works for you and I will push an update

Thanks!

Zeljko

Hum, when I was running into trouble with the cleaning function, I used this special patch to try to resolve it, and forgot to change it back. Sorry for the lapse, will fix it and publish soon.

When the temp dir changed, the code broke....


- kjuu - 2010-10-11 17:56

Amet Wrote:SubtitleSource has been removed from the script, you sure you using the latest version? debug log has all the answers Smile
Code:
1.9.1
- removed: SubtitleSource due to the changes in their API




again, debug log please. we construct "Yes Man (2008)" from the xbmc title and year if "display file name in results page" is not selected. that almost never means that thats what we use for search.

there is a bit of a issue with "parent dir as search string", you need to select manually enter search string and use parent dir as search string for it to work. will look into it at some point.

EDIT: you can try version 1.9.4 from github if you feel like testing. parent folder search should be fixed now.



yay for forum search function Smile

Installed 1.9.7 and got rid of subtitlesource but still experiences problems with "parent folder search"

I checked the debug log and realized that it searches using the rar-file name instead of folder name:

Moviepath:
17:42:08 T:3628 M:1792737280 DEBUG: ### [XBMC Subtitles-gui] - File Path: [rar://c:\shared\movies\Yes.Man.720p.Bluray.x264-SEPTiC\s-yesman.rar/s-yesman.mkv]
...
And search string (when manually choosing parent folder):
17:42:18 T:3628 M:1786855424 DEBUG: ### [XBMC Subtitles-services.Subscene.service] - Search string = s-yesman

And, another thing, is it possible to have it to search using parent folder as default? Since (almost?) all 720p material I watch is represented on undertexter with the correct scene name.

And lastly Smile it would be great to always know what the search string is, even though it returns zero results. Or maybe won't be a problem when everything works ok! Smile

thanks guys!


- ecsousa - 2010-10-11 18:47

Hello,

Amet's solution were almost ok: the dialog were pointing to sub_tmp partent's directory. To solve the issue, I used the following code:

Code:
if len(legendas_tmp) > 1:
                dialog = xbmcgui.Dialog()
                subtitle = dialog.browse(1, 'XBMC', 'files', '', False, False, tmp_sub_dir[b]+'/'[/b])
                if subtitle == tmp_sub_dir [b]+ '/' [/b]: subtitle = ""
        elif legendas_tmp:
                subtitle = legendas_tmp[0]

(tmp_sub_dir don't end with '/', so I appended it)

gfjardim,

I also noticed that some for TV Series (like Grey's Anatomy, and Chase), the service is not returning results, even when there is subtitles in Legendas.TV.

I have made some bash scripts for searching and downloading Legendas.TV subtitles, and I used a different parse strategy for extracting them (using sed and regular expressions).

I was wondering if you would like to work on this together, trying to figure out what is going wrong with those...

Regards,

ecsousa


- aptalca - 2010-10-11 19:58

Hi guys, this is more of a subtitles question in general. . .

I was wondering what you guys do when you need forced subs (partial for foreign language parts of the movie)

I get really annoyed when the rip doesn't contain them. Does anyone know of a way to easily find/download them?

I don't want to get the full subs and keep turning them on or off whenever someone speaks in a different language (I usually also have rewind too)

Thanks


- amet - 2010-10-11 20:51

updated to 1.9.8

Code:
1.9.8
- fixed: Script would fail on non English XBMC
- added: New Dutch translation, Thanks Rob Verberk
- updated: LegendasTV service



- rolandb5 - 2010-10-12 19:54

Amet Wrote:1.9.7 should be out in a few hours, it will hopefully fix the issues you are having. what ATV(linux) flavor are you using?post a debug log please.


I'm using the Pin87a (http://forum.xbmc.org/showthread.php?tid=74992) image upgraded to latest r33778 (beta 2).

Neither 1.9.7 nor 1.9.8 solved the issue. I'll ask some people how I can transfer the log from my ATV to my pc (linux rookie).


- alex84 - 2010-10-12 19:59

kjuu Wrote:Installed 1.9.7 and got rid of subtitlesource but still experiences problems with "parent folder search"

I checked the debug log and realized that it searches using the rar-file name instead of folder name:

Moviepath:
17:42:08 T:3628 M:1792737280 DEBUG: ### [XBMC Subtitles-gui] - File Path: [rar://c:\shared\movies\Yes.Man.720p.Bluray.x264-SEPTiC\s-yesman.rar/s-yesman.mkv]
...
And search string (when manually choosing parent folder):
17:42:18 T:3628 M:1786855424 DEBUG: ### [XBMC Subtitles-services.Subscene.service] - Search string = s-yesman

And, another thing, is it possible to have it to search using parent folder as default? Since (almost?) all 720p material I watch is represented on undertexter with the correct scene name.

And lastly Smile it would be great to always know what the search string is, even though it returns zero results. Or maybe won't be a problem when everything works ok! Smile

thanks guys!

Can confirm that the same happens here to. Looking forward when it works correct for undertexter. Still great jobb Amet, all creads to you for the best and most used addon, atleast for me in xbmc Smile