Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
  • 1
  • 15
  • 16
  • 17(current)
  • 18
  • 19
  • 39
v19 Video Database Cleaner add-on
Absolutely. Try it out. You won't regret a thing.
Reply
Hi,

I would like to point out that in the current version of the default.py script there is no "port" query - that could be a problem when using a MySQL database which has not the default port 3306!

I exactly ran into this issue when I upgraded my MariaDB on my NAS from version 5 (with the port 3306) to version 10 (with the port 3307) (anyone interested in how to do this the safe way, please look here for example: https://forum.synology.com/enu/viewtopic...45#p491558 )
The important thing to remember with MariaDB 10 is that the used port is always 3307, as it seems that this port is hardcoded in the package, so even if you change it to 3306, it will revert back to 3307 as soon as there is an update for it! Thus I had to edit the advancedsettings.xml file with "<port>3307</port>".

But the default.py script doesn't consider this setting in the advancedsettings.xml file, it simply assumes that the MySQL would always be opened via the default port 3306!

For this reason I modified the default.py script so that the port is read from the advancedsettings.xml file, used for logging and opening the MySQL database, too. Unfortunately, I could not detect an "attach file" option in this forum, so here I describe how to edit the script manually:

- open default.py script with a text editor (I prefer "NotePad++")
- insert the following code after line 424:
Code:
try:
    our_port = videodb.find('port').text
except:
    log('Unable to find MySQL port')
- change the line with "dbglog('MySQL details - %s, %s, %s' % (our_host, our_username, our_dbname))" into "dbglog('MySQL details - %s, %s, %s, %s' % (our_host, our_port, our_username, our_dbname))"
- search all occurances of "db = mysql.connector.connect(user=our_username, database=testname, password=our_password, host=our_host)" and replace it with
"db = mysql.connector.connect(user=our_username, database=testname, password=our_password, host=our_host, port=our_port)"
- search for "db = mysql.connector.connect(user=our_username, database=forcedname, password=our_password, host=our_host)" and replace it with
"db = mysql.connector.connect(user=our_username, database=forcedname, password=our_password, host=our_host, port=our_port)"

I'm hoping that this information will help anyone else coping with a "non-standard-port" MySQL database.
Reply
@Karellen- Pointless quotes removed. @HeresJohnny thanks for making me laugh.

So - has anyone in the meantime found a solution for the problem when "Keep any bookmarked files" is enabled in the settings?
Reply
Oh great... 100 f#&@ lines of full quote for a stupid question...
Reply
(2017-09-23, 01:20)HeresJohnny Wrote: Oh great... 100 f#&@ lines of full quote for a stupid question...

Wie sagt man so schön: es gibt keine dummen Fragen, nur dumme Antworten :-)

You know: There are no dumb questions, just dumb replies!
Reply
(2017-09-23, 09:21)Bmn2016 Wrote:
(2017-09-23, 01:20)HeresJohnny Wrote: Oh great... 100 f#&@ lines of full quote for a stupid question...

Wie sagt man so schön: es gibt keine dummen Fragen, nur dumme Antworten :-)

You know: There are no dumb questions, just dumb replies!
My bad...
Oh great... 100 f#&@ lines of full quote for a question...
Reply
Is this add-on still working?  If so, where is it?  It's been asked several times just a few pages back and, like some others, I can't even find the add on?
Reply
Try post 2 in the thread.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
After a initial stumble it worked great, as some previous posts mentioned if you have an advance settings file it has to be formatted correctly, once I fixed that the script didn't appear to run at all, rebooting fix that issue.
Reply
I had issues trying to get the script running.  It kept failing and the logs pointed to not finding the DB name.  As people had mentioned advancedsettings.xml being important, I realised I had profiles setup with each profile having a seperate DB.

After stripping them out and just leaving one entry for <videodatabase> the script ran fine.

EDIT: And that is where the force database name option comes in.  All good now.
Reply
I'm getting an error trying to install the repo but can install directly via git.

Update - I can get this running successfully on kodi 17.5. It says it will clean 590 entries then runs successfully but doesn't seem to do anything because the next time I run it, the same number is listed as needing to be cleaned. Any ideas?
Reply
(2017-12-29, 10:37)grantonstar Wrote: I'm getting an error trying to install the repo but can install directly via git.

Update - I can get this running successfully on kodi 17.5. It says it will clean 590 entries then runs successfully but doesn't seem to do anything because the next time I run it, the same number is listed as needing to be cleaned. Any ideas?

Same problem 17.6 on ubuntu. Says 624 to clean, rerun to check and still shows 624 to clean.
Could this be mythtv files? I did set it to keep those. Did you do the same?

Checking the log I see the 624 entries that need to be deleted (not related to pvr) but each run shows the same list in the log.
Its as though they are found, but not deleted.
Reply
(2018-01-03, 00:11)glubbish Wrote:
(2017-12-29, 10:37)grantonstar Wrote: I'm getting an error trying to install the repo but can install directly via git.

Update - I can get this running successfully on kodi 17.5. It says it will clean 590 entries then runs successfully but doesn't seem to do anything because the next time I run it, the same number is listed as needing to be cleaned. Any ideas?

Same problem 17.6 on ubuntu. Says 624 to clean, rerun to check and still shows 624 to clean.
Could this be mythtv files? I did set it to keep those. Did you do the same?

Checking the log I see the 624 entries that need to be deleted (not related to pvr) but each run shows the same list in the log.
Its as though they are found, but not deleted.  
I think to remember that I had this problem, too, and could resolve it by following the advices given here:  https://forum.kodi.tv/showthread.php?tid...pid2650067
Reply
Appears to be related to mysql. I am using MyVideos108.db for my vids
It may however help someone else.
Reply
Same for me. Not using mysql.
Reply
  • 1
  • 15
  • 16
  • 17(current)
  • 18
  • 19
  • 39

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