Kodi Community Forum
Release CleanSubs - (Clean subtitles from the ads and other rubbish) - 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: Service Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=152)
+---- Thread: Release CleanSubs - (Clean subtitles from the ads and other rubbish) (/showthread.php?tid=283342)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24


RE: CleanSubs - User 325245 - 2016-12-06

(2016-12-06, 21:35)incubus Wrote: Path detection works ok but after it doesn't clean the subtitle :

What exactly are you doing in this one? Play file on NFS and download subtitle off some external site? i.e. opensubtitles, etc?

If yes, make sure there are NO subtitles already in the folder. The interactive cleaning works ONLY on downloaded subs, when they don't already exist.


RE: CleanSubs - incubus - 2016-12-07

(2016-12-06, 22:34)DaLanik Wrote: Can't this be the rights issue? I'll test some more.

I ask because of this line:

CLEANSUBS >> COULDN'T RENAME TEMP SUBS

(in 2nd log)

Yes it looks like. I then allowed renaming and deleting files, a setting I overlooked, and it seems better but I haven't too much time tonight to debug this unfortunately...


RE: CleanSubs - incubus - 2016-12-07

(2016-12-06, 23:17)DaLanik Wrote:
(2016-12-06, 21:35)incubus Wrote: Path detection works ok but after it doesn't clean the subtitle :

What exactly are you doing in this one? Play file on NFS and download subtitle off some external site? i.e. opensubtitles, etc?

If yes, make sure there are NO subtitles already in the folder. The interactive cleaning works ONLY on downloaded subs, when they don't already exist.

Yes, nfs file with opensubtitles downloading. There MAY be an existing subtitle in the folder already, i.e. an english one and we want a french or the previous one was buggy. But this shall be an usual situation (for me at least ;-) )


RE: CleanSubs - User 325245 - 2016-12-08

v2.9
- Overall optimization and code cleanup, cleaning of files in local folders

This version should be able to download subtitles to local folder even if they already exist and clean 'em. Different languages are downloaded and cleaned too.


RE: CleanSubs - User 325245 - 2016-12-08

v3.0
- Small bug fix


RE: CleanSubs - incubus - 2016-12-08

(2016-12-08, 09:52)DaLanik Wrote: This version should be able to download subtitles to local folder even if they already exist and clean 'em.

Oh yes ! Will try it tonight Cool


RE: CleanSubs - incubus - 2016-12-08

