Kodi Community Forum
[RELEASE] XBMC Subtitles - Addon 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] XBMC Subtitles - Addon Script (/showthread.php?tid=126495)



RE: [RELEASE] XBMC Subtitles - Addon Script - gaco - 2012-09-04

(2012-09-03, 19:59)amet Wrote: It's standard python with some extra modules,logging in can be done in it with standard python methods

Ok, is there any other way to test out my changes while im coding without having myself constantly turn on / off xbmc?




RE: [RELEASE] XBMC Subtitles - Addon Script - gaco - 2012-09-04

Ok i've made it i feel like a god now Smile

here's patch
http://pastebin.com/nRUG5ETk

It would be nice if amet could incorporate this patch with upcoming release Smile

Thanks and greets


RE: [RELEASE] XBMC Subtitles - Addon Script - mrto - 2012-09-04

(2012-09-04, 05:47)gaco Wrote: Ok i've made it i feel like a god now Smile

You are Wink

(2012-09-04, 05:47)gaco Wrote: here's patch
http://pastebin.com/nRUG5ETk

It would be nice if amet could incorporate this patch with upcoming release Smile

I applied patch with slight change and sent pull request to amet.

In meantime here is modified file: http://dl.dropbox.com/u/40794080/script.xbmc.subtitles.zip





RE: [RELEASE] XBMC Subtitles - Addon Script - Skank - 2012-09-04

Is there a way i can name the subs when i download them?
Cause i have some bdmv movies , of which i need subs from
but when i download, its always index.srt
so they overwrite everytime (when downloading to separate sub map)


RE: [RELEASE] XBMC Subtitles - Addon Script - gaco - 2012-09-04

(2012-09-04, 15:07)mrto Wrote: I applied patch with slight change and sent pull request to amet.

well that's a shame as it seems the script was not 100% ok, it turned out that their server was very picky regarding headers being sent to them, therefore, manytimes sub download could take up to 2 minutes (sic!)

but since i'm god i corrected it very quickly now it downloads subs always in few secs Wink

new patch for v 3.3.1 here:
[url]http://pastebin.com/PcTZRWJT[\url]

just learned github and made pull request myself Smile

cheers


RE: [RELEASE] XBMC Subtitles - Addon Script - gaco - 2012-09-06

Hello

So i've found a bug made a mod and did pull request

in very rare cases when subtitle in zip file has name consisting of ';' (yes somebody actually does that sic!) standard XBMCExtract fails so i made mod where you can try in this cases to extract using standard utils like 7z unzip and unrar. Example of such sub is here (first sub): http://napisy24.pl/search.php?str=vampire+diaries+3x22

Of course it would be best to correct XBMCExtract but i do not know C kung-fu Wink

cheers


RE: [RELEASE] XBMC Subtitles - Addon Script - SimFre - 2012-09-06

(2012-08-26, 22:42)amet Wrote: Looks like you are playing rar file , we do have some issues with rar files and hash... Hence opensubtitles failing to find stuff. Do not clip the debug log , there is info in there that is needed sometimes( like now to know if you are playing the rar file )

Undertexter will need to be looked at by the service author, wasn't me

Who's the developer for Undertexter? I'm writing a fix for it... again. Did it once, kept it to myself, upgraded, lost it. This time I intend to submit the change somewhere. The fixes I'm doing are added RAR-support and updated Regexes.


RE: [RELEASE] XBMC Subtitles - Addon Script - amet - 2012-09-06

mr_blobby did Undertexter


RE: [RELEASE] XBMC Subtitles - Addon Script - tebicenter - 2012-09-06

Any news about this? Sorry to bother again...

(2012-08-28, 23:35)tebicenter Wrote: Hi, amet.

Sorry if this has been posted before.

If you remember, I'm the one that created argenteam service for the plugin.

A user from our forum says that he tries to download a subtitle file, which is a zip file with two srt files, CD1 and CD2.

First of all, this is the log of the plugin when it downloads the file and unzip it with no problem

Code:
url: http://www.argenteam.net/search/The+Spy+Who+Came+in+from+the+Cold+1965
    13:42:13 T:972   DEBUG: CApplication::ProcessMouse: trying mouse action leftclick
    13:42:13 T:5144   DEBUG: ### [XBMC Subtitles-services.Argenteam.service] - argenteam Getting url: http://www.argenteam.net/subtitles/28329/
    13:42:15 T:5144   DEBUG: ### [XBMC Subtitles-services.Argenteam.service] - argenteam Saving subtitles to 'C:\Users\martin\AppData\Roaming\XBMC\userdata\addon_data\script.xbmc.subtitles\sub_tmp\argenteam.zip'
    13:42:17 T:972   DEBUG: CZipManager::GetZipList - Processing zip://C%3a%5cUsers%5cmartin%5cAppData%5cRoaming%5cXBMC%5cuserdata%5caddon%5fdata%5cscript%2exbmc%2esubtitles%5csub%5ftmp%5cargenteam%2ezip/
    13:42:17 T:972   DEBUG: statdata: 1346165232 new: 1346172135
    13:42:18 T:5144   DEBUG: ### [XBMC Subtitles-services.Argenteam.service] - argenteam Unpacked files in 'C:\Users\martin\AppData\Roaming\XBMC\userdata\addon_data\script.xbmc.subtitles\sub_tmp'
    13:42:18 T:5144   DEBUG: ### [XBMC Subtitles-services.Argenteam.service] - argenteam Unpacked subtitles file 'The.Spy.Who.Came.In.From.The.Cold.(1965).DVDRip.AC3.XviD-PROMiSE.CD1.srt'
    13:42:18 T:5144   DEBUG: ### [XBMC Subtitles-services.Argenteam.service] - argenteam Unpacked subtitles file 'The.Spy.Who.Came.In.From.The.Cold.(1965).DVDRip.AC3.XviD-PROMiSE.CD2.srt'

