Release - CleanSubs - (Clean subtitles from the ads and other rubbish)

  Thread Rating:
  • 2 Vote(s) - 3.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
DaLanik Online
Fan
Posts: 724
Joined: Apr 2016
Reputation: 30
Location: Prague, CZ
Brick  CleanSubs - (Clean subtitles from the ads and other rubbish)
Post: #1
http://projects.lanik.org/KodiProject_CleanSubs.htm

CleanSubs addon


Are you using subtitles addons to download subtitles for your movies? Then you must know that all subs from opensubtitles and other sites have various "signatures' like "Downloaded from..." or "Translated by", or much worse "Support us by voting..." etc etc. After a while it gets kinda annoying. Especially since some of the subs stay on screen for a long period of time.

I thought there must be a way to do something about this - so I wrote this addon. What it does is - parses the downloaded subtitles and removes the lines with advertizements or signatures etc. Then it displays the overlay for a few seconds confirming the cleaning was done.

How it works? I will get a bit technical here - but just a bit. This service waits for the subtitles to be downloaded, it is monitoring temp folder for any changes in srt files (for the time being it works only with srt subs, not with sub - but I might add that) and then it "cleans" the subs file, and tells the player to use this new, cleaned file. Ofcourse, this would not work without some kind of "definitions" - just like antivirus software has signatures - this addon uses the definitions file to detect various unwanted strings.

For the time being, I set it up pretty good for Serbian, Croatian and Czech, and there are definitions in English, German, Portugeese, Slovak, Polish, French, Hungarian. So, if you want to use this addon, you need to add lines that need to be removed to this definitions. Now, the definitions are downloaded automatically on KODI start from my web. That means all definitions need to be added to this one central place. So if you want to use this, send me the lines you want to add to the definitions - this way all users benefit from your work.

New version works also from programs, and can clean up your entire library. It scans paths defined for video (movies) library, searches for all sub and srt files and cleans them. The original files are left there with suffix _ORIGINAL. I.e. if your file is named "Blade Runner_ser.srt" the cleaned file will take this name and original will be called "Blade Runner_ser.srt_ORIGINAL"

In order to install it, first install my REPO: Lanik Repo

Then install add-on, no configuration needed.

This should work on all platforms. Any comments welcome.

[Image: kodiplugin_cleansubs2.jpg]

[Image: kodiplugin_cleansubs.jpg]



[Image: donate_button_1.png]
(This post was last modified: 2017-02-01 15:19 by DaLanik.)
find quote
DaLanik Online
Fan
Posts: 724
Joined: Apr 2016
Reputation: 30
Location: Prague, CZ
Post: #2
v0.6
- Added sub subtitles format
find quote
peppe_sr Offline
Posting Freak
Posts: 1,282
Joined: Mar 2006
Reputation: 20
Location: Italia, Sicilia, Siracusa
Post: #3
another great application. great work.
i use often english subs, but i will take a look at italian subs so i can give you some definitions.
Peppe
find quote
misa Offline
Fan
Posts: 330
Joined: Mar 2012
Reputation: 7
Post: #4
PM already some Dutch definitions
find quote
DaLanik Online
Fan
Posts: 724
Joined: Apr 2016
Reputation: 30
Location: Prague, CZ
Post: #5
Added Smile
find quote
Atreyu Offline
Donor
Posts: 935
Joined: Sep 2015
Reputation: 22
Post: #6
This is brilliant!
The advertisements are getting worse and worse. Just the laundry-tool i was looking for.
I'll be sure to install your repo when i get back from vacation! So thanks for this one :-)

Ps: Come to think of it, is there an option to disable the 'cleanup confirmation?'. I wouldnt want to swap one unwanted line for a popup after each download?
(This post was last modified: 2016-07-21 23:27 by Atreyu.)
find quote
misa Offline
Fan
Posts: 330
Joined: Mar 2012
Reputation: 7
Post: #7
I am getting this after installing the addon:


08:01:05 156.381638 T:1761575840 NOTICE: CLEANSUBS >> STARTED VERSION 0.6
08:01:06 156.885880 T:1761575840 NOTICE: CLEANSUBS >> KODI SUB CHARSET CONFIGURED: >>DEFAULT<<
08:01:06 156.886124 T:1761575840 NOTICE: CLEANSUBS >> KODI SUB LANGUAGES CONFIGURED: >>Dutch<<
08:01:06 156.886261 T:1761575840 NOTICE: CLEANSUBS >> KODI SUB LANGUAGES CONFIGURED: >>English<<
08:01:06 156.956894 T:1761575840 NOTICE: CLEANSUBS >> DEFINITIONS >> LOCAL: 0 REMOTE: 2518
08:01:06 156.957123 T:1761575840 NOTICE: CLEANSUBS >> DEFINITIONS >> TO DOWNLOAD
08:01:06 156.957489 T:1761575840 NOTICE: CLEANSUBS >> DEFINITIONS >> DOWNLOAD ERROR
08:01:06 156.968216 T:1761575840 NOTICE: CLEANSUBS >> DEFINITIONS >> DEFINITIONS MISSING!
(This post was last modified: 2016-07-22 08:05 by misa.)
find quote
DaLanik Online
Fan
Posts: 724
Joined: Apr 2016
Reputation: 30
Location: Prague, CZ
Post: #8
(2016-07-21 23:17)Atreyu Wrote:  This is brilliant!
The advertisements are getting worse and worse. Just the laundry-tool i was looking for.
I'll be sure to install your repo when i get back from vacation! So thanks for this one :-)

