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 - (Clean subtitles from the ads and other rubbish) - DragonFly - 2017-08-31

6.14 Sorry, however trailing / is visible
Code:
CLEANSUBS >> DEBUGGGGGGG >> PATH smb:/192.168.1.10/G/TV-Series/SeriesName/ DOES NOT EXIST!!!!!

Perhaps It needs to be smb://. All other kodi log calls refer to smb:// like
Code:
21:31:41.821 T:138808218704   DEBUG: OnDownloadComplete - Saving subtitle special://temp/SeriesEPISODE.en.srt to smb://192.168.1.10/G/TV-Series/SeriesNAME/SeriesEPISODE 103.en.srt

P.S do you need to use authorization in your code, like smb://USERNAMETongue[email protected]/G/TV-Series/SeriesNAME or is this done by Kodi automatically?


RE: CleanSubs - (Clean subtitles from the ads and other rubbish) - User 325245 - 2017-08-31

It is smb:// now. And it definitely doesn't work like that on Windows. Windows can access it just by using UNC path i.e. \\192.168.1.10\

I don't know about the authorisation....


RE: CleanSubs - (Clean subtitles from the ads and other rubbish) - User 325245 - 2017-09-01

OK, please test v6.15 in the test repo....


RE: CleanSubs - (Clean subtitles from the ads and other rubbish) - DragonFly - 2017-09-01

Sorry DaLanik....no go

See log (now using actual names) where a subtitle is downloaded after the error:

Code:
14:59:42.656 T:138786358352   DEBUG: CLEANSUBS >> DEBUGGGGGGG >> PATH smb://192.168.1.10/G/TV-Series/Get Shorty DOES NOT EXIST!!!!!
14:59:43.294 T:138794746960    INFO: CPythonInvoker(46, /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/service.subtitles.addic7ed/service.py): script successfully run
14:59:43.296 T:138811327568   DEBUG: OnDownloadComplete - Saving subtitle special://temp/Get Shorty 104.en.srt to smb://192.168.1.10/G/TV-Series/Get Shorty/Get Shorty 104.en.srt
14:59:43.297 T:138811327568 WARNING: SMBFile::OpenForWrite() called with overwriting enabled! - smb://USERNAME:[email protected]/G/TV-Series/Get%20Shorty/Get%20Shorty%20104.en.srt

It's also not caused by spaces in the name (%20). Tried it with a non-spaced SeriesName and got the same error.
I guess USERNAMETongueASSWORD@ are parsed from passwords.xml


RE: CleanSubs - (Clean subtitles from the ads and other rubbish) - User 325245 - 2017-09-01

OK, I must rewrite it to completely use xbmcvfs module.... It'll take some time.


RE: CleanSubs - (Clean subtitles from the ads and other rubbish) - cgi2011 - 2017-09-02

Hi Lanik,

where can I find your test report?

Thx
cgi2011
#######################

Forget it, I just found it ☺️


RE: CleanSubs - (Clean subtitles from the ads and other rubbish) - User 325245 - 2017-09-03

OK, I completely rewrote the service to use xbmcvfs ... so in theory it shoud work with smb:// paths. I could only test normal operation with local paths and it seems to be working. Be warned that BASIC FUNCTIONALITY may fail, this is really only for TEST purposes. If you don't use smb:// there is no reason to install.

I made the addon copy the subtitle locally, process it and then copy back to smb:// path, so you need to have write access rights.

v.6.16, in the TEST repo


RE: CleanSubs - (Clean subtitles from the ads and other rubbish) - cgi2011 - 2017-09-04

There is only V 6.15 in the Test Repo.... Could you please check?

Thx


RE: CleanSubs - (Clean subtitles from the ads and other rubbish) - User 325245 - 2017-09-04

Nope, just cheched, 6.16, must be caching or something...


RE: CleanSubs - (Clean subtitles from the ads and other rubbish) - DragonFly - 2017-09-04

Appreciate the effort, Dalanik

So I've noticed a Cleansubs progressbar I've never seen before..... but still no go

