Kodi Community Forum

Full Version: Video Database Cleaner add-on
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 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
Althought the repository zip failed to install, i cloned the plugin directly and it worked fine on the 2018-01-12 nightly build of Kodi v18
Thanks for the useful plugin.
how did you get it to work?
Did you run again and confirm it worked?
This might have been covered, but it does not delete until the Clean Database is run. I did not get that first few times around, so I ran it, it said it deleted, I did not have it set to clean database as part of the process, ran it again and it did not show anything was deleted.

BUT, when I ran CLean, I checked the logs and it deleted all the extras. Do not know why but it took me three tries of running the script to get all the crap but it did work.

So i think that those who run it and then run it again without cleaning the DB will not get any changes and think it failed.

Seems to have worked fine for me, will do some checking.

Also have to say, the update thru the repo DOES not work for me on 17.6 on android (fire tv) Had to download the zip and install and everything worked fine. 
Also had a minor problem in that in running the debug log while running, it did not show the GUI correctly on my tv. I had to turn off debug in order to be able to read everything on the Database cleaner screen, but that is no big deal, just something to look for.

Thanks for updating recently. If I knew how to do GIT, I would add the part about not taking effect till DB is cleaned, but maybe somebody else can put thatin.
ran it 5 times in a row, including automatically clean database on.
The same 624 items remain.
I also specified a name for backup, but the file was not created.
(ubuntu 16.04, kodi 17.6)
I must be having a brain fart as i can't add the black.eagle repository so i can install script.database.cleaner on an android box i have.

From within Kodi 17.3 running on Android 7.1.2, i go to <System><File Manager><Add source> and then enter the following path
Code:
https://github.com/the-black-eagle/repository.blackeagle/blob/master/_repo/repository.blackeagle/repository.blackeagle-0.1.0.zip
and then i define the name as repository.blackeagle before hitting <OK> and the repository is accepted Smile

However, when i go to <Add-ons><Add-on browser><Install from zip file> and hit <Enter> then select repository.blackeagle i get a spinning wheel and a few seconds later a (folder_back) icon followed by two periods (..) with nothing else below Confused

What am i doing wrong and how can i add the repo and install blackeagles cleaner add-on?

Obviously i can copy the script.database.cleaner zip file directly to sdcard and instrall that way but i thought i'd use the repo process for the first time though without luck No
Did you verify the existence of the file at the source?

Update:
Ok, checked, it's there but your link looks wrong: https://github.com/the-black-eagle/repos...blackeagle
You could just download your script from here https://github.com/the-black-eagle/repos...se.cleaner
Thanks for the tip but i've tried all combinations fot the path including  ".../blob/master/..." , ".../tree/master/..." .and i".../raw/master/..." with and without the repo zip file at the end of the path. Nothing seems to work remembering the path i first used was mentioned in the 2nd post as https://github.com/the-black-eagle/repos...-0.1.0.zip
 
The path seems to be added as a file source but when try to add the add-on via zip file method referencing the file source, which points to the repo, i never get any add-ons or directories listed. The <OK> button is never accessable as i can't, presumably, select an addon from the repo (since nothing is displayed) so ,Cancel> button is the only option.

I don't know if there is a Kodi fault related to the length of the path or if there is something else wrong but adding a file path to a repo shouldn't be so hard.

I already know i can download the script manually and add it via pointing to the script zip file but i want to use the repo method which should work.

I'd think it is very easily repeatable so a debug log shouldn't be needed but could provide if felt it was needed.

Any ideas?
(2018-03-01, 01:20)skylarking Wrote: [ -> ]I already know i can download the script manually and add it via pointing to the script zip file but i want to use the repo method which should work.

Any ideas?

You don't add a path to the repo as a source. This is not the correct method for installing a repo. Download and install the .zip for the repo, then you can install add-ons from the repo (without downloading individual .zip files for the add-ons).
Adding a link to the repo.zip using Add source via the File manager, then selecting Add-ons to Install from zip file method works with other repos. I’ve seen it done at a mates place with the illegit srp repo which shouldn’t be mentioned here.

I’m just trying to do the same with the legit black.eagle repo but it does not work, and i don't understand why?

[edited to add following]

As a side note, using add-on Install from zip file method, then pointing to the repo.zip file using Windows network (SMB) works and creates a new add-on menu item Install from repository which i can click to install the video.database.cleaner add-on. To me the difference is just how one points to the repo zip file, either via http/https, smb or local file system and in all cases it should work the same but i don't understand why if doesn't work when pointing via http/https?

