Kodi Community Forum
Release Kodi Selective Cleaner addon support - 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: Program Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=151)
+---- Thread: Release Kodi Selective Cleaner addon support (/showthread.php?tid=369984)

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


RE: Kodi Selective Cleaner addon support - jbinkley60 - 2024-11-03

(2024-11-03, 10:06)Karellen Wrote: I don't mind. As long as the text is legible in those colours.
Where are the colours set in the addon? I'll have a fiddle with the colour.

I haven't added the setting yet to adjust the colors.  I was asking if that might be an answer to the problem.  I've done this in another addon so I can reuse most of the code.  Let me see how much work is involved and maybe I can post a test release soon with the color adjustment option.


Thanks,

Jeff


RE: Kodi Selective Cleaner addon support - jbinkley60 - 2024-11-03

(2024-11-03, 10:39)andrzejls Wrote: So basically, there is no "Mezzmo" version for Kodi 21, it is not really Kodi add-on (in my understanding) and is not free. So....why I would even consider it?. I run Openmediavault (free) with MariaDB (free) to serve Kodi (free) database to multiple clients. At first Mezzmo sounded interesting but.....

That is incorrect with regards to Mezzmo Kodi addon versions.  The Kodi 19+ version supports Kodi 19-22.  I am running versions 18-22 right now all sharing information in my environment.  You would need to download v2.2.0.9 the latest Kodi 19+ version which supports versions 19-22.  The feature section on the Wiki calls this out along with a section on seamless upgrades / downgrades of Kodi, when running in a Mezzmo environment.   You might also want to check out the support forum here for the latest information.

With regards to Mezzmo costs there is a free version and a pro version.  The pro version is a small one time cost to allow additional features.    I am not here to convince anyone to use Mezzmo at all or buy the pro version.  I simply often point out the great features it has in comparison to so many other solutions.  The stability, time savings features and more were worth it for me to spend a few bucks for the pro version.  I really prefer not having to deal with SMB, NFS and the like and I never encounter performance issues, which are sometimes seen here. 

Yet, even though I run a different solution I donate my time to maintain KSCleaner to help those who can benefit from its capabilities and features.


Thanks,

Jeff


RE: Kodi Selective Cleaner addon support - andrzejls - 2024-11-03

(2024-11-03, 15:22)jbinkley60 Wrote:
(2024-11-03, 10:39)andrzejls Wrote: So basically, there is no "Mezzmo" version for Kodi 21, it is not really Kodi add-on (in my understanding) and is not free. So....why I would even consider it?. I run Openmediavault (free) with MariaDB (free) to serve Kodi (free) database to multiple clients. At first Mezzmo sounded interesting but.....

Yet, even though I run a different solution I donate my time to maintain KSCleaner to help those who can benefit from its capabilities and features.


Thanks,

Jeff
@jbinkley60

As I got more familiar with KSCleaner I think that it is a very good add-on and I will keep it as a permanent part my Kodi installs.

Thank you for your great work on this add-on.


RE: Kodi Selective Cleaner addon support - jbinkley60 - 2024-11-03

(2024-11-03, 10:06)Karellen Wrote: I don't mind. As long as the text is legible in those colours.
Where are the colours set in the addon? I'll have a fiddle with the colour.

I've posted v1.0.8test which adds the ability to change the color of the text for records flagged for cleaning.  I've added a color selection setting in the General section.  Blue is the default but you an choose from Red, Green, Yellow, Orange, Blue and Purple.  I left out white since that is the color for records which do not get cleaned.  It isn't complete (i.e. the duplicate record section still has blue text) but it should be good enough for testing.  I haven't done extensive testing so it is possible I broke something.  Please let me know how it works for you and if you like this approach I will complete the coding and add it into the next release.


Thanks,

Jeff


RE: Kodi Selective Cleaner addon support - jbinkley60 - 2024-11-04