Ps: Come to think of it, is there an option to disable the 'cleanup confirmation?'. I wouldnt want to swap one unwanted line for a popup after each download?

Good point, shouldn't be a problem to add.
find quote
DaLanik Online
Fan
Posts: 724
Joined: Apr 2016
Reputation: 30
Location: Prague, CZ
Post: #9
(2016-07-22 08:04)misa Wrote:  I am getting this after installing the addon:


08:01:05 156.381638 T:1761575840 NOTICE: CLEANSUBS >> STARTED VERSION 0.6
08:01:06 156.885880 T:1761575840 NOTICE: CLEANSUBS >> KODI SUB CHARSET CONFIGURED: >>DEFAULT<<
08:01:06 156.886124 T:1761575840 NOTICE: CLEANSUBS >> KODI SUB LANGUAGES CONFIGURED: >>Dutch<<
08:01:06 156.886261 T:1761575840 NOTICE: CLEANSUBS >> KODI SUB LANGUAGES CONFIGURED: >>English<<
08:01:06 156.956894 T:1761575840 NOTICE: CLEANSUBS >> DEFINITIONS >> LOCAL: 0 REMOTE: 2518
08:01:06 156.957123 T:1761575840 NOTICE: CLEANSUBS >> DEFINITIONS >> TO DOWNLOAD
08:01:06 156.957489 T:1761575840 NOTICE: CLEANSUBS >> DEFINITIONS >> DOWNLOAD ERROR
08:01:06 156.968216 T:1761575840 NOTICE: CLEANSUBS >> DEFINITIONS >> DEFINITIONS MISSING!

Hmm, I get the error on Android too, but it works on Windows... strange. Do you have Android?

Try updating to the latest version 0.7 it has definitions in local folder as well (as a temporary measure until this download thing is resolved)

D.
find quote
misa Offline
Fan
Posts: 330
Joined: Mar 2012
Reputation: 7
Post: #10
(2016-07-22 08:20)DaLanik Wrote:  
(2016-07-22 08:04)misa Wrote:  I am getting this after installing the addon:


08:01:05 156.381638 T:1761575840 NOTICE: CLEANSUBS >> STARTED VERSION 0.6
08:01:06 156.885880 T:1761575840 NOTICE: CLEANSUBS >> KODI SUB CHARSET CONFIGURED: >>DEFAULT<<
08:01:06 156.886124 T:1761575840 NOTICE: CLEANSUBS >> KODI SUB LANGUAGES CONFIGURED: >>Dutch<<
08:01:06 156.886261 T:1761575840 NOTICE: CLEANSUBS >> KODI SUB LANGUAGES CONFIGURED: >>English<<
08:01:06 156.956894 T:1761575840 NOTICE: CLEANSUBS >> DEFINITIONS >> LOCAL: 0 REMOTE: 2518
08:01:06 156.957123 T:1761575840 NOTICE: CLEANSUBS >> DEFINITIONS >> TO DOWNLOAD
08:01:06 156.957489 T:1761575840 NOTICE: CLEANSUBS >> DEFINITIONS >> DOWNLOAD ERROR
08:01:06 156.968216 T:1761575840 NOTICE: CLEANSUBS >> DEFINITIONS >> DEFINITIONS MISSING!

Hmm, I get the error on Android too, but it works on Windows... strange. Do you have Android?

Try updating to the latest version 0.7 it has definitions in local folder as well (as a temporary measure until this download thing is resolved)

D.

Using it on a RPI2 and 3 on LibreELEC 7.0.2. Still on 0.6 because no update there yet Smile
(This post was last modified: 2016-07-22 08:34 by misa.)
find quote
DaLanik Online
Fan
Posts: 724
Joined: Apr 2016
Reputation: 30
Location: Prague, CZ
Post: #11
You can force update by opening addons browser and select "check updates" from the side menu....
find quote
DaLanik Online
Fan
Posts: 724
Joined: Apr 2016
Reputation: 30
Location: Prague, CZ
Post: #12
(2016-07-21 23:17)Atreyu Wrote:  Ps: Come to think of it, is there an option to disable the 'cleanup confirmation?'. I wouldnt want to swap one unwanted line for a popup after each download?

Done in v0.8

D>
find quote
Atreyu Offline
Donor
Posts: 935
Joined: Sep 2015
Reputation: 22
Thumbs Up  RE: CleanSubs
Post: #13
Great, it's perfect now..!
find quote
mac1202 Offline
Senior Member
Posts: 247
Joined: Aug 2014
Reputation: 4
Post: #14
I use subliminal program to batch download subtitle for my tv show does your addon also clean this kind of subtitles ?
find quote
DaLanik Online
Fan
Posts: 724
Joined: Apr 2016
Reputation: 30
Location: Prague, CZ
Post: #15
It works only for subtitles downloaded from KODI's subtitle addons... it monitors the temp folder where subtitles are downloaded, and when it detects srt or sub file - it processes it....
find quote
Post Reply