Code:
22:11:13.735 T:138577679440   DEBUG: CLEANSUBS >> CURRENT WINDOW 10153 - STARTING TIMER
22:11:13.764 T:138577679440   DEBUG: CLEANSUBS >> SUBTITLES DOWNLOAD PATH SET TO: 'smb://192.168.1.10/G/TV-Series/Get Shorty'
22:11:13.764 T:138577679440   DEBUG: CLEANSUBS >> DEBUGGGGGGG >> PATH smb://192.168.1.10/G/TV-Series/Get Shorty DOES NOT EXIST!!!!!
22:11:14.422 T:138718729296   DEBUG: ### [OSUtilities] - Search String [ Get+Shorty+S01E03 ]
22:11:14.423 T:138718729296   DEBUG: ### [OSUtilities] - Hash Standard file
22:11:14.766 T:138577679440   DEBUG: CLEANSUBS >> CURRENT WINDOW 10153 - STARTING TIMER
22:11:14.782 T:138577679440   DEBUG: CLEANSUBS >> SUBTITLES DOWNLOAD PATH SET TO: 'smb://192.168.1.10/G/TV-Series/Get Shorty'
22:11:14.782 T:138577679440   DEBUG: CLEANSUBS >> DEBUGGGGGGG >> PATH smb://192.168.1.10/G/TV-Series/Get Shorty DOES NOT EXIST!!!!!
22:11:14.931 T:138718729296   DEBUG: CSMBFile::Open - opened smb://192.168.1.10/G/TV-Series/Get Shorty/Get Shorty 103.mkv, fd=10001
22:11:14.952 T:138718729296   DEBUG: CSMBFile::Close closing fd 10001
22:11:15.043 T:138718729296   DEBUG: ### [OSUtilities] - OpenSubtitles module hash [36ac6db3c0ac25f4] and size [1515475010]
22:11:15.782 T:138577679440   DEBUG: CLEANSUBS >> CURRENT WINDOW 10153 - STARTING TIMER
22:11:15.816 T:138577679440   DEBUG: CLEANSUBS >> SUBTITLES DOWNLOAD PATH SET TO: 'smb://192.168.1.10/G/TV-Series/Get Shorty'
22:11:15.816 T:138577679440   DEBUG: CLEANSUBS >> DEBUGGGGGGG >> PATH smb://192.168.1.10/G/TV-Series/Get Shorty DOES NOT EXIST!!!!!
22:11:16.733 T:138718729296    INFO: CPythonInvoker(43, /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/service.subtitles.opensubtitles_by_opensubtitles/service.py): script successfully run
22:11:16.870 T:138718729296    INFO: Python script stopped

Don't you have another windows laptop/computer with a shared folder and some content (that's really all that's needed) so you can test processing files over the. same network? If you're developing on windows you can even share a folder on the developing machine for testing purposes


RE: CleanSubs - (Clean subtitles from the ads and other rubbish) - User 325245 - 2017-09-04

Progressbar is just when it updates the definitions, once in a while Smile


RE: CleanSubs - (Clean subtitles from the ads and other rubbish) - User 325245 - 2017-09-04

Yes, missed one Smile Sorry. Try 6.17


RE: CleanSubs - (Clean subtitles from the ads and other rubbish) - User 325245 - 2017-09-04

On Windows, the UNC paths \\ work, so I can't be sure....


RE: CleanSubs - (Clean subtitles from the ads and other rubbish) - DragonFly - 2017-09-05

Yeah, it's working! Smile Thx

However, two things:

I don't know if it is intended that way, but it works only one time for each episode. Let say you initially download a sub for an episode which has none. After the download, Cleansubs does its magic. However if the downloaded subtitle seems to be the wrong one (i.e.out of sync) and another subtitle is downloaded, Cleansubs does not kick in the second time.

When running Cleansubs as a Standalone it states to have found a number of Video libraries. The log shows something like this for each folder:
Code:
00:43:48.598 T:138635494480   DEBUG: CLEANSUBS STANDALONE >> BEGIN PATH: >>\\192.168.1.10\G\TV-Series\<< FOLDERS IN PATH: >>0<<
00:43:48.613 T:138635494480   DEBUG: CLEANSUBS STANDALONE >> TOTAL SUB FILES: >>0
...
...
00:43:48.730 T:138635494480   DEBUG: CLEANSUBS STANDALONE >> TOTAL SUB FILES: >>0<<
00:43:48.730 T:138635494480   DEBUG: CLEANSUBS STANDALONE >> FINISHED
<<



RE: CleanSubs - (Clean subtitles from the ads and other rubbish) - User 325245 - 2017-09-05

In standalone it still doesn't work with SMB://. I fixed only interactive part.