• 1
  • 11
  • 12
  • 13(current)
  • 14
  • 15
  • 39
v19 Video Database Cleaner add-on
(2016-11-19, 10:55)proutek Wrote: Just wanted to say BIG THANKS for this addon. Now the cleanup is fast again. :-)

Cheers - thanks for the feedback. Both BatterPudding (wherever he is !!) and I do appreciate it.
Learning Linux the hard way !!
Reply
Thanks from me too, great addon! I'm about to skin the summary window for Mimic and was just wondering if you would consider renaming the file to be consistent with other addon windows. Something like...

script.database.cleaner-summary.xml
Reply
Yeah, I can do that !!

I'm already looking forward to see how it's going to look. As you can probably tell, I'm no skinner and borrowed bits from all over to get it to how it is now.

If I understand correctly then, if I rename the bundled skin file to 'script.database.cleaner-summary.xml' then the file included with Mimic will be loaded in preference to the one in the add-ons 'resources/skins/Default/720p/' and if it's a different skin that doesn't have a skin xml for the add-on then it'll fall back to the one I include ?

Thanks for your support Smile
Learning Linux the hard way !!
Reply
Yeah, that's exactly how it works. Renaming the file just makes it easier for skinners to remember which addon it belongs to and prevents addons from naming their xml files the same.

Another request, would it be possible to define the text colors in the xml so skinners can change them, rather than in python? Also, in what cases are the error labels displayed? Note I added a button to open the addon settings using:

Code:
<onclick>Addon.OpenSettings(script.database.cleaner)</onclick>

Here's my xml (in progress): https://github.com/braz96/skin.mimic/blo...window.xml

Image
Reply
WOW !!! Looks great Big Grin

Settings button is a good addition.

With regards to the colours being in the XML then yes, that should be do-able as long as I can keep compatibility between Kodi versions.

For example, if there are no sources in use then underneath 'Keeping data....' the message 'No sources are in use' would be in red currently. Using StringCompare would work, but that has been deprecated for V17 and although it might still work in Krypton, it'll get removed at some point and then that would break compatibility with future versions. Similarly, using String.IsEqual or String.Contains would break backwards compatibility.

If there is a way to do it without breaking backwards compatibility whilst ensuring that the addon can be used on V17 and above then I'm all ears !!

Although I've fiddled with bits and pieces in skins on my own machines it really isn't an area I have much experience of at all, save for this one attempt, so any advice or help you could give me would be more than gratefully received.
Learning Linux the hard way !!
Reply
Glad you like it, I'll be making some more changes to it.

Does the "No sources" message need to be in red? It's just my personal preference, but I think it would look ok if that list was formatted just like the excluded paths list.

You can take a look at my xml for some ideas, you'll notice I removed pieces here and there. Some of them aren't needed in Mimic because I already defined defaults (font size, font color, etc). Other pieces are not needed at all and can be safely removed (like the viewtype/orientation/preloaditems tags in the lists). I noticed the list animations are conditional, but there's no condition defined, so they probably don't ever fire.

One other suggestion, and please disregard unless you really like it. Would it be possible to format the addon settings section similar to the addon settings dialog? I mean something like this:

Code:
Automatically trigger clean library                 On
Show summary window                                 On
Backup local database before cleaning               On
Log paths to database-cleaner.log                   On
Enable debugging to Kodi debug log                 Off
Database                                   MyVideos107

And then would it be possible to display the number of items to be cleaned in its own label? I'd like to display that in larger font and centered across the bottom of the dialog.

Thanks for considering and let me know if you run into any skinning issues. Cheers!
Reply
@braz - There is a new branch on github called 'cosmetic-changes' where I have re-worked some stuff. The window has been renamed to 'script.database.cleaner-summary.xml'. All colours generated by the script have been removed. Another list control (id="12") has been added for ON/OFF for each of the settings. This also contains the database name at the bottom of the list.

A new label with an id of 22 has been added for the number of items found.

With regard to the warning label(s). These appear for the following settings / conditions.
  • User is using a MySQL database - shows a warning that this should be backed up manually.
  • Removing a specific path - Shows a warning that this is happening, along with the actual path to be removed.
  • Replacing a specific path - Shows a warning this is happening and shows the path to be replaced in the first label, path it will be replaced by is shown in second label