I've posted version 1.0.8a test release to GitHub which finished updating the code for the new color selector feature.  Please let me know if you encounter any issues.  I will likely hold off releasing this version for a couple of weeks to see if there are any other feature requests and I believe I need to update the default video database number for Kodi 22 to 134. 

I am also starting to consider what to do with the library browsing functionality.  Right now you can browse your library in a hierarchical fashion but when you get to the end nothing happens because I never decided what to do with the code.   The original thought was to allow a single button delete where you could easily delete / clean an item from your library.  I also thought about allowing you to edit your library directly (i.e. directly update a movie description etc..) but that gets very complicated and I am not sure the Kodi interface is best for that.  Right now I am leaning towards, if I do add any additional functionality, just providing the ability to view all the data associated with a library entry.  However, since KSCLeaner already allows CSV exporting  of the Kodi views, that is much simpler than viewing on a Kodi screen.  There's also a pending ask of a single click NFO creator from your Kodi library.  There hasn't been enough feedback yet on exactly how that might work. 

Feedback is welcomed, 

Jeff


RE: Kodi Selective Cleaner addon support - andrzejls - 2024-11-07

@jbinkley60
So I did run couple of tests with v 1.0.8test and I do not see any issues. Works fine AFAIKT with Video DB. Music DB functionality is id disabled. Can this be enabled with full version?.


RE: Kodi Selective Cleaner addon support - Karellen - 2024-11-08

The yellow text colour is much, much better. Thanks.
Just for other users, even though Yellow is shown as the font colour in the settings page, you need to scroll through the colours and back to yellow for the setting to be saved.


RE: Kodi Selective Cleaner addon support - jbinkley60 - 2024-11-08

(2024-11-07, 23:17)andrzejls Wrote: So I did run couple of tests with v 1.0.8test and I do not see any issues. Works fine AFAIKT with Video DB. Music DB functionality is id disabled. Can this be enabled with full version?.

Thanks for testing.  The music database functionality has not been built into KSCleaner yet.  You can browse albums but none of the analyzer functions exist.  There has only been minimal interest in this feature.  If enough folks are interested I will work on it but reverse engineering the music database and coding all of the queries and screens will take some time.  I would target it for v1.0.9.  If you can tell me what music database features you are looking for I will put them on the feature list for possibly in the near future.


Jeff


RE: Kodi Selective Cleaner addon support - jbinkley60 - 2024-11-08

(2024-11-08, 01:12)Karellen Wrote: The yellow text colour is much, much better. Thanks.
Just for other users, even though Yellow is shown as the font colour in the settings page, you need to scroll through the colours and back to yellow for the setting to be saved.

Thanks for confirming the color changes.  I agree that the yellow really stands out.  I am not sure why you are seeing that behavior with the setting change.  I presume it is a one time thing ?  I'll look into it.


Thanks,

Jeff


RE: Kodi Selective Cleaner addon support - andrzejls - 2024-11-08

@jbinkley60
Come to think of it, I never, that I can remember, needed to edit/clean or otherwise modify MyMusicXX database. Having said that, I think that v1.0.8test is fine. I use to have a lot of "garbage" in "path" table but now there is none.
Thanks for creating this add-on.


RE: Kodi Selective Cleaner addon support - jbinkley60 - 2024-11-08

(2024-11-08, 12:50)andrzejls Wrote: Come to think of it, I never, that I can remember, needed to edit/clean or otherwise modify MyMusicXX database. Having said that, I think that v1.0.8test is fine. I use to have a lot of "garbage" in "path" table but now there is none.
Thanks for creating this add-on.

I did spend some time yesterday and today doing some reverse engineering on the Kodi music database.  It's been on my To-Do list.  I am not done yet but it doesn't look too bad to write an analyzer and cleaner for it but my initial analysis is that it doesn't have as many linked fields between tables as the video database.  Because of that there will likely be less orphan checking and there could end up being more data integrity checking due to the number of text fields across the tables.  That remains to be seen.  There's also something with the source table called multipath.  If anyone is using that and could explain when / why you use it, that would be helpful. 