As you can see, the files are created on the temp folder.

Then, he saw this on the log

Code:
13:42:18 T:5144   DEBUG: ### [XBMC Subtitles-utilities] - vfs module copy C:\Users\martin\AppData\Roaming\XBMC\userdata\addon_data\script.xbmc.subtitles\sub_tmp\The.Spy.Who.Came.In.From.The.Cold.(1965).DVDRip.AC3.XviD-PROMiSE.CD2.srt -> smb://PCH-A110/share/Video\The.Spy.Who.Came.In.From.The.Cold.(1965).DVDRip.AC3.XviD-PROMiSE.CD1.srt
    13:42:18 T:3096  NOTICE: Opening Subtitle stream: 0 source: 1024

Basically, the plugin moves the srt of CD2 as CD1 and the CD1 file is omitted.

Is this a bug?

I checked that my service.py has this code:

Code:
if waittime == 20:
    log( __name__ ,"%s Failed to unpack subtitles in '%s'" % (debug_pretext, tmp_sub_dir))
else:
    log( __name__ ,"%s Unpacked files in '%s'" % (debug_pretext, tmp_sub_dir))
    for file in files:
        # there could be more subtitle files in tmp_sub_dir, so make sure we get the newly created subtitle file
        if (string.split(file, '.')[-1] in ['srt', 'sub', 'txt']) and (os.stat(os.path.join(tmp_sub_dir, file)).st_mtime > init_max_mtime): # unpacked file is a newly created subtitle file
            log( __name__ ,"%s Unpacked subtitles file '%s'" % (debug_pretext, file))
            subs_file = os.path.join(tmp_sub_dir, file)

and I check that "subs_file" it's overwritten with the latest sub file (in this case, CD2) and that this variable is the one that is returned to the plugin.

Should this method return a list instead of a single file?

Thanks in advance



RE: [RELEASE] XBMC Subtitles - Addon Script - amet - 2012-09-06

no news on that, I need to find/create some multiple CD movies and test...


RE: [RELEASE] XBMC Subtitles - Addon Script - tebicenter - 2012-09-06

(2012-09-06, 22:23)amet Wrote: no news on that, I need to find/create some multiple CD movies and test...

Thanks for the update.


RE: [RELEASE] XBMC Subtitles - Addon Script - Nirtus Ohm - 2012-09-11

Hi Amet,

I can't find any solution for this... Subtitles works fine on my apple tv 2 with Quartz skin when getting them from specific folder but not when trying to download via undertexter.se or anyone else when I am using my XBMC in ATV2... I am fairly new to this so I have read that you need a debug log which I have been able to get below...

Please help me fix this since I am lower than amateur, tell me step by step what to do!? I used putty when cracking the ATV2, perhaps I can us that for getting the fix done?

http://xbmclogs.com/show.php?id=8282




RE: [RELEASE] XBMC Subtitles - Addon Script - amet - 2012-09-11

(2012-09-11, 18:09)Nirtus Ohm Wrote: Hi Amet,

I can't find any solution for this... Subtitles works fine on my apple tv 2 with Quartz skin when getting them from specific folder but not when trying to download via undertexter.se or anyone else when I am using my XBMC in ATV2... I am fairly new to this so I have read that you need a debug log which I have been able to get below...

Please help me fix this since I am lower than amateur, tell me step by step what to do!? I used putty when cracking the ATV2, perhaps I can us that for getting the fix done?

http://xbmclogs.com/show.php?id=8282

"unix_err:'d' error : 'Permission denied'"

that means that you have no permission to write to the drive where the movie is, you can do one of the 2 things

1. fix permissions so addon can write to it
or
2. set the subtitle download folder to a local folder and addon will save there and activate(addon settings-> save to movie folder-> and select teh local folder)


RE: [RELEASE] XBMC Subtitles - Addon Script - itachi46 - 2012-09-13

Hi guys having some issues with OpenSubtitles.. it finds the list of subtitles fine but when i select it, it says "error extracting subtitles", logs says file is not a zip so i checked it out, and its true the file downloaded is a html page saying "file not found" is this a known issue? i tried searching this thread to no avail...


RE: [RELEASE] XBMC Subtitles - Addon Script - amet - 2012-09-13

(2012-09-13, 14:47)itachi46 Wrote: Hi guys having some issues with OpenSubtitles.. it finds the list of subtitles fine but when i select it, it says "error extracting subtitles", logs says file is not a zip so i checked it out, and its true the file downloaded is a html page saying "file not found" is this a known issue? i tried searching this thread to no avail...

happens when their servers are overloaded, nothing we can do on this end... have you tried few minutes later?