Kodi Community Forum

Full Version: CleanSubs - (Clean subtitles from the ads and other rubbish)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
(2017-08-30, 09:20)DaLanik Wrote: [ -> ]Thanx for the info.

If I can ask for 1 more thing, I just need to see exactly what path is it using from guisettings.xml, under [subtitles] line <custompath> - I suppose this is where the paths is stored.

If you're looking for the subtitle storage location it is set for "next to the video" in Kodi's configuration. The "custompath" is not set

Code:
<subtitles>
        <align default="true">0</align>
        <charset default="true">DEFAULT</charset>
        <color default="true">1</color>
        <custompath default="true"></custompath>
        <downloadfirst default="true">false</downloadfirst>
        <font default="true">arial.ttf</font>
        <height default="true">28</height>
        <languages>Dutch,English</languages>
        <movie>service.subtitles.opensubtitles_by_opensubtitles</movie>
        <overrideassfonts default="true">false</overrideassfonts>
        <parsecaptions default="true">false</parsecaptions>
        <pauseonsearch default="true">true</pauseonsearch>
        <stereoscopicdepth default="true">0</stereoscopicdepth>
        <storagemode default="true">0</storagemode>
        <style default="true">1</style>
        <tv>service.subtitles.opensubtitles_by_opensubtitles</tv>
    </subtitles>
@DragonFly and cgi2011:

This seems to be the same error, I can explain it only if it is smb:// path (for the time being) Smile Smile
(2017-08-13, 14:02)john3voltas Wrote: [ -> ]...
There are a couple of details, though.
- The subs always show in yellow font on a black background whereas I would expect a white font over a black background. Is that hardcoded or can that be changed? Can't find anything related to that in the settings.
- I have problems with the characters 'ã', 'à' and 'ê'. They don't show up as expected. Are you converting to UTF-8 before converting to ASS/SSA? In order for this to work flawlessly IIRC the SRT needs to be converted to UTF-8.
Or could it be the font in use that doesn't support those special characters? I didn't run into this issue when I tried doing it the manual way 2622050 (post).
Could you please comment?
Thanks in advance.
Cheers
Hi,

thank you for pointing out the wrong path, i corrected it already.

Unfortunately it still doesn't work. Here is another Log, i had to clean it a little because the size was too big for pastebin...

- I am using mainly subscene or opensubs.org, if i have no local subs already
- Nvidia Shield @ Anroid 7 with Kodi 17.4

Here are the settings:

PHP Code:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<settings>
    <category label="30000">
        <setting label="30001" type="bool"   id="on" default="true"/>
        <setting label="30002" type="bool"   id="info" default="true"/>
        <setting label="30003" type="bool"   id="logo" default="true"/>
        <setting label="30004" type="enum"   id="method"  lvalues="30011|30012|30013" default="0"/>
        <setting label="30008" type="slider" id="herlines" option="int" range="1,1,20" enable="lt(-1,2)" default="2" />
        <setting label="30005" type="folder" id="folder" source="auto"/>
        <setting label="30007" type="bool"   id="removecc" default="false"/>
        <setting label="30101" type="bool"   id="removetags" default="false"/>
        <setting label="30102" type="bool"   id="blackbar" default="false"/>
        <setting label="30009" type="bool"   id="custdef" default="true"/>
        <setting label="30100" type="bool"   id="delorigsub" default="false"/>
    </category>
</settings> 

Greets and thx Smile [/php]
cgi2011

(2017-08-28, 19:27)DaLanik Wrote: [ -> ]Can you please confirm what you are doing;

* You are downloading the subs via addon (subscene)
* What is your platform?

There is a problem with path: 'No such file or directory', '\\\\Schr0dinger\\Movies\\Adventure')

so there is double \\ at the beginning. Can you post here your settings file for Cleansubs?
(2017-08-30, 17:45)john3voltas Wrote: [ -> ]
(2017-08-13, 14:02)john3voltas Wrote: [ -> ]...
There are a couple of details, though.
- The subs always show in yellow font on a black background whereas I would expect a white font over a black background. Is that hardcoded or can that be changed? Can't find anything related to that in the settings.
- I have problems with the characters 'ã', 'à' and 'ê'. They don't show up as expected. Are you converting to UTF-8 before converting to ASS/SSA? In order for this to work flawlessly IIRC the SRT needs to be converted to UTF-8.
Or could it be the font in use that doesn't support those special characters? I didn't run into this issue when I tried doing it the manual way 2622050 (post).
Could you please comment?
Thanks in advance.
Cheers

