Kodi Community Forum
[DEPRECIATED] XBMC Subtitles - Addon Script (previously OpenSubtitles OSD) - 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: [DEPRECIATED] XBMC Subtitles - Addon Script (previously OpenSubtitles OSD) (/showthread.php?tid=75437)



- amet - 2012-02-07

castortray Wrote:Sad maybe you have a contact for user who wrote that script for napiprojekt maybe he will be able to make some changes in code or use other methods to fix it Smile

Because it must be possible to fix it ....

This external python is only for addons ?
How it is possible to add sources using smb protocol in eden ?
Do you think it will be possible to fix napiprojekt using json, or this is something completely different ?

I will say this only one more time, there is NO way to do it with current xbmc python paths. there are plan for the future but thats all for after eden.

napiproject uses path to calculate hash and search , I dont know if there is other ways to search....


- subixonfire - 2012-02-08

@amet

After another look this is what it look's like to me...

Xbmc subtitles uses file name from file path to save subtitles in "sub_stream" dir, but file path sent to xbmc by icefilms includes a loot of caracters used for autentification...

example:

Code:
http://rsxxxxxx.rapidshare.com/cgi-bin/rsapi.cgi?sub=download&fileid=XXXXXXXXX&filename=XXXXXXXXXX.S01E05.HDTV.XviD-LOL.avi&dlauth=F8EA0706D49DAE40E2D6D1290070DA5722EE7471AA2078D3AC8E63BDC4DBFB94D397694ACA310C112AEA332F7A7C16260C2FDA9DE5EFD9D8ABA9135C4503EA32E086C9C3F219F85CFAF8AAFB8518A82A5DE84C117025C0FE8EAF13D49EFB2380FE3697652FC70518FCADDADECA1AA1A0


Now if i force the file path to be "tmp" (or whatewer random leters and numbers) or clean the file path like in my first atempt, it gets the movie title from infolabels and all works as expected...

It look's to me that this is caused by filename having to much caracters or posibly a special caracter in filename.

Now my question is how to be sure and what would be the xbmc way of fixing this.

The posible fixes that would not be icefilms or rapidshare specific:

Using a temporary file name for subtitles for streaming videos, somting like "stream.tmp.srt", this makes sense to me, because subtitles for streaming videos are temporary and saved in temporary directory (sub_stream).

Maybe ewen bether fix would be to use title infolabel for subtitle filename if it exists, when we are geting subtitles for a video stream.

Sorry for my bad english...


- amet - 2012-02-08

subixonfire Wrote:@amet

After another look this is what it look's like to me...

Xbmc subtitles uses file name from file path to save subtitles in "sub_stream" dir, but file path sent to xbmc by icefilms includes a loot of caracters used for autentification...

example:

Code:
http://rsxxxxxx.rapidshare.com/cgi-bin/rsapi.cgi?sub=download&fileid=XXXXXXXXX&filename=XXXXXXXXXX.S01E05.HDTV.XviD-LOL.avi&dlauth=F8EA0706D49DAE40E2D6D1290070DA5722EE7471AA2078D3AC8E63BDC4DBFB94D397694ACA310C112AEA332F7A7C16260C2FDA9DE5EFD9D8ABA9135C4503EA32E086C9C3F219F85CFAF8AAFB8518A82A5DE84C117025C0FE8EAF13D49EFB2380FE3697652FC70518FCADDADECA1AA1A0


Now if i force the file path to be "tmp" (or whatewer random leters and numbers) or clean the file path like in my first atempt, it gets the movie title from infolabels and all works as expected...

It look's to me that this is caused by filename having to much caracters or posibly a special caracter in filename.

Now my question is how to be sure and what would be the xbmc way of fixing this.

The posible fixes that would not be icefilms or rapidshare specific:

Using a temporary file name for subtitles for streaming videos, somting like "stream.tmp.srt", this makes sense to me, because subtitles for streaming videos are temporary and saved in temporary directory (sub_stream).

Maybe ewen bether fix would be to use title infolable for subtitle filename if it exists, when we are geting subtitles for a video stream.

Sorry for my bad english...

English is not an issue, try "Yugoslavian" if you want Smile ... I just dont want anything to do with icefilms.

as I said before, if xbmc OSD screen(where the player commands are) displays the filename correctly, subtitle addon will use that name to search for the subs. make sure that your addon sets that name correctly and all will be ok.


- subixonfire - 2012-02-08