Question - Is it somehow possible to change the colours of items within a listitem in the .xml based on the content ? What I'm after is being able to change the colour of ON & OFF depending on which one it is. Oh, also !!, is there an easy way to centre a label horizontally such that it is always centred regardless of the length of the text it contains ?

Cheers.
Learning Linux the hard way !!
Reply
@black_eagle

Very cool, will play with this in the morning. Different colors for on/off should be doable with a variable.
Reply
@black_eagle, finally got round to looking at this - works nicely (although I had far less cruft in there than expected!), so thanks to you both.

Quick observation: I fell foul of the apostrophe issue in 5.4.0, and had to flounder a bit to get it all working. Given you're reliant on Dropbox while BatterPudding is MIA, it'd be good to edit the first post with the current installation details, otherwise folks will naturally turn to the repo in post 2 (which also has the out of date changelog).

PM me any changes (PMs use identical format/syntax to forum posts AFAIK) and I'll use my mod wand to edit that post for you if you wish.
Reply
Great work, thanks! Here's what I did...

For the different colored On/Off labels, I couldn't get a variable to work, so just made separate controls. This is what you would have to do anyway, I think, for the skin that ships with the script.

https://github.com/braz96/skin.mimic/blo...ummary.xml

Image

One suggestion is to put the on/off labels into label2 controls in list #10, then you wouldn't need two lists. Not sure what that would take in python though.

Update: Oops, I see I didn't make the list long enough to show the database, will fix that.
Reply
I'm wondering what the looks of VideoDatabaseCleaner will be in the new default skin Estuary.
Will we get the old looks there, or will we see an Estuary version automagically?

Changing video paths is an interesting option. It will save lots of manual labor, although people will only use it once or twice.
Reply
It'll look the same as it currently does unless one of the Estuary skin devs wants to support it and codes the window for it (which I think is unlikely).

It is however possible for a skinner to just skin the DBC window for Estuary and supply it as a drop in .xml file.
Learning Linux the hard way !!
Reply
How's it going. I've run into an issue when trying to use this. I'm on spmc 16.5.5. When I start the addon I get "Starting up" then an error to check the log. No GUI window is shown. With debug turned on on kodi and within the addon config settings my log shows this:

http://pastebin.com/bAKk2rWd

Any ideas? Thanks for your time.

Edit: So with the first paste it was hanging on my advancedsettings.xml. So I removed it temporarily. This threw a different error being:
Code:
12:23:43.705 T:18446744072560864280   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <class 'sqlite3.OperationalError'>
                                            Error Contents: near ")": syntax error
                                            Traceback (most recent call last):
                                              File "/storage/emulated/0/Android/data/com.semperpax.spmc16/files/.spmc/addons/script.database.cleaner/default.py", line 722, in <module>
                                                cleaner_log_file(our_select, False)
                                              File "/storage/emulated/0/Android/data/com.semperpax.spmc16/files/.spmc/addons/script.database.cleaner/default.py", line 334, in cleaner_log_file
                                                cursor.execute(our_select)
                                            OperationalError: near ")": syntax error
                                            -->End of Python script error report<--

So I disabled logging in the addon's settings and then the window to clean would show and I was able to run the cleaning process however it failed to commit the changes. I ended up just deleting my video db and rescanning for now.
Reply
I'm just a simple Kodi user so please be kind.

I installed the Video Database cleaner on a Raspberry Pi running OSMC and it works great!

Today I build another Raspberry Pi only this one is running OpenELEC (same version of KODI). When I try and run Video Database Cleaner the first time after boot up I get a message "Warning - no sources.xml file found".

I'm not sure what this means or what to do next. If you can tell me where the log file is I can try an get it (I can access my Raspberry Pi using FileZilla).


************************** SORRY ******************************

Guess I forgot the Raspberry Pi can be a little slow sometimes. I tried it again and while I was pondering what to do next the next screen came up that allows you to abort or clean.

I hope nobody wasted any time on this. My Bad.
Reply
whats the actual repo? I used this:
https://github.com/the-black-eagle/repos...-0.1.0.zip

but Video Database Cleaner shows me version 1.0.0?
Reply
  • 1
  • 11
  • 12
  • 13(current)
  • 14
  • 15
  • 39

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