I will look into font color option, just returned from vacation and have a lot of work.... Smile
It should be converted to UTF8, I'll check.
Thanks a bunch, DaLanik.
Take it easy, no rush. ;-)
v6.11
- Option to change text color with black bar (background)

In the TEST repo.

Will take a look at encoding next Smile I could reproduce the error.

I also added small debugging for the SMB - double slash (\\) problem. If you could try again and post the log.... I don't use SMB/servers so I really can't test.
Thanks a bunch, man. :-)
(2017-08-31, 13:49)DaLanik Wrote: [ -> ]v6.11
- Option to change text color with black bar (background)

In the TEST repo.

Will take a look at encoding next Smile I could reproduce the error.

I also added small debugging for the SMB - double slash (\\) problem. If you could try again and post the log.... I don't use SMB/servers so I really can't test.

I'm afraid the error is still there:
Code:
17:06:56.358 T:138836690000    INFO: CPythonInvoker(31, /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/service.subtitles.opensubtitles_by_opensubtitles/service.py): script successfully run
17:06:56.505 T:138836690000    INFO: Python script stopped
17:06:56.505 T:138836690000   DEBUG: Thread LanguageInvoker 138836690000 terminating
17:06:56.651 T:138790503504   DEBUG: CLEANSUBS >> CURRENT WINDOW 10153 - STARTING TIMER
17:06:56.667 T:138790503504   DEBUG: CLEANSUBS >> DEBUGGGGGGGGGGG: custpath: ''
17:06:56.667 T:138790503504   DEBUG: CLEANSUBS >> DEBUGGGGGGGGGGG: storagemode: 0
17:06:56.668 T:138790503504   DEBUG: CLEANSUBS >> DEBUGGGGGGGGGGG: ELSE:SM0: path is Folderpath: 'smb://192.168.1.10/G/TV-Series/SeriesNAME'
17:06:56.668 T:138790503504   DEBUG: CLEANSUBS >> DEBUGGGGGGGGGGG: path is smb1: '//192.168.1.10/G/TV-Series/SeriesNAME'
17:06:56.668 T:138790503504   DEBUG: CLEANSUBS >> DEBUGGGGGGGGGGG: path is smb2: '\\192.168.1.10\G\TV-Series\SeriesNAME'
17:06:56.668 T:138790503504   DEBUG: CLEANSUBS >> DEBUGGGGGGGGGGG: path is smb3: '\\192.168.1.10\G\TV-Series\SeriesNAME'
17:06:56.668 T:138790503504   DEBUG: CLEANSUBS >> SUBTITLES DOWNLOAD PATH SET TO: '\\192.168.1.10\G\TV-Series\SeriesNAME'
17:06:56.670 T:138790503504   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.OSError'>
                                            Error Contents: (2, 'No such file or directory', '\\\\192.168.1.10\\G\\TV-Series\\SeriesNAME')
                                            Traceback (most recent call last):
                                              File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/service.cleansubs/default.py", line 1511, in <module>
                                                before = dict([(f, None) for f in os.listdir(subsPath)])
                                            OSError: (2, 'No such file or directory', '\\\\192.168.1.10\\G\\TV-Series\\SeriesNAME')
                                            -->End of Python script error report<--
17:06:56.684 T:138182657104   DEBUG: ------ Window Init (DialogNotification.xml) ------
17:06:56.807 T:138790503504    INFO: Python script stopped

As mentioned before, on Windows 10 when loading content from the same server using SMB (as in a shared windows folder), it does work:

Code:
17:58:30.202 T:1404   DEBUG: CLEANSUBS >> CURRENT WINDOW 10153 - STARTING TIMER
17:58:30.210 T:1404   DEBUG: CLEANSUBS >> DEBUGGGGGGGGGGG: custpath: ''
17:58:30.210 T:1404   DEBUG: CLEANSUBS >> DEBUGGGGGGGGGGG: storagemode: 0
17:58:30.210 T:1404   DEBUG: CLEANSUBS >> DEBUGGGGGGGGGGG: ELSE:SM0: path is Folderpath: 'smb://192.168.1.10/G/TV-Series/SeriesNAME'
17:58:30.210 T:1404   DEBUG: CLEANSUBS >> DEBUGGGGGGGGGGG: path is smb1: '//192.168.1.10/G/TV-Series/SeriesNAME'
17:58:30.210 T:1404   DEBUG: CLEANSUBS >> DEBUGGGGGGGGGGG: path is smb2: '\\192.168.1.10\G\TV-Series\SeriesNAME'
17:58:30.210 T:1404   DEBUG: CLEANSUBS >> DEBUGGGGGGGGGGG: path is smb3: '\\192.168.1.10\G\TV-Series\SeriesNAME'
17:58:30.210 T:1404   DEBUG: CLEANSUBS >> SUBTITLES DOWNLOAD PATH SET TO: '\\192.168.1.10\G\TV-Series\SeriesNAME'