Xbmc osd screen displays file name correctly, subtitles addon uses that to search for the subs, finds them corectly, but saves them to "sub_stream" directory with a filename that xbmc cant open.


- amet - 2012-02-08

subixonfire Wrote:Xbmc osd screen displays file name correctly, subtitles addon uses that to search for the subs, finds them corectly, but saves them to "sub_stream" directory with a filename that xbmc cant open.

make this line into
Code:
file_name = "subixonfire.srt"



- subixonfire - 2012-02-08

im using eden, beta 2. My gui.py file is a litle diferent. Wink But it is not my question how to make another hack that fixes this, it is how to fix this in an acceptable way and without breaking something else. So this change can maybe be included in your next release to fix this for everyone using icefilms and subtitles addon.


- amet - 2012-02-08

subixonfire Wrote:im using eden, beta 2. My gui.py file is a litle diferent. Wink But it is not my question how to make another hack that fixes this, it is how to fix this in an acceptable way and without breaking something else. So this change can maybe be included in your next release to fix this for everyone using icefilms and subtitles addon.

untested eden .py -> http://pastebin.com/cBfkVLuS


- subixonfire - 2012-02-08

That fixes it! Big GrinBig GrinBig Grin

This fixes it even if lang_to_end is false (unchecked)
http://pastebin.com/686dHZqu

Thanx for all your help.
Now can i expect this change to be included in next release, please?


- amet - 2012-02-08

subixonfire Wrote:That fixes it! Big GrinBig GrinBig Grin

This fixes it even if lang_to_end is false (unchecked)
http://pastebin.com/686dHZqu

Thanx for all your help.
Now can i expect this change to be included in next release, please?

happy? can we go back to not talking about icefilms now? Smile

https://github.com/amet/script.xbmc.subtitles/blob/eden-pre/script.xbmc.subtitles/resources/lib/gui.py#L390


Manual search string history - woompa - 2012-02-09

Is there a way to add a manual search history to the subtitles add-on? For instance, when I play a movie that is labelled incorrectly, I do a manual subtitle search. If the subtitle file I choose is not the correctly synced version, I have to go back and delete the incorrect title in the search box and re-enter the correct title each time until I find the subtitle file that is synced correctly. Sometimes I get lucky and the first subtitle file I pick is the correct one- most of the time though, I have to delete/enter video titles over and over until I get the right one. Im sure this has been asked before or is covered elsewhere but, I had no idea what search keywords would have directed me to it. Thanks.


- bboo - 2012-02-09

I'm streaming movies from a local network drive, and since ive started doing this, subtitles are downloading but they are not showing. Is there something somewhere that has to be changed in the XBMC subtitles add-on to make this work?


- amet - 2012-02-09

woompa Wrote:Is there a way to add a manual search history to the subtitles add-on? For instance, when I play a movie that is labelled incorrectly, I do a manual subtitle search. If the subtitle file I choose is not the correctly synced version, I have to go back and delete the incorrect title in the search box and re-enter the correct title each time until I find the subtitle file that is synced correctly. Sometimes I get lucky and the first subtitle file I pick is the correct one- most of the time though, I have to delete/enter video titles over and over until I get the right one. Im sure this has been asked before or is covered elsewhere but, I had no idea what search keywords would have directed me to it. Thanks.

yeah, good idea.. will implement it so it remembers the entered search string

edit: try this -> https://github.com/amet/script.xbmc.subtitles/commit/6d997c166a6fec4adda3f3116084c494c25e8301


- amet - 2012-02-09

bboo Wrote:I'm streaming movies from a local network drive, and since ive started doing this, subtitles are downloading but they are not showing. Is there something somewhere that has to be changed in the XBMC subtitles add-on to make this work?

debug log will have more info, you probably dont have permission to save the subs to network path


- subixonfire - 2012-02-10

@amet

Can you please include the https streams change?

Code:
if (movieFullPath.find("http://") > -1 ) or (movieFullPath.find("https://") > -1 ):

That fixes subtitles on all https streams.

I promise not to ask nothing more for a month atleast. Smile


- Bogga - 2012-02-10

I've had this problem for quite some time now. First of all I can't seem to find subtitles through podnapisi, even though I know there are perfect subtitles at that site. I've put my login name and password for that site, still no success

Then I find subtitles at opensubtitles, I try to download them... but it just stays at "downloading subtitles" and doesn't move past that. Any idea what I have to do to get it to work?

(Click image for bigger version)
Image