Lastly, duplicate checking will be interesting.  I am open to what folks would consider a duplicate (i.e. a duplicate album name with or without the same artist, a song / album combination, a song / artist combination etc..).  I see lots of potential for false positives so I am curious how folks want to think about duplicates in the music database.  For me I am think song / album combination but I need to give it much more thought.


Thanks,

Jeff


RE: Kodi Selective Cleaner addon support - Karellen - 2024-11-08

(2024-11-08, 22:09)jbinkley60 Wrote: There's also something with the source table called multipath
An old quote from @DaveBlake...
Quote:Source and source_path - a source can be multi-path (made as a collection of separate folders). Hence a source_path table to hold the separate paths per source, in your case only 1 per source.

I guess this is the same as split folders for tv shows. Season 1 & 2 on one source, Season 3 on another drive in another source?


RE: Kodi Selective Cleaner addon support - jbinkley60 - 2024-11-09

(2024-11-08, 23:19)Karellen Wrote: I guess this is the same as split folders for tv shows. Season 1 & 2 on one source, Season 3 on another drive in another source?

Thanks for the explanation.  So the orphan checking will be if there is a source table entry for each source_patch entry.  I am not sure in the other direction, even if it is just a 1:1 matching when no multipath usage exists.  The documentation isn't 100% clear on that.  I'll do some testing.

Do you see expanding KSCleaner to analyze / clean the music database as something which would add value ?  Any thoughts on duplicate checking ?


Jeff


RE: Kodi Selective Cleaner addon support - Karellen - 2024-11-09

Not sure how beneficial cleaning of music database is for your addon.
I remember @DaveBlake telling me the relationships were quite complex between artist-album-songs and the database was better designed and more robust than the video database.
It is not possible to delete anything from the music database from within Kodi. You can't delete albums or songs or artists. Anything that needs deleting, the files need to be moved out of the source and then run a Clean Library.

The best person to explain multi-path and to advise whether adding music cleaning is of any use would be @black_eagle


RE: Kodi Selective Cleaner addon support - HeresJohnny - 2024-11-09

My wish list for the music database cleaning includes some hacks/manipulation. The problem with the music database is - while it is pretty robust - that once everything is scanned into the library, small changes to the underlying file (system) are not picked up by Kodi. For example, at one time I had to move my artist information folder to an Unraid server and was unable to maintain the exact path. This resulted in all art not being picked up properly afterwards and the display of artist info became weird. Also, there is no easy way to update artist biographies in batches, i.e. when new albums are released, the artists dies or a group is disbanded.

Both cases can be adressed by database manipulation. To force an update of artist info without clearing the library and re-scanning everything, one would reset the field "lastScraped" in the "artist" table of the "mymusicxx" database. After that it's a simple case of refreshing all artist info. If you attempt to refresh artist info without resetting that field, Kodi will only refresh those artist which haven't been scraped to the library yet.

The process of refreshing artist information will usually also pick up any missing art again, with the notable exception of the artist thumbnail, in my experience. I haven't found a good way to remedy this yet, as all art is stored in a dedicated table "art" and then concatenated into the "artist" table in the field "strImage". If there was way to correct the db by checking against the correct path to the artist info folder that would be awesome.

Lastly, the artist table has an incredible amound of entries, not all of which are useful (at the moment, IMHO). Not only are album and song artists imported but also all entries from the tags COMPOSER and PERFORMER (or their counterparts in other tag schemes). I am guessing this is very old code that got left in as potentially useful when @DaveBlake restructured everything to use MBIds. As those entries are not necessarily connected to MBIds they will result in possible duplicates and the necessity of manual intervention during the scraping of artist information. I would think some code refactoring is needed here to search composers and performers's MBIds. KSCleaner could help here in a similar fashion to the Video Duplicates functionality and search artists without MBIds and juxtapose them with entries with the same name that have an MBId, maybe even offering to fill that missing info (I'm dreaming here but hey, can you blame a guy...).