17:58:48.248 T:4548   DEBUG: CLEANSUBS >> SUBS ADDED >>SeriesEPISODE 104.en.srt
17:58:48.256 T:4548   DEBUG: CLEANSUBS >> SQL ERROR IN CheckDatabase
17:58:48.256 T:4548   DEBUG: CLEANSUBS >> SUB STATS WILL BE ADDED TO LOCAL DATABASE
17:58:48.260 T:4488   DEBUG: CUtil::GetExternalStreamDetailsFromFilename - Language = 'eng' / Name = '(extern)' / Flag = '0' from smb://192.168.1.10/G/TV-Series/SeriesNAME/SeriesEPISODE 104.en.srt
17:58:48.260 T:4488  NOTICE: Closing stream player 3
17:58:48.260 T:4488  NOTICE: Opening stream: 0 source: 1024
17:58:48.260 T:4488   DEBUG: CFileCache::Open - opening <G/TV-Series/SeriesNAME/SeriesEPISODE 104.en.srt> using cache
17:58:48.260 T:3260   DEBUG: Thread FileCache start, auto delete: false
17:58:48.261 T:3260    INFO: CFileCache::Process - Source read didn't return any data! Hit eof(?)
17:58:48.261 T:4548   DEBUG: CLEANSUBS >> ENC >> OPENED WITH ENCODING: utf-8
17:58:48.284 T:4548   DEBUG: CLEANSUBS >> SQL ERROR IN AddtoDatabase : no such table: stats
17:58:48.311 T:3260   DEBUG: Thread FileCache 3260 terminating
17:58:48.414 T:4548   DEBUG: CLEANSUBS >> SQL ERROR IN AddtoDatabase : no such table: stats
17:58:48.644 T:3452   DEBUG: ------ Window Deinit (DialogSubtitles.xml) ------
17:58:48.644 T:5940   DEBUG: CAnnouncementManager - Announcement: OnPlay from xbmc
17:58:48.645 T:5940   DEBUG: GOT ANNOUNCEMENT, type: 1, from xbmc, message OnPlay
17:58:48.649 T:3252   DEBUG: CDVDAudio::Resume - resume audio stream
17:58:48.649 T:3048   DEBUG: ActiveAE - start sync of audio stream
17:58:48.742 T:1404   DEBUG: CLEANSUBS >> PLAYBACK >>RESUMED<<
17:58:48.743 T:1404   DEBUG: CLEANSUBS >> DEBUGGGGGGGGGGG: custpath: ''
17:58:48.743 T:1404   DEBUG: CLEANSUBS >> DEBUGGGGGGGGGGG: storagemode: 0
17:58:48.744 T:1404   DEBUG: CLEANSUBS >> DEBUGGGGGGGGGGG: ELSE:SM0: path is Folderpath: 'smb://192.168.1.10/G/TV-Series/SeriesNAME'
17:58:48.744 T:1404   DEBUG: CLEANSUBS >> DEBUGGGGGGGGGGG: path is smb1: '//192.168.1.10/G/TV-Series/SeriesNAME'
17:58:48.744 T:1404   DEBUG: CLEANSUBS >> DEBUGGGGGGGGGGG: path is smb2: '\\192.168.1.10\G\TV-Series\SeriesNAME'
17:58:48.744 T:1404   DEBUG: CLEANSUBS >> DEBUGGGGGGGGGGG: path is smb3: '\\192.168.1.10\G\TV-Series\SeriesNAME'
17:58:48.744 T:1404   DEBUG: CLEANSUBS >> SUBTITLES DOWNLOAD PATH SET TO: '\\192.168.1.10\G\TV-Series\SeriesNAME'
17:58:48.779 T:3048   DEBUG: ActiveAE::SyncStream - average error of 189.867564, start adjusting
17:58:48.858 T:4548   DEBUG: CLEANSUBS >> PROCESSED IN 0.61 SECONDS, REMOVED 137 LINES
17:58:48.859 T:4548   DEBUG: CLEANSUBS >> SUBS PROCESSED >>SeriesEPISODE 104.en.srt
Yes, the bug should still be there Smile

