Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
Solved Path table entries with no corresponding entries in `files` table
#1
Hi

As per my title (and I apologise if this has been asked before), is it valid to have rows in the `path` table where there are no corresponding entries pointing to it from the `files` table?

I have more than 44 entries in my paths table that are orphans.  It begs the question for me ... why are they there?  Can they be deleted?
Reply
#2
(2020-06-07, 12:26)bfgane Wrote: is it valid to have rows in the `path` table where there are no corresponding entries pointing to it from the `files` table?
It begs the question for me ... why are they there?

Not really. Each entry should be linked to a video file. All those 44 paths entries totally empty, or is there any other data in them?
Do you manually delete video files, and do a video database clean afterwards, or are you deleting videos from the Kodi GUI directly?
Are you using Milhouse's TextureCache utility for scrubbing the database or any other tool?

Provide a debug log (wiki), perhaps there are some overactive add-ons at work.

(2020-06-07, 12:26)bfgane Wrote: Can they be deleted?

Files and paths are linked to various other tables in the relational SQL database, so deleting them may still corrupt your database. Make a backup/SQL dump beforehand. Orphan records are not harmful, they won't "break" functionality.
Reply
#3
(2020-06-07, 13:13)Klojum Wrote:
(2020-06-07, 12:26)bfgane Wrote: is it valid to have rows in the `path` table where there are no corresponding entries pointing to it from the `files` table?
It begs the question for me ... why are they there?

Not really. Each entry should be linked to a video file. All those 44 paths entries totally empty, or is there any other data in them?
Do you manually delete video files, and do a video database clean afterwards, or are you deleting videos from the Kodi GUI directly?
Are you using Milhouse's TextureCache utility for scrubbing the database or any other tool?

Provide a debug log (wiki), perhaps there are some overactive add-ons at work.
(2020-06-07, 12:26)bfgane Wrote: Can they be deleted?

Files and paths are linked to various other tables in the relational SQL database, so deleting them may still corrupt your database. Make a backup/SQL dump beforehand. Orphan records are not harmful, they won't "break" functionality. 
Hi.  Thanks for the response.

No.  They are not totally empty.  I am noticing that most of them are a parent directory for a TV show.  So, for example, if I have a TV show called "9-1-1", there will be an entry in paths for each season of 9-1-1, and a parent entry for just 9-1-1.  Each episode will have a file in 'files' that points to the season entry in 'path', but there is nothing that points to the parent entry (protocol://share/TV Shows/9-1-1).  However, the path entry for 9-1-1 is not completely empty.  The fields strHash and dateAdded are populated.
Reply
#4
(2020-06-08, 02:50)bfgane Wrote: So, for example, if I have a TV show called "9-1-1", there will be an entry in paths for each season of 9-1-1, and a parent entry for just 9-1-1.
Correct. This is my sample:
Image

and the link to the path root folder (idPath=1335):
Image

(2020-06-08, 02:50)bfgane Wrote: but there is nothing that points to the parent entry (protocol://share/TV Shows/9-1-1).
So the idParentPath field in record #2 in the first screenshot (idParentPath=3061) would be empty or NULL in your database?
That would be weird.
Reply
#5
Ok.  So it sounds as though my database is valid, for TV shows.  

Thanks.  Mark this solved.
Reply
#6
Thread marked solved.
Learning Linux the hard way !!
Reply

Logout Mark Read Team Forum Stats Members Help
Path table entries with no corresponding entries in `files` table0