• 1
  • 10
  • 11
  • 12(current)
  • 13
  • 14
  • 39
v19 Video Database Cleaner add-on
black_eagle,

Your suggestion of turning off the database-cleaner.log and the summary window did the trick. Seems like everything ran fine based on the progress bar, the fact that it asked me what I wanted to do with a few dangling paths at the end and once it was done nothing looked to be missing or not functioning on SPMC. Thanks for the help.

Obviously this has nothing to do with you so sorry for going a little OT but do you think I may have messed up my database or the python module you mentioned? Reason I ask is that my issue doesn't look to be restricted to your awesome add-on as I am no longer able to run IMDb Update located here IMDb Update. I used to be able to run it in full and now it runs for a few seconds then fails.

In trying to use Rating Update v1.4.3 I took the following steps.

1. I installed version 1.4.3 from the google drive zip onto the Shield
2. Installed VisualStudio C++ 2012 on my PC
3. unzipped VC11 x86 Non Thread Safe into a folder on my PC.

It never did work and even though I uninstalled it I was wondering if maybe this is the cause of the my problems with your add-on.
Reply
To be honest, I don't know.

What I can tell you from the log snippet that you supplied, is that there was at least one (streaming) path in your database that for some reason couldn't be decoded correctly by the sqlite3 module.

This may or may not be a problem for other users. The code preceding that error is relatively new in the add-on and is part of a routine that counts how many paths the add-on has found, and writes that to screen ( and log-file). In the process of fetching the paths to count is where the error occurred.

Now it may be that for whatever reason, your db had a bad path in it, in which case we have cleaned it out and all is now good !! Or, it may be that there are lots of add-ons that will produce similar paths and generate similar errors in which case the code would need altering.

Possibly at this stage it's a little early to say, so I'll wait a bit and see if anyone else gets the same issue.
Learning Linux the hard way !!
Reply
Hey black_eagle just wanted to follow up. Looks like your add-on fixed me up. I ran it a couple of times with database-cleaner.log and the summary window set to off to make sure it was thoroughly cleaned up. I then tried again with database-cleaner.log turned on, ran with no issue. I then ran it again with both database-cleaner.log and the summary window turned on and once again ran with no problem and I was able to see the Abort and Do It prompts at the bottom of the summary window.

I appreciate all your help in getting your add-on working for me again
Reply
(2016-10-28, 13:35)junitodx Wrote: Hey black_eagle just wanted to follow up. Looks like your add-on fixed me up. I ran it a couple of times with database-cleaner.log and the summary window set to off to make sure it was thoroughly cleaned up. I then tried again with database-cleaner.log turned on, ran with no issue. I then ran it again with both database-cleaner.log and the summary window turned on and once again ran with no problem and I was able to see the Abort and Do It prompts at the bottom of the summary window.

I appreciate all your help in getting your add-on working for me again

Thanks, I appreciate the feedback Nod
Learning Linux the hard way !!
Reply
Umm....

So, various people have had various issues with the GUI for DBC so I have re-visited that part of the add-on and completely changed the way it works !!

Instead of the add-on generating the GUI info on-the-fly with calls to Kodi's GUI api, it now uses a proper skin file. Hopefully, it doesn't look too different, but there are quite a few changes 'under the hood'.

Image

Image

Image

Image

There is now a scrollable list of paths to keep. Note this is only scrollable if there are more paths than fit into the list box. Keyboard/remote users need to press 'up' to focus the scrollbar, then up and down will scroll the list. Left or right will move to the bottom buttons.

Speaking of which, there are new buttons to abort or trigger the clean. Buttons fade out if not focused and the text changes from black (not focused) to white so you can be sure you have highlighted the correct button.

There are some other slight cosmetic changes to messages too. I need to run a few quick tests under Windows (ugg !!) to confirm it all looks the same and then I'll put up a dropbox link to the new version.

Cheers all,

BE
Learning Linux the hard way !!
Reply
@black_eagle i'm not familiar with Kodi terminology but does "proper skin file" mean that DBC is in some way dependant on the kodi skin used or do add-ons have their own separtate skin file mechanism?
I'm a XBMC novice :)
Reply
(2016-11-02, 06:50)skylarking Wrote: @black_eagle i'm not familiar with Kodi terminology but does "proper skin file" mean that DBC is in some way dependant on the kodi skin used or do add-ons have their own separtate skin file mechanism?

DBC is a script. Scripts are (currently) dependant upon the fonts of the users current skin. The window itself has its own skinning file which specifies the layout and position of the lists, text and buttons. It does actually also have it's own fonts file as well, which should allow me to ensure that the text is consistent across different platforms ad skins.

Unfortunately, the current state of Kodi doesn't (yet) allow add-ons to load their own font files so the add-on has to use whichever font your skin designer implemented for add-ons. If DBC could use it's own fonts file, it would be the same font (and point size) as the font that Confluence uses for add-ons.

I believe that when Kodi is out of beta and into V17.0 that OSMC's version will allow add-ons to load their own fonts. That means that there cannot be any truncated text etc that is caused by using a font that overflows the text areas.

Plugins do not have a skin mechanism. They pass information to Kodi which is then presented using the current skin (eg a file list).

In addition, the original skin file that shipped with DBC was very rudimentary and really only contained the background, title and icon. Everything else that you saw was generated by DBC itself at run-time. In actual fact, that was quite a lot of code (which has now been removed) as it takes four lines of code to render one item of text on screen. Now it takes just one. It's also of benefit for people who aren't running at either 720p or 1080i as Kodi should be able to scale everything appropriately - certainly it scales correctly on my laptop @1440x900.