At my mates place, i didn't notice if the Add source method that accesses srp.repo.zip via http also created the Install from repository menu item but it worked at pulling in those sus add-ons. I don't want to pollute my install by testing such crap repos just to sort out what the state of play is.

In all this, it's important to not confuse Add source within File manager, where the popup is titled Add file source, with the process of defining a video source within Videos-Files where the menu item is named Add videos and the pop up is titled Add video source. Not all sources are the same   Eek Tongue
Anyway, the advanced cleaning functions when compared to stock cleaning don't seem to work anymore in Leia (at least when using MySQL). Is the original author still around?
Seems @BlackEagle went dark mid Feb 2017 while @BatterPudding went dark mid Jan 2018, otherwise the add-on would be working within Leia.

As is, i vaguely remember some talk early  on within the add-on developement that such features could be merged into Kodi core but not sure where that idea ended up.
So the current state of the database.cleaner add-on is 'unsupported' i guess Eek
Ok, so I finally worked out how to get this working for me.

I ran normally (rerun showed the same number to remove every time)
Checked the log, in my case there were many that started /4tb1/ so I used the path section of the configure and deleted them
Then found the next most frequent.
rinse and repeat.
Now they are all gone and my library is clean.

Do not know why it would not work without specifying the path, but anyone having this same problem, this may be the solution
Video Database Cleaner version 1 worked fine from XBMC thru Kodi Leia Alpha 3, but in the (nightly) Beta 1 KodiSetup-20180811-732e4a92-master-x64 the interface is nonreponsive and lacking the normal path indications, buttons etc. I reloaded the add-on, should something have stomped on some of the code and double checked with Kodi 18 Alpha 3 and it's just this iteration atm.

I hope this is just a teething nightly issue.
I like this addon and I'm also using a recent Leia nightly so it's broken for me too.  I've done some testing and worked out why it's broken but I don't know how to fix it.  The problem is that one of the simple functions called right near the start of the script has recently been canned, namely "self.setCoordinateResolution" which is called on line 63 of the addon's main script.

Looking this up on the Kodi repo, it was this commit here that removed support for that function.  I'm still reading through the git trying to figure out what that function's been replaced with.  If anyone can beat me to it, please speak up.  We might need FernetMenta's help here.

This is what the script is trying to do:

python:
WINDOW = xbmcgui.Window(10000)


class MyClass(xbmcgui.WindowXMLDialog):
    def __init__( self, *args, **kwargs  ): pass
    
    def onInit( self ):
        self.setCoordinateResolution(0)
        self.container = self.getControl(6)
        self.container2 = self.getControl(8)
        self.container3 = self.getControl(10)
        self.container4 = self.getControl(12)
        self.listitems =
        self.excludesitems =
        self.addonsettings =
        self.addonsettings_on_off =

edit: simply removing/commenting out line 63 of the scripts gets it running again but the output window where you choose what to do is massively oversized and you can't see any of the buttons.  I guess that's a result of removing the resolution related function.
(2018-08-25, 15:20)beeswax Wrote: [ -> ]I like this addon and I'm also using a recent Leia nightly so it's broken for me too.  I've done some testing and worked out why it's broken but I don't know how to fix it.  The problem is that one of the simple functions called right near the start of the script has recently been canned, namely "self.setCoordinateResolution" which is called on line 63 of the addon's main script.

Looking this up on the Kodi repo, it was this commit here that removed support for that function.  I'm still reading through the git trying to figure out what that function's been replaced with.  If anyone can beat me to it, please speak up.  We might need FernetMenta's help here.

This is what the script is trying to do:

python:
WINDOW = xbmcgui.Window(10000)


class MyClass(xbmcgui.WindowXMLDialog):
    def __init__( self, *args, **kwargs  ): pass
    
    def onInit( self ):
        self.setCoordinateResolution(0)
        self.container = self.getControl(6)
        self.container2 = self.getControl(8)
        self.container3 = self.getControl(10)
        self.container4 = self.getControl(12)
        self.listitems =
        self.excludesitems =
        self.addonsettings =
        self.addonsettings_on_off =

edit: simply removing/commenting out line 63 of the scripts gets it running again but the output window where you choose what to do is massively oversized and you can't see any of the buttons.  I guess that's a result of removing the resolution related function.
The constructor of WindowXMLDialog is called with default parameter for defaultRes. (btw: default parameters are crap and lead to this type of issues). Calling the constructor with defaultRes = "1080i" will cure the issue.

The root cause the they python interface function/class WindowXML::WindowXML. It should get coordsRes from the skin like GUIWindows do in the rest of the code.
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 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39