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-02-07

I have posted test version 1.0.4a of the Kodi Selective Cleaner and am looking for some folks to test, especially if you are running MySQL and Kodi profiles. 

Here are the enhancements in this version:
 
  • Fixed advancedsettings.xml parsing errors for space characters
  • Significantly improved advancedsettings.xml parsing to provide specific error details
  • Improved messaging for not supporting MySQL backups
  • Added support to allow local database backups with mixed MySQL and Local databases
  • Improved Kodi profile support vs. only the master profile

I'll begin working on adding the uniqueid table analysis and cleaning. 


Thanks in advance,

Jeff


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

I have posted test version 1.0.4b of the Kodi Selective Cleaner and am looking for some folks to test, especially if you are running MySQL and Kodi profiles. 

In addition to the enhancements listed in 1.0.4a above this version adds the ability to export the uniqueid table and adds it as a table which can be analyzed with the video database analyzer.  I could uses some testers to try it out.  If you typically do a "Clean All" function I would ask that you try just analyzing and cleaning the uinqueid table first before doing a Clean All, just to make sure everything works properly.


Thanks,

Jeff


RE: Kodi Selective Cleaner addon support - jbinkley60 - 2024-02-10

(2024-01-25, 19:31)PnoT Wrote:
(2024-01-25, 15:01)jbinkley60 Wrote:
(2024-01-24, 22:23)PnoT Wrote: Does the application support using the username and password for the Kodi database in the advancedsettings file? 

I can't seem to get it to connect to my database and here is the error: error <general>: EXCEPTION IN (C:Kodi\addons\plugin.program.kscleaner\resources\lib\common.py, LINE 189 "db = mysql.connector.connect(**config)"): connect() argument after ** must be a mapping, not NoneType

I've tried:

default
xbmc_videos
xbmc_videos121

My adv file contains the db name, IP of server, username, and password.

Yes, Kodi Selective Cleaner reads your advancedsettings.xml file to get username, password etc.  See here for more information.  That error is a generic error which I will fix in the next release of code.  It typically means there was a problem parsing your advancedsettings.xml file.  Can you post all of the exception messages from your Kodi.log file.  ?  This is typically the second one.  The first one which is likely the XML parsing exception should hold the key.  Worst case I may need to get a copy of your advancedsettings.xml file to see the cause.  One cause I often see is a space character as the first character on the first line.  If there is a space try removing it.  That is being fixed in the next release too where the XML parser will ignore it.

Thanks,

Jeff

I looked again at the logs, and it was complaining about not being able to parse the port. further inspection of my advancedsettings.xml showed that for the videos database, there was no <port> entry. I modified the settings and changed the names of my databases in the addon, and everything worked!

I noticed that the database name in the addon configuration had to be exact.  I tried just xbmc_videos and it wouldn't work without adding "121" which is the version.  According to the document, it should append the version number.

I looked at the code and when you provide a database name (vs the standard Default names) the Kodi Selective Cleaner should append the db version number.  I just tested v1.0.4b and it properly appended the version number.  It is quite possible the parsing issues in 1.0.4 were causing it not to properly be appended. 

Please let me know, if/when you get a chance to test 1.0.4b.


Thanks,

Jeff


RE: Kodi Selective Cleaner addon support - HeresJohnny - 2024-02-12

UniqueID cleaning seems to work without problems.

However, something else is strange. When cleaning my video database, over 4000 entries are scrubbed, most of them in the "seasons" table. When I update my video database afterwards, all of that seems to added to the db again. KSC then cleans it again on the next run. This can be repeated ad infinitum.

All this leads me to believe that there might be an error in the cleaning logic. I'm providing you with various files to analyze and test per PM, maybe you see something.


RE: Kodi Selective Cleaner addon support - theoneyouknowleast - 2024-02-12

Just trying out this plugin for the first time, but it doesn't seem to be able to connect to my mysql DB.

Seeing this error in the logs and I'm am running Kodi 21 Beta 2 on Windows. I tried 1.04 and 1.04b
Quote:2024-02-12 16:09:31.632 T:1104     info <general>: KS Cleaner MySQL server database not found: myvideos124



RE: Kodi Selective Cleaner addon support - HeresJohnny - 2024-02-12

I'm running the same versions of Kodi and KSC without problems, so you need to provide more info.


RE: Kodi Selective Cleaner addon support - jbinkley60 - 2024-02-13

(2024-02-12, 22:56)HeresJohnny Wrote: UniqueID cleaning seems to work without problems.

However, something else is strange. When cleaning my video database, over 4000 entries are scrubbed, most of them in the "seasons" table. When I update my video database afterwards, all of that seems to added to the db again. KSC then cleans it again on the next run. This can be repeated ad infinitum.