TLDR; Code has been cleaned up and now runs faster, GUI scales better across different resolutions whilst at the same time being more consistent (apart from the font thing !!).
Learning Linux the hard way !!
Reply
I installed and ran this addon/script.

1) never got confirmation of deleting anything prior to actual deletions happening.
2) there was no backup of the video library anywhere.

there was a log entry that showed a great deal of cruft of non existing files paths but how do I know anything really was processed?

Im on Kodi v17 beta6 (tip of master as of 5855cfe6a60971be4de6d4a7f6d5d290d342571c)
Reply
There should be a back-up of the database in userdata/Database/backups . If you use profiles it should be in userdata/ProfileName/Database/backups . All backups will have the name of the db, eg MyVideos107 with a date and time stamp appended to the name.

If you are using MySQL, then the database is NOT backed up, but the add-on should give you a warning to this effect on the summary screen.

The add-on does not request confirmation when removing paths. This is because potentially there could be hundreds of paths to remove and manual confirmation would be tedious to say the least. Therefore, assuming you have set it in the add-on settings (and it's on by default) the add-on writes its own log file alongside Kodi's log. If the add-on is run and then aborted when the summary window appears, the logfile produced will contain a list of paths that will be removed if the add-on continues past that point and actually deletes stuff. If the add-on is not aborted and cleaning is commenced, the logfile will contain details of the paths that have been removed. Commencing cleaning is regarded as confirmation enough that any extraneous paths should be removed without further user intervention.

On top of this, if the add-on finds more than 600 paths to remove it displays a progress box while the deletion is occurring. It would be possible to display this for a much smaller number of paths, but this would involve artificially slowing down the removal process as both python and SQL are pretty quick !

If you really want to know if anything was processed, depending upon how many lines were removed, then a size comparison of the database before and after is the easiest method. You could also open the database and see if one of the paths that the add-on says it removed still exists in there. As previously mentioned, there is also confirmation of every path removed in the add-ons log file.

The next version (which should be available this coming weekend) displays the number of paths it has found in the summary window. This is to aid users in deciding whether or not they need to check the paths to be removed in the add-ons logfile before proceeding to clean their db.
Learning Linux the hard way !!
Reply
Dropbox link for V0.5.7 -> https://www.dropbox.com/s/abt6inna649myb...7.zip?dl=0
Learning Linux the hard way !!
Reply
(2016-11-02, 08:06)black_eagle Wrote:
(2016-11-02, 06:50)skylarking Wrote: @black_eagle i'm not familiar with Kodi terminology but does "proper skin file" mean that DBC is in some way dependant on the kodi skin used or do add-ons have their own separtate skin file mechanism?

DBC is a script. Scripts are (currently) dependant upon the fonts of the users current skin. The window itself has its own skinning file which specifies the layout and position of the lists, text and buttons. It does actually also have it's own fonts file as well, which should allow me to ensure that the text is consistent across different platforms ad skins.

Unfortunately, the current state of Kodi doesn't (yet) allow add-ons to load their own font files so the add-on has to use whichever font your skin designer implemented for add-ons. If DBC could use it's own fonts file, it would be the same font (and point size) as the font that Confluence uses for add-ons.

I believe that when Kodi is out of beta and into V17.0 that OSMC's version will allow add-ons to load their own fonts. That means that there cannot be any truncated text etc that is caused by using a font that overflows the text areas.

Plugins do not have a skin mechanism. They pass information to Kodi which is then presented using the current skin (eg a file list).

In addition, the original skin file that shipped with DBC was very rudimentary and really only contained the background, title and icon. Everything else that you saw was generated by DBC itself at run-time. In actual fact, that was quite a lot of code (which has now been removed) as it takes four lines of code to render one item of text on screen. Now it takes just one. It's also of benefit for people who aren't running at either 720p or 1080i as Kodi should be able to scale everything appropriately - certainly it scales correctly on my laptop @1440x900.

TLDR; Code has been cleaned up and now runs faster, GUI scales better across different resolutions whilst at the same time being more consistent (apart from the font thing !!).
Thanks for the explanation and for your ongoing efforts with DBC Big Grin

I've just downloaded version 0.5.7 so thanks again Nod
I'm a XBMC novice :)
Reply
Based on http://forum.kodi.tv/showthread.php?tid=...pid1976600

You can also do this with MyVideos###.db you need sqlite3 installed obviously.
Code:
$ sudo stop kodi
$ mv ~/.kodi/userdata/Database/MyVideos107.db ~/.kodi/userdata/Database/MyVideos107.db-old
$ sqlite3 ~/.kodi/userdata/Database/MyVideos107.db-old ".dump" | sqlite3 ~/.kodi/userdata/Database/MyVideos107.db
$ sudo star kodi

This is the result.

Code:
$ ls -all ~/.kodi/userdata/Database/
-rw-r--r--  1 kodi kodi 38686720 Nov 18 00:44 MyVideos107.db
-rw-r--r--  1 kodi kodi 39301120 Nov 18 00:19 MyVideos107.db-old

The MyVideos107.db-old was washed using this addon it clocked 37.48MB after the dump its 36.89MB

Not a trick for everyone, obvisouly; but I thought Ide share with the more fearless users here.

Enjoy
Reply
I just wanted to say thanks, it worked great.
Reply
(2016-11-18, 19:44)Waldner11 Wrote: I just wanted to say thanks, it worked great.

Thanks for the feedback Nod
Learning Linux the hard way !!
Reply
Just wanted to say BIG THANKS for this addon. Now the cleanup is fast again. :-)
Reply
  • 1
  • 10
  • 11
  • 12(current)
  • 13
  • 14
  • 39

Logout Mark Read Team Forum Stats Members Help
Video Database Cleaner add-on5