Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
  • 1
  • 31
  • 32
  • 33(current)
  • 34
  • 35
  • 39
v19 Video Database Cleaner add-on
Backups are always a good idea, regardless of the add-on(s) you use.
Reply
yes it is, but it's a but hard to do this on an android tv.
though i have already did it
Reply
(2021-06-10, 08:39)kidbizkit Wrote: yes it is, but it's a but hard to do this on an android tv.
though i have already did it

with addon "Backup" ?
https://kodi.wiki/view/Add-on:Backup
Reply
That add-on does not do MySQL database backups, you'll need to do that yourself.
Reply
(2021-06-10, 09:17)Klojum Wrote: That add-on does not do MySQL database backups, you'll need to do that yourself.

Yes.
Sorry I had not noted that it is with a Mysql configuration
Reply
Hey all,

The Database Cleaner addon has the option to make a copy of the db before you run it.  Does that not work?  It has worked for me during the development and testing and saved me a few times :-)

Ken
Reply
(2021-06-10, 11:15)kenmills Wrote: The Database Cleaner addon has the option to make a copy of the db before you run it

Yep, but it can't back up MySQL/MariaDB databases either.  It warns you to back them up manually in such instances.  It creates a backup of SQLite db's by copying the file and appending a date and time to it.  That's not possible for MySQL which needs to be exported via mysqldump.
Learning Linux the hard way !!
Reply
(2021-06-10, 11:47)black_eagle Wrote:
(2021-06-10, 11:15)kenmills Wrote: The Database Cleaner addon has the option to make a copy of the db before you run it

Yep, but it can't back up MySQL/MariaDB databases either.  It warns you to back them up manually in such instances.  It creates a backup of SQLite db's by copying the file and appending a date and time to it.  That's not possible for MySQL which needs to be exported via mysqldump.
Ahhhh.  Gotcha, sorry I just use the built in SQLlite, so have no experience with MySQL for Kodi...

OK it may be that the Movies (and maybe TV Shows) cleanup is  bit too aggressive.  Let me look into it.
Reply
(2021-06-10, 13:35)kenmills Wrote: Ahhhh.  Gotcha, sorry I just use the built in SQLlite, so have no experience with MySQL for Kodi...

I feel I ought to point out then, that although the sql is generally very similar, there are differences and that sql that runs fine in SQLite may not run at all in MySQL/MariaDB.   To further muddy the waters, there was a bug discovered in the Music Database recently regarding the artist discography where the sql ran perfectly in SQLite but not in MySQL.  It was fixed but then discovered that the fixed version only ran correctly on some versions of MariaDB but not on others.  So not only can there be differences between MySQL/MariaDB and SQLite, there can also be differences between different MySQL/MariaDB versions.

Welcome to the minefields Image
Learning Linux the hard way !!
Reply
OK got it.  Fun fun :-)

Can someone test that the director films etc work with SQLite?

Thx!
Reply
(2021-06-10, 19:29)kenmills Wrote: OK got it.  Fun fun :-)

Can someone test that the director films etc work with SQLite?

Thx!

You want someone to test the addon VDC with a fix ?
If I right I can do that but the addon VDC is not yet updated from github ?
Reply
(2021-06-10, 19:54)ellega Wrote:
(2021-06-10, 19:29)kenmills Wrote: OK got it.  Fun fun :-)

Can someone test that the director films etc work with SQLite?

Thx!

You want someone to test the addon VDC with a fix ?
If I right I can do that but the addon VDC is not yet updated from github ?

Sorry for the confusion, I have not provided a fix yet.

I am asking if someone, using SQLite (not MySQL) can test the "same director" functionality, to see if the VDC breaks the links in SQLite.

Cheers,
Ken
Reply
(2016-04-30, 20:46)BatterPudding Wrote: The original repository currently only holds 5.4.0, and is left here purely for audit purposes; the latest version is now available from the following repo:
https://github.com/the-black-eagle/repos...-0.1.0.zip
Am I doing something horribly wrong, since i just get 404 from the above URL?
Reply
(2021-06-11, 01:06)ExTechOp Wrote: Am I doing something horribly wrong, since i just get 404 from the above URL?

That link is from 2016.  If you want the older version you can download it from the releases page at https://github.com/the-black-eagle/scrip...se.cleaner . If you want the v19 Matrix version you can get it from https://github.com/klyco/script.database.cleaner
Learning Linux the hard way !!
Reply
Ok, it took me a while to understand what was happening. So, the script was executing a SQL statement aimed at removing orphaned records from the "actor" table, and that statement would consider "orphaned" any records for which there wasn't at least one record in the "actor_link" table with the same "actor_id" (the SQL statement was "DELETE FROM actor WHERE NOT EXISTS (SELECT 1 FROM actor_link WHERE actor.actor_id = actor_link.actor_id)"). It turns out that '"actor" table' is a bit of a misnomer, seen as information for writers and directors is also stored in that same table. So I've updated the query to also take into account the "director_link" and "writer_link" tables.

The new SQL statement is:
sql:
DELETE FROM actor
WHERE NOT EXISTS (SELECT 1 FROM actor_link WHERE actor.actor_id = actor_link.actor_id)
AND NOT EXISTS (SELECT 1 FROM director_link WHERE actor.actor_id = director_link.actor_id)
AND NOT EXISTS (SELECT 1 FROM writer_link WHERE actor.actor_id = writer_link.actor_id)
I believe that should take care of the problem.

And I've removed the restriction that prevented the deep clean function from being run when using MySQL - although I recommend proceeding with caution when using that option with MySQL, and back up that db!
Reply
  • 1
  • 31
  • 32
  • 33(current)
  • 34
  • 35
  • 39

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