All this leads me to believe that there might be an error in the cleaning logic. I'm providing you with various files to analyze and test per PM, maybe you see something.

I've not made any changes to the seasons cleaner / analyzer code in some time.  I'll take a look at it and see what I can find.

Jeff


RE: Kodi Selective Cleaner addon support - jbinkley60 - 2024-02-13

(2024-02-12, 23:25)theoneyouknowleast Wrote: Just trying out this plugin for the first time, but it doesn't seem to be able to connect to my mysql DB.

Seeing this error in the logs and I'm am running Kodi 21 Beta 2 on Windows. I tried 1.04 and 1.04b
Quote:2024-02-12 16:09:31.632 T:1104     info <general>: KS Cleaner MySQL server database not found: myvideos124

That would indicate that you are connecting to your SQL server but that isn't the database name being used.  Is that your SQL database name for your video database ?  Do you have a name XML tag in your advancedsettings.xml file for your database ?  If so, what is it ?


Thanks,

Jeff


RE: Kodi Selective Cleaner addon support - theoneyouknowleast - 2024-02-13

Here is what my advancedsettings.xml file looks like (santized) and the datbase is name MyVideos124.

I tried this on two computers Win11 and Server 2019, and both have the issue.

advancedsettings:

<advancedsettings>
    <videodatabase>
        <type>mysql</type>
        <host>1.2.3.4</host>
        <port>3306</port>
        <user>kodi</user>
        <pass>kodi</pass>
    </videodatabase>

    <musicdatabase>
        <type>mysql</type>
        <host>1.2.3.4</host>
        <port>3306</port>
        <user>kodi</user>
        <pass>kodi</pass>
    </musicdatabase>
</advancedsettings>

DB:

MariaDB [(none)]> SHOW DATABASES;
+--------------------+
| Database           |
+--------------------+
| MyMusic82          |
| MyMusic83          |
| MyVideos121        |
| MyVideos124        |
| information_schema |
| mysql              |
| performance_schema |
| sys                |
+--------------------+



RE: Kodi Selective Cleaner addon support - theoneyouknowleast - 2024-02-13

Just an update, setting the DB name manually to "MyMusic83" & "MyVideos124" resolved the issue. Seems its case-sensitive.


RE: Kodi Selective Cleaner addon support - jbinkley60 - 2024-02-13

(2024-02-13, 02:41)theoneyouknowleast Wrote: Just an update, setting the DB name manually to "MyMusic83" & "MyVideos124" resolved the issue. Seems its case-sensitive.

Yes, I just read your other response and was going to suggest exactly this.  The default for the addon, when no name field is in the advancedsettings.xml file is lower case. 

Thanks,

Jeff


RE: Kodi Selective Cleaner addon support - HeresJohnny - 2024-02-13

(2024-02-13, 00:41)jbinkley60 Wrote: I've not made any changes to the seasons cleaner / analyzer code in some time. 

Jeff

Right, I've made this observation for quite some time now but never got around to reporting it properly.


RE: Kodi Selective Cleaner addon support - bossanova808 - 2024-02-17

Finally got a quick moment to test the test version - I went gung ho and 'cleaned all tables' of the video database (~46000 records, and I use profiles...) - all seems to have gone ok, no major breakage I can see....so I switched to our other profile (kids) - and ran it there too.

Again seems to work well, thanks!  Looking at the logs for both I can see it referring to shows I've moved between profiles or completely nuked, all as expected as far as I can tell in a fairly quick look.  Definitely working with profiles now, though.

Although when cleaning seasons it just shows 'name' rather than the actual show name, I think?


RE: Kodi Selective Cleaner addon support - jbinkley60 - 2024-02-17

(2024-02-17, 09:35)bossanova808 Wrote: Finally got a quick moment to test the test version - I went gung ho and 'cleaned all tables' of the video database (~46000 records, and I use profiles...) - all seems to have gone ok, no major breakage I can see....so I switched to our other profile (kids) - and ran it there too.

Again seems to work well, thanks!  Looking at the logs for both I can see it referring to shows I've moved between profiles or completely nuked, all as expected as far as I can tell in a fairly quick look.  Definitely working with profiles now, though.

Although when cleaning seasons it just shows 'name' rather than the actual show name, I think?

Thanks for the testing feedback.  Much appreciated.  Let me take a look at the seasons table logging.  The actual show name is a link to the tvshow table and not stored in the seasons table.  It can be done. I'll just need to look at it a bit.  I might do something like the show and season (i.e. Blue Bloods - S01) or similar.  I'll post another test release with the change.


Thanks,

Jeff


RE: Kodi Selective Cleaner addon support - dkangel - 2024-02-20

new myvideos131 in omega beta 3 Rofl