Release CleanSubs - (Clean subtitles from the ads and other rubbish)
Hi there, reporting back for the path clean function. I see several problems in my debug log, of which I'm posting a sample:
Code:
20:14:32.231 T:9388   DEBUG: Thread LanguageInvoker start, auto delete: false
20:14:32.232 T:9388    INFO: initializing python engine.
20:14:32.232 T:9388   DEBUG: CPythonInvoker(61, C:\Users\JoScha\AppData\Roaming\Kodi\addons\service.cleansubs\standalone.py): start processing
20:14:32.298 T:9388   DEBUG: -->Python Interpreter Initialized<--
20:14:32.298 T:9388   DEBUG: CPythonInvoker(61, C:\Users\JoScha\AppData\Roaming\Kodi\addons\service.cleansubs\standalone.py): the source file to load is "C:\Users\JoScha\AppData\Roaming\Kodi\addons\service.cleansubs\standalone.py"
20:14:32.298 T:9388   DEBUG: CPythonInvoker(61, C:\Users\JoScha\AppData\Roaming\Kodi\addons\service.cleansubs\standalone.py): setting the Python path to C:\Users\JoScha\AppData\Roaming\Kodi\addons\service.cleansubs;C:\Program Files (x86)\Kodi\addons\script.module.pil\lib;C:\Users\JoScha\AppData\Roaming\Kodi\addons\script.module.beautifulsoup\lib;C:\Users\JoScha\AppData\Roaming\Kodi\addons\script.module.myconnpy\lib;C:\Program Files (x86)\Kodi\system\python\DLLs;C:\Program Files (x86)\Kodi\system\python\Lib;C:\Program Files (x86)\Kodi\python27.zip;C:\Program Files (x86)\Kodi\system\python\lib\plat-win;C:\Program Files (x86)\Kodi\system\python\lib\lib-tk;C:\Program Files (x86)\Kodi;C:\Program Files (x86)\Kodi\system\python;C:\Program Files (x86)\Kodi\system\python\lib\site-packages
20:14:32.298 T:9388   DEBUG: CPythonInvoker(61, C:\Users\JoScha\AppData\Roaming\Kodi\addons\service.cleansubs\standalone.py): entering source directory C:\Users\JoScha\AppData\Roaming\Kodi\addons\service.cleansubs
20:14:32.298 T:9388   DEBUG: CPythonInvoker(61, C:\Users\JoScha\AppData\Roaming\Kodi\addons\service.cleansubs\standalone.py): instantiating addon using automatically obtained id of "service.cleansubs" dependent on version 2.1.0 of the xbmc.python api
20:14:32.634 T:9388   DEBUG: CLEANSUBS >> DEFINITIONS >> NO NEW DEFINITIONS (L:21244 == R:21244)
20:14:32.693 T:9388   DEBUG: CLEANSUBS >> DELETED AND CREATED NEW DEF DB
20:14:43.619 T:9388   DEBUG: CLEANSUBS >> READ TOTAL DEFINITIONS: 0 elements
20:14:43.619 T:9388   DEBUG: CLEANSUBS STANDALONE >> STARTED VERSION 5.0
20:14:43.620 T:9388   DEBUG: JSONRPC: Incoming request: {
                                                "jsonrpc": "2.0",
                                                "id": 1,
                                                "method": "Files.GetSources",
                                                "params": {
                                                    "media": "video"
                                                    }
                                                }
20:14:43.620 T:9388   DEBUG: CLEANSUBS >> VIDEO PATHS >> multipath://nfs%3a%2f%2f192.168.1.185%2fd%2fTV-Movie%2f_Movie%2fAction-Adventure-Western%2f/nfs%3a%2f%2f192.168.1.185%2fd%2fTV-Movie%2f_Movie%2fAsian%2f/nfs%3a%2f%2f192.168.1.185%2fd%2fTV-Movie%2f_Movie%2fComedy-Family-Romance%2f/nfs%3a%2f%2f192.168.1.185%2fd%2fTV-Movie%2f_Movie%2fCrime-Suspense-Mystery%2f/nfs%3a%2f%2f192.168.1.185%2fd%2fTV-Movie%2f_Movie%2fDrama-War%2f/nfs%3a%2f%2f192.168.1.185%2fd%2fTV-Movie%2f_Movie%2fHorror%2f/nfs%3a%2f%2f192.168.1.185%2fd%2fTV-Movie%2f_Movie%2fSf-Fantasy%2f/nfs%3a%2f%2f192.168.1.185%2ft%2fTV-Movie2%2f_Doku%2f/nfs%3a%2f%2f192.168.1.185%2ft%2fTV-Movie2%2f_Anime%2f_Movies%2f/
20:14:43.620 T:9388   DEBUG: CLEANSUBS >> VIDEO PATHS >> nfs://192.168.1.185/t/TV-Movie2/_Anime/_Series/
20:14:43.620 T:9388   DEBUG: CLEANSUBS >> VIDEO PATHS >> nfs://192.168.1.185/t/TV-Movie2/_tv/
20:14:43.620 T:9388   DEBUG: CLEANSUBS >> VIDEO PATHS >> nfs://192.168.1.185/q/Music/_dvd-V/
20:14:43.620 T:9388   DEBUG: CLEANSUBS >> VIDEO PATHS >> nfs://192.168.1.185/d/TV-Movie/_Movie/Animation/
20:14:48.486 T:9388   DEBUG: DialogProgress::Open called
20:14:48.486 T:9388   DEBUG: ------ Window Init (DialogConfirm.xml) ------
20:16:11.077 T:9388   DEBUG: CLEANSUBS STANDALONE >> BEGIN PATH: >>\\POSTMAN\TV-Movie2\_tv\<< FOLDERS IN PATH: >>362<<
...
20:16:51.647 T:9388   DEBUG: CLEANSUBS STANDALONE >> FILE: >>American.Horror.Story.S02E12.en.srt<<
20:16:51.677 T:9388   DEBUG: CLEANSUBS >> SQL ERROR IN CheckDatabase
20:16:51.677 T:9388   DEBUG: CLEANSUBS >> SUB STATS WILL BE ADDED TO LOCAL DATABASE
20:16:51.692 T:9388   DEBUG: CLEANSUBS >> ENC >> OPENED WITH ENCODING: utf-8
20:16:51.713 T:9388   DEBUG: CLEANSUBS >> SQL ERROR IN AddtoDatabase : no such table: stats
20:16:51.736 T:9388   DEBUG: Previous line repeats 1 times.
20:16:51.736 T:9388   DEBUG: CLEANSUBS >> PROCESSED IN 0.09 SECONDS, NO LINES REMOVED
20:16:51.736 T:9388   DEBUG: CLEANSUBS STANDALONE >> FILE: >>American.Horror.Story.S02E12.ja.srt<<
20:16:51.766 T:9388   DEBUG: CLEANSUBS >> SQL ERROR IN CheckDatabase
20:16:51.767 T:9388   DEBUG: CLEANSUBS >> SUB STATS WILL BE ADDED TO LOCAL DATABASE
20:16:51.777 T:9388   DEBUG: CLEANSUBS >> ENC >> TRYING ENCODING utf-8
20:16:51.782 T:9388   DEBUG: CLEANSUBS >> ENC >> TRYING ENCODING cp1250
20:16:51.792 T:9388   DEBUG: CLEANSUBS >> ENC >> TRYING ENCODING cp1251
20:16:51.797 T:9388   DEBUG: CLEANSUBS >> ENC >> TRYING ENCODING cp1252
20:16:51.807 T:9388   DEBUG: CLEANSUBS >> ENC >> TRYING ENCODING cp1253
20:16:51.817 T:9388   DEBUG: CLEANSUBS >> ENC >> TRYING ENCODING cp1254
20:16:51.827 T:9388   DEBUG: CLEANSUBS >> ENC >> TRYING ENCODING cp1257
20:16:51.827 T:9388   DEBUG: CLEANSUBS >> ENC >> OPENED WITH KODI ENCODING:
20:16:51.848 T:9388   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.LookupError'>
                                            Error Contents: unknown encoding:
                                            Traceback (most recent call last):
                                              File "C:\Users\JoScha\AppData\Roaming\Kodi\addons\service.cleansubs\standalone.py", line 290, in <module>
                                                intCancel = scanPaths(manFolder, 1, 1, 3)
                                              File "C:\Users\JoScha\AppData\Roaming\Kodi\addons\service.cleansubs\standalone.py", line 176, in scanPaths
                                                process_subs(os.path.join(path, basePath, name), 1)
                                              File "C:\Users\JoScha\AppData\Roaming\Kodi\addons\service.cleansubs\default.py", line 300, in process_subs
                                                file_input = codecs.open(fileName, 'r', SubCharset, errors='ignore')
                                              File "C:\Program Files (x86)\Kodi\system\python\Lib\codecs.py", line 899, in open
                                                info = lookup(encoding)
                                            LookupError: unknown encoding:
                                            -->End of Python script error report<--