Seems good :
Code:
20:33:34.254 T:139807666771712   DEBUG: OnDownloadComplete - Saving subtitle /storage/.kodi/temp/Vikings.S04E12.1080p.WEB-DL.DD5.1.H264-RARBG.en.srt to /storage/video2/Series/Vikings (2013)/Season 4/Vikings.S04E12.1080p.WEB-DL.DD5.1.H264-RARBG.en.srt
20:33:34.266 T:139806008932096   DEBUG: GetExternalStreamDetailsFromFilename - Language = 'eng' / Name = '(Externe)' / Flag = '0' from /storage/video2/Series/Vikings (2013)/Season 4/Vikings.S04E12.1080p.WEB-DL.DD5.1.H264-RARBG.en.srt
20:33:34.266 T:139806008932096  NOTICE: Closing stream player 3
20:33:34.267 T:139806008932096  NOTICE: Opening stream: 0 source: 1025
20:33:34.342 T:139807276910336    INFO: Python script stopped
20:33:34.342 T:139807276910336   DEBUG: Thread LanguageInvoker 139807276910336 terminating
20:33:34.504 T:139806134753024   DEBUG: CLEANSUBS >> SUBS ADDED >>Vikings.S04E12.1080p.WEB-DL.DD5.1.H264-RARBG.en.srt
20:33:34.506 T:139806134753024   DEBUG: CLEANSUBS >> SUB STATS WILL BE ADDED TO LOCAL DATABASE
20:33:34.509 T:139806134753024   DEBUG: CLEANSUBS >> ENC >> OPENED WITH ENCODING: utf-8
20:33:34.563 T:139806134753024   DEBUG: CLEANSUBS >> PROVIDER LOGO:
20:33:34.573 T:139808598329088   DEBUG: CAnnouncementManager - Announcement: OnPlay from xbmc
20:33:34.573 T:139808598329088   DEBUG: GOT ANNOUNCEMENT, type: 1, from xbmc, message OnPlay
20:33:34.573 T:139808598333568   DEBUG: ------ Window Deinit (DialogSubtitles.xml) ------
20:33:34.575 T:139806110230272   DEBUG: CDVDAudio::Resume - resume audio stream
20:33:34.575 T:139808500348672   DEBUG: ActiveAE - start sync of audio stream
20:33:34.575 T:139806110230272   DEBUG: CDVDClock::ErrorAdjust - CVideoPlayerAudio::OutputPacket - error:-58236.726922, adjusted:-41708.333333
20:33:34.645 T:139807259997952   DEBUG: CLEANSUBS >> PLAYBACK >>RESUMED<<
20:33:34.645 T:139808131233536   DEBUG: Skin Helper Service --> Kodi_Monitor: sender xbmc - method: Player.OnPlay  - data: {"item":{"id":3154,"type":"episode"},"player":{"playerid":1,"speed":1}}
20:33:34.706 T:139808500348672   DEBUG: ActiveAE::SyncStream - average error of 207.055579, start adjusting
20:33:34.736 T:139807259997952   DEBUG: CLEANSUBS >> SUBTITLES DOWNLOAD PATH SET TO: /storage/video2/Series/Vikings (2013)/Season 4
20:33:34.761 T:139807259997952   DEBUG: CLEANSUBS >> STOPPING TIMER - NOT IN SUBS DIALOG ANYMORE
20:33:34.856 T:139808500348672   DEBUG: ActiveAE::SyncStream - average error 25.717427, last average error: 207.055579
20:33:34.956 T:139808500348672   DEBUG: ActiveAE::SyncStream - average error of -6.290317, start adjusting
20:33:34.956 T:139808500348672   DEBUG: ActiveAE::SyncStream - average error -6.290317 below threshold of 30.000000
20:33:35.921 T:139806134753024   DEBUG: CLEANSUBS >> PROCESSED IN 1.42 SECONDS, NO LINES REMOVED
20:33:35.921 T:139806134753024   DEBUG: CLEANSUBS >> SUBS PROCESSED >>Vikings.S04E12.1080p.WEB-DL.DD5.1.H264-RARBG.en.srt

Congratulations !


RE: CleanSubs - Talguy - 2016-12-09

Will this addon by able to return results for subtitles with Foreign parts only and then download those?


RE: CleanSubs - User 325245 - 2016-12-09

I am not sure what you mean? Results from subtitle downloader or just select parts in different language?


RE: CleanSubs - incubus - 2016-12-09

DaLanik, I wrote earlier about CleanSubs errors when scanning folders for subtitles. Now that the interactive method work on folders too it has the same kind of errors, like that :
Code:
18:37:53.368 T:139807259997952   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.UnicodeDecodeError'>
                                            Error Contents: 'ascii' codec can't decode byte 0xc3 in position 28: ordinal not in range(128)
                                            Traceback (most recent call last):
                                              File "/storage/.kodi/addons/service.cleansubs/default.py", line 615, in onPlayBackStarted
                                                subsPath = PlayingInfo()
                                              File "/storage/.kodi/addons/service.cleansubs/default.py", line 670, in PlayingInfo
                                                xbmc.log("CLEANSUBS >> SUBTITLES DOWNLOAD PATH SET TO: " + path.encode('utf8'))
                                            UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 28: ordinal not in range(128)
                                            -->End of Python script error report<--

There's an apostrophe (single quote) in the path name at position 28.
From what I read on this particular UnicodeDecodeError thingy it's because the string has already been decoded before (elsewhere in the code I suppose in this case).


RE: CleanSubs - User 325245 - 2016-12-09

Damn, unicode in python is really heavy stuff Smile Will have a look.


RE: CleanSubs - User 325245 - 2016-12-10

v3.1
- Init overlays bug fix


RE: CleanSubs - User 325245 - 2016-12-11

v3.2
- Stats server update

new url for stats server: http://cleansubs.heliohost.org


RE: CleanSubs - incubus - 2016-12-11

(2016-12-11, 13:41)DaLanik Wrote: v3.2
- Stats server update

new url for stats server: http://cleansubs.heliohost.org

Will it fix this? :
Code:
DEBUG: CLEANSUBS >> SQL ERROR IN SyncStats1: 2003: Can't connect to MySQL server on 'stevie.heliohost.org:3306' (110 Connection timed out)

Thanks!


RE: CleanSubs - User 325245 - 2016-12-11

It should, yes. The stats server was down so I switched to another server Smile