try the v6.12 in the test repo, please Smile

As far as I know Android, doesn't have smb client built in, this is something implemeted in Kodi. Maybe I should check the OS and do the smb: path conversion only for Windows.
(2017-08-31, 18:27)DaLanik Wrote: [ -> ]Yes, the bug should still be there Smile

try the v6.12 in the test repo, please Smile

As far as I know Android, doesn't have smb client built in, this is something implemeted in Kodi. Maybe I should check the OS and do the smb: path conversion only for Windows.

First, thanx for your effort. Sadly, the log also shows (in single "\") it can't find the path:

Code:
19:24:08.416 T:138794746960   DEBUG: CLEANSUBS >> CURRENT WINDOW 10153 - STARTING TIMER
19:24:08.434 T:138794746960   DEBUG: CLEANSUBS >> SUBTITLES DOWNLOAD PATH SET TO: '\\192.168.1.10\G\TV-Series\SeriesNAME'
19:24:08.435 T:138794746960   DEBUG: CLEANSUBS >> DEBUGGGGGGG >> PATH \\192.168.1.10\G\TV-Series\SeriesNAME DOES NOT EXIST!!!!!
19:24:09.436 T:138794746960   DEBUG: CLEANSUBS >> CURRENT WINDOW 10153 - STARTING TIMER
19:24:09.454 T:138794746960   DEBUG: CLEANSUBS >> SUBTITLES DOWNLOAD PATH SET TO: '\\192.168.1.10\G\TV-Series\SeriesNAME'
19:24:09.455 T:138794746960   DEBUG: CLEANSUBS >> DEBUGGGGGGG >> PATH \\192.168.1.10\G\TV-Series\SeriesNAME DOES NOT EXIST!!!!!
19:24:10.456 T:138794746960   DEBUG: CLEANSUBS >> CURRENT WINDOW 10153 - STARTING TIMER
19:24:10.471 T:138794746960   DEBUG: CLEANSUBS >> SUBTITLES DOWNLOAD PATH SET TO: '\\192.168.1.10\G\TV-Series\SeriesNAME'
19:24:10.471 T:138794746960   DEBUG: CLEANSUBS >> DEBUGGGGGGG >> PATH \\192.168.1.10\G\TV-Series\SeriesNAME DOES NOT EXIST!!!!!
19:24:11.473 T:138794746960   DEBUG: CLEANSUBS >> CURRENT WINDOW 10153 - STARTING TIMER
19:24:11.487 T:138794746960   DEBUG: CLEANSUBS >> SUBTITLES DOWNLOAD PATH SET TO: '\\192.168.1.10\G\TV-Series\SeriesNAME'
19:24:11.487 T:138794746960   DEBUG: CLEANSUBS >> DEBUGGGGGGG >> PATH \\192.168.1.10\G\TV-Series\SeriesNAME DOES NOT EXIST!!!!!

Perhaps a missing trailing "\" or a authorization issue?......just guessing

I will try to play directly from an attached USB or from the internal HD using the same path format
Yes occured to me it could be trailing \. But maybe on Android/Kodi SMB must have \ instead of / which I use in Windows.

please try 6.13 in the test repo. Smile
(2017-08-31, 19:35)DaLanik Wrote: [ -> ]Yes occured to me it could be trailing \. But maybe on Android/Kodi SMB must have \ instead of / which I use in Windows.

please try 6.13 in the test repo. Smile

Using 6.13 but I can't see if the trailing / is used. The log shows an error without it
Code:
19:56:15.822 T:138794746960   DEBUG: CLEANSUBS >> CURRENT WINDOW 10153 - STARTING TIMER
19:56:15.839 T:138794746960   DEBUG: CLEANSUBS >> SUBTITLES DOWNLOAD PATH SET TO: 'smb://192.168.1.10/G/TV-Series/SeriesNAME'
19:56:15.839 T:138794746960   DEBUG: CLEANSUBS >> DEBUGGGGGGG >> PATH smb://192.168.1.10/G/TV-Series/SeriesNAME DOES NOT EXIST!!!!!

Anyway, playing directly from the Shields internal HD works
No I didn't add trailing / just left the smb:// if platform is not windows.

Yes, internal drives work, it was always smb that is the problem - all platforms handle it differently if at all Smile
v6.14 - no smb:// conversion for android and added trailing /
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