1. It seems like there's problem with a non-existing table "stats".
2. It seems like there's a problem with double-byte encoded subs, in my case codepage 932 ANSI/OEM Japanese (Shift JIS). That's the part where Cleansubs tries a few different codepages and finally fails with erroring out. Maybe this could be made more resilient by skipping.

3. The cleaning itself seems to fail partially. Example:
American.Horror.Story.S02E12.en.srt vs. American.Horror.Story.S02E12.en.srt_ORIGINAL

Cleansubs manages to clean the last lines of the sub which are
Code:
728
00:42:42,598 --> 00:42:52,817
<font color="#ec14bd">Sync & corrections by honeybunny</font>
<font color="#ec14bd">www.addic7ed.com</font>

However, it fails to clean stuff from the top which still has
Code:
1
00:00:48,917 --> 00:00:51,152
Daddy?

2
00:00:51,220 --> 00:00:53,788
Daddy'll be there in a minute.

3
00:01:48,608 --> 00:01:58,632
<font color="#ec14bd">Sync & corrections by honeybunny</font>
<font color="#ec14bd">www.addic7ed.com</font>

I'll be back with some more tests about NFS.
Reply


Messages In This Thread
RE: CleanSubs - by User 325245 - 2016-07-21, 14:01
RE: CleanSubs - by peppe_sr - 2016-07-21, 16:16
RE: CleanSubs - by misa - 2016-07-21, 16:25
RE: CleanSubs - by User 325245 - 2016-07-21, 18:38
RE: CleanSubs - by Atreyu - 2016-07-21, 23:17
RE: CleanSubs - by User 325245 - 2016-07-22, 08:18
RE: CleanSubs - by User 325245 - 2016-07-22, 09:10
RE: CleanSubs - by misa - 2016-07-22, 08:04
RE: CleanSubs - by User 325245 - 2016-07-22, 08:20
RE: CleanSubs - by misa - 2016-07-22, 08:21
RE: CleanSubs - by User 325245 - 2016-07-22, 08:50
RE: CleanSubs - by Atreyu - 2016-07-22, 19:28
RE: CleanSubs - by mac1202 - 2016-07-22, 20:31
RE: CleanSubs - by User 325245 - 2016-07-22, 20:52
RE: CleanSubs - by mac1202 - 2016-07-22, 21:07
RE: CleanSubs - by User 325245 - 2016-07-22, 21:19
RE: CleanSubs - by mac1202 - 2016-07-22, 21:21
RE: CleanSubs - by User 325245 - 2016-07-22, 21:23
RE: CleanSubs - by User 325245 - 2016-07-22, 23:52
RE: CleanSubs - by User 325245 - 2016-07-24, 20:14
RE: CleanSubs - by mac1202 - 2016-07-25, 11:15
RE: CleanSubs - by User 325245 - 2016-07-25, 11:20
RE: CleanSubs - by User 325245 - 2016-07-26, 15:21
RE: CleanSubs - by User 325245 - 2016-09-15, 15:41
RE: CleanSubs - by schumi2004 - 2016-09-15, 18:22
RE: CleanSubs - by User 325245 - 2016-09-19, 19:42
RE: CleanSubs - by Atreyu - 2016-09-19, 21:09
RE: CleanSubs - by User 325245 - 2016-09-19, 23:01
RE: CleanSubs - by User 325245 - 2016-09-20, 09:43
RE: CleanSubs - by Fail$tyle420 - 2016-09-20, 21:59
RE: CleanSubs - by User 325245 - 2016-09-20, 22:06
RE: CleanSubs - by Fail$tyle420 - 2016-09-21, 08:26
RE: CleanSubs - by User 325245 - 2016-09-21, 10:51
RE: CleanSubs - by User 325245 - 2016-09-24, 12:43
RE: CleanSubs - by Fail$tyle420 - 2016-09-24, 17:50
RE: CleanSubs - by Fail$tyle420 - 2016-09-27, 01:31
RE: CleanSubs - by User 325245 - 2016-09-27, 11:18
RE: CleanSubs - by Fail$tyle420 - 2016-09-27, 02:34
RE: CleanSubs - by User 325245 - 2016-09-27, 14:58
RE: CleanSubs - by Fail$tyle420 - 2016-09-27, 17:23
RE: CleanSubs - by User 325245 - 2016-09-27, 21:07
RE: CleanSubs - by User 325245 - 2016-09-27, 22:55
RE: CleanSubs - by Fail$tyle420 - 2016-09-28, 00:36
RE: CleanSubs - by User 325245 - 2016-09-28, 11:52
RE: CleanSubs - by Fail$tyle420 - 2016-09-28, 18:49
RE: CleanSubs - by User 325245 - 2016-09-28, 20:53
RE: CleanSubs - by User 325245 - 2016-09-30, 15:23
RE: CleanSubs - by User 325245 - 2016-10-05, 14:50
RE: CleanSubs - by User 325245 - 2016-10-05, 19:48
RE: CleanSubs - by User 325245 - 2016-10-07, 13:33
RE: CleanSubs - by schumi2004 - 2016-10-07, 14:08
RE: CleanSubs - by User 325245 - 2016-10-24, 23:10
RE: CleanSubs - by User 325245 - 2016-11-03, 11:48
RE: CleanSubs - by User 325245 - 2016-11-12, 18:07
RE: CleanSubs - by dr.joaomarcelo - 2016-11-13, 06:46
RE: CleanSubs - by User 325245 - 2016-11-13, 14:30
RE: CleanSubs - by User 325245 - 2016-11-13, 23:20
RE: CleanSubs - by User 325245 - 2016-11-14, 11:13
RE: CleanSubs - by User 325245 - 2016-11-25, 19:11
RE: CleanSubs - by patrickdrd - 2016-11-27, 20:06
RE: CleanSubs - by User 325245 - 2016-11-27, 20:57
RE: CleanSubs - by patrickdrd - 2016-11-27, 21:05
RE: CleanSubs - by User 325245 - 2016-11-27, 21:16
RE: CleanSubs - by patrickdrd - 2016-11-27, 21:21
RE: CleanSubs - by patrickdrd - 2016-11-28, 12:25
RE: CleanSubs - by User 325245 - 2016-11-30, 22:33
RE: CleanSubs - by patrickdrd - 2016-11-30, 22:38
RE: CleanSubs - by User 325245 - 2016-11-30, 22:43
RE: CleanSubs - by incubus - 2016-12-01, 00:18
RE: CleanSubs - by User 325245 - 2016-12-01, 09:50
RE: CleanSubs - by incubus - 2016-12-01, 10:48
RE: CleanSubs - by schumi2004 - 2016-12-01, 12:17
RE: CleanSubs - by User 325245 - 2016-12-01, 20:33
RE: CleanSubs - by User 325245 - 2016-12-01, 20:45
RE: CleanSubs - by incubus - 2016-12-01, 23:21
RE: CleanSubs - by User 325245 - 2016-12-02, 18:04
RE: CleanSubs - by User 325245 - 2016-12-02, 00:26
RE: CleanSubs - by User 325245 - 2016-12-02, 19:00
RE: CleanSubs - by incubus - 2016-12-02, 19:03
RE: CleanSubs - by incubus - 2016-12-02, 19:02
RE: CleanSubs - by incubus - 2016-12-02, 21:49
RE: CleanSubs - by User 325245 - 2016-12-03, 13:34
RE: CleanSubs - by incubus - 2016-12-03, 21:03
RE: CleanSubs - by incubus - 2016-12-03, 22:08
RE: CleanSubs - by User 325245 - 2016-12-03, 22:53
RE: CleanSubs - by incubus - 2016-12-03, 23:04
RE: CleanSubs - by incubus - 2016-12-04, 16:14
RE: CleanSubs - by User 325245 - 2016-12-04, 18:36
RE: CleanSubs - by incubus - 2016-12-04, 18:54
RE: CleanSubs - by User 325245 - 2016-12-04, 19:02
RE: CleanSubs - by incubus - 2016-12-04, 19:27
RE: CleanSubs - by User 325245 - 2016-12-04, 19:40
RE: CleanSubs - by incubus - 2016-12-05, 13:07
RE: CleanSubs - by User 325245 - 2016-12-05, 13:21
RE: CleanSubs - by User 325245 - 2016-12-05, 15:58
RE: CleanSubs - by incubus - 2016-12-05, 17:22
RE: CleanSubs - by User 325245 - 2016-12-05, 18:25
RE: CleanSubs - by incubus - 2016-12-05, 18:32
RE: CleanSubs - by User 325245 - 2016-12-06, 14:53
RE: CleanSubs - by incubus - 2016-12-06, 15:12
RE: CleanSubs - by User 325245 - 2016-12-06, 19:23
RE: CleanSubs - by incubus - 2016-12-06, 21:35
RE: CleanSubs - by User 325245 - 2016-12-06, 23:17
RE: CleanSubs - by incubus - 2016-12-07, 01:19
RE: CleanSubs - by incubus - 2016-12-06, 21:47
RE: CleanSubs - by User 325245 - 2016-12-06, 22:34
RE: CleanSubs - by incubus - 2016-12-07, 01:09
RE: CleanSubs - by User 325245 - 2016-12-08, 09:52
RE: CleanSubs - by incubus - 2016-12-08, 14:59
RE: CleanSubs - by User 325245 - 2016-12-08, 12:15
RE: CleanSubs - by incubus - 2016-12-08, 21:37
RE: CleanSubs - by Talguy - 2016-12-09, 17:17
RE: CleanSubs - by User 325245 - 2016-12-09, 19:14
RE: CleanSubs - by incubus - 2016-12-09, 20:11
RE: CleanSubs - by User 325245 - 2016-12-09, 22:03
RE: CleanSubs - by User 325245 - 2016-12-10, 13:13
RE: CleanSubs - by User 325245 - 2016-12-11, 13:41
RE: CleanSubs - by incubus - 2016-12-11, 17:23
RE: CleanSubs - by User 325245 - 2016-12-11, 18:21
RE: CleanSubs - by incubus - 2016-12-11, 21:10
RE: CleanSubs - by User 325245 - 2016-12-11, 21:33
RE: CleanSubs - by incubus - 2016-12-12, 01:23
RE: CleanSubs - by User 325245 - 2016-12-12, 11:18
RE: CleanSubs - (Clean subtitles from the ads and other rubbish) - by HeresJohnny - 2017-02-23, 21:49
Logout Mark Read Team Forum Stats Members Help
CleanSubs - (Clean subtitles from the ads and other rubbish)2