Paths not being deleted and errors in log file.
#1
I used to have a TV Series called 'Legion'. It was garbage so I removed it from Kodi, ran a clean and I see that the entries for the TV show have not been deleted. However, I do not get an error in the log file.

sql:
select * from path where idpath=1146 or idpath=1147;

I get the following rows...

sql:

'1146', 'smb://192.168.1.1/TV Shows/Legion/', NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, '2019-06-26 12:17:13', '37'
'1147', 'smb://192.168.1.1/TV Shows/Legion/Season 3/', NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, '1146'

The folders do not exist.

These are not the last rows in the table. Can I delete the rows?
Reply
#2
(2019-07-07, 15:35)Yanta Wrote: It was garbage so I removed it from Kodi, ran a clean and I see that the entries for the TV show have not been deleted. However, I do not get an error in the log file.
The garbage collection of Kodi during deleting TV Shows is not optimal. Data in several tables gets left behind while other data does get deleted. In a perfect world, those data should be removed as well, along with any related thumbnails. But, as you can see, this is not part of Kodi's functionality yet.

The good thing is, this situation won't hurt Kodi. The bad thing is, the database gets a bit messy.
As they say, PRs are welcome.
Reply
#3
Ok, so you're saying just ignore it. I did that for 18 months and there were a number of these as well as a couple dozen errors in the log file. I guess then the only way to fix is periodic full scrub and reinstall of Kodi from scratch. On 4 PCs. Oh what fun Smile

"PRs are welcome"?
Reply
#4
You don't have to start from scratch, this link should help https://forum.kodi.tv/showthread.php?tid=158373 For most users, the short comings of the clean up can be ignored. For the dedicated librarian enthusiast the texture maintenance utility is a god send.
Reply
#5
(2019-07-07, 15:51)Yanta Wrote: Ok, so you're saying just ignore it. I did that for 18 months and there were a number of these as well as a couple dozen errors in the log file. I guess then the only way to fix is periodic full scrub and reinstall of Kodi from scratch. On 4 PCs. Oh what fun Smile

"PRs are welcome"?

"PR" = Pull request.  It's where someone writes some code to address an issue in Kodi and then asks the developers to "pull" that code into Kodi's core code to fix/improve something.  Lots of this going on all the time on github.

In the meantime, if you're really concerned about those few entries, you could try looking here or here (same addon, just the second link is up to date) and see if that helps.
Learning Linux the hard way !!
Reply
#6
Just grabbed script.database.cleaner-V0.6.1 myself, Thank-you black_eagle for keeping this one alive.
Reply
#7
@PatK  No problem.  I know it's not perfect (I have an issue myself where it's identifying stuff from a now defunct NAS drive, but not removing it !!) but on the whole it does a reasonably good job.
Learning Linux the hard way !!
Reply
#8
(2019-07-07, 18:16)black_eagle Wrote:
(2019-07-07, 15:51)Yanta Wrote: Ok, so you're saying just ignore it. I did that for 18 months and there were a number of these as well as a couple dozen errors in the log file. I guess then the only way to fix is periodic full scrub and reinstall of Kodi from scratch. On 4 PCs. Oh what fun Smile

"PRs are welcome"?

"PR" = Pull request.  It's where someone writes some code to address an issue in Kodi and then asks the developers to "pull" that code into Kodi's core code to fix/improve something.  Lots of this going on all the time on github.

In the meantime, if you're really concerned about those few entries, you could try looking here or here (same addon, just the second link is up to date) and see if that helps.   

Thanks for the clarification

Had a look at your script. Does it cater for when strPath  is smb://?
Reply
#9
(2019-07-07, 18:01)PatK Wrote: You don't have to start from scratch, this link should help https://forum.kodi.tv/showthread.php?tid=158373 For most users, the short comings of the clean up can be ignored. For the dedicated librarian enthusiast the texture maintenance utility is a god send.

The two issues I've highlighted in the last 24 hours are from a list of almost 3 dozen.

Scrubbing and starting from scratch don't solve the issues anyway, or at best are a temporary fix, so you're right, it's a waste of time.
Reply
#10
Hello @Yanta

To be a bit more specific to what has already been mentioned, there are 4 tables in the MyVideosxx.db that are not cleaned...
- bookmarks
- files
- path
- streamdetails

They will retain data that is pertinent to the file. You should view Clean Library as exactly that... Cleaning the Library i.e. what you see in Kodi. It is not Clean Database. What happens in the background should not affect 99% of users.

What troubles are you experiencing from these remaining entries?
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#11
(2019-07-07, 15:51)Yanta Wrote: I did that for 18 months and there were a number of these as well as a couple dozen errors in the log file.
Errors should not happen with any database, and unused database records do no cause errors.
So which log errors are those specifically?
Reply
#12
@Yanta - Yes, it caters for smb://, nfs://, http(s):// etc etc

However, I'd suggest that if you're knowledgable enough to find those rows, then you're also capable of deleting them.  That's pretty much all my script does.  It identifies files in the database that are either streaming links or have no path defined in 'sources.xml' (hence it assumes we no longer wish to keep those entries).  It also has an option to delete a sepcific path in the db, so you could choose to delete 'smb://192.168.1.1/TV Shows/Legion/' and it would remove that along with any sub-directories.

As I said though, if you're capable enough of finding the defunct entries, then you're capable enough to remove them as well.  Just take a back-up before you attempt it. ALWAYS back up the db before messing with it.
Learning Linux the hard way !!
Reply
#13
(2019-07-08, 09:03)black_eagle Wrote: @Yanta - Yes, it caters for smb://, nfs://, http(s):// etc etc

However, I'd suggest that if you're knowledgable enough to find those rows, then you're also capable of deleting them.  That's pretty much all my script does.  It identifies files in the database that are either streaming links or have no path defined in 'sources.xml' (hence it assumes we no longer wish to keep those entries).  It also has an option to delete a sepcific path in the db, so you could choose to delete 'smb://192.168.1.1/TV Shows/Legion/' and it would remove that along with any sub-directories.

As I said though, if you're capable enough of finding the defunct entries, then you're capable enough to remove them as well.  Just take a back-up before you attempt it. ALWAYS back up the db before messing with it.

I don't know the Kodi DB workings inside out. Sure I can delete them, just wanted to be sure that doing so wouldn't break Kodi.
Reply
#14
(2019-07-08, 06:21)Klojum Wrote:
(2019-07-07, 15:51)Yanta Wrote: I did that for 18 months and there were a number of these as well as a couple dozen errors in the log file.
Errors should not happen with any database, and unused database records do no cause errors.
So which log errors are those specifically? 
omg. I'm not going to be able to respond to this in 25 words or less.

My career was I.T - Programming, system design, Business continuity, disaster recovery, Q.A, system operations and so on.
So, I've developed an deep OCD over the years given that I was paid to find problems then design solutions. I have a strong pattern recognition and I'm a freak with numbers. I'm a perfectionist

I've been working on a post install script for building Windows 10 PCs. I've been testing it for a year, with over 250 hours spent testing every conceivable combination. Microsoft would have released it 10 months ago. Most other developers would have released it 6 months ago with some "Known issues". I won't release it until it's perfect. Same deal with a Network issue I've been having. I've engaged MSI, Aquantia, ASUS, Netgear and several networking forums in tracking down the three issues, that 99% of the population would just go "meh" to. I've been working on that for 4 months.

I've seen the most insignificant of problems take out manufacturing plants for days at a cost of 100's of 1,000's of dollars per day lost productivity. I've worked with customers tearing their hair out because things don't work as they're supposed to. I am totally customer focused.

So I see something not 100% right I go after it and I don't let go.

So that's how my mind works.

I went looking for an answer as to why Kodi was telling me there were 21 unwatched movies in one place, 19 on another screen and yet only seeing 18 on the unwatched view. As I was looking I started seeing all these "anomalies" in the database. Entries for shows that were no longer in existence, entries for TV shows whose titles had changed (Eg American Dad became American Dad!), and a host of others, and entries that had correcpsonding errors in the log file.

For example, I must have incorrectly named Lost 'L0sat". Two entries ended up in the database. However, Kodi was only using the incorrectly spelt one and subsequent errors appear in the log file, and no matter what I did I couldn't get the correct one to show in the library even though the DB entries existed and the giles existed. I ended up reinstalling Kodi from scratch.

Other entries in the log complained of TV shows that no information existed for. I ended up deleting all the NFO's and rescraping to solve that issue.

I'm not going to post my list of issues, as that's just going to get me in a lot of trouble.

I'm finding that Kodi has a lot of peculiarities that make no sense to me, and I interpret these as problems. For example, it was just pointed out to me that the retention of some paths may in fact be deliberate. I can't for the life of me understand why any programmer would do that, but it is what it is. I have a work around if it bugs me that much.

So I got my answers. The incorrect count is a symptom of Sets and multiple versions of the same movie.
The extraneous entries I will either use Black-Eagle's script for or I'll write my own, or probably both.

So please forgive my eccentricities and let's move on.
Reply
#15
(2019-07-08, 10:02)Yanta Wrote: Other entries in the log complained of TV shows that no information existed for. I ended up deleting all the NFO's and rescraping to solve that issue.
Possibly related to any of Item 1d, 1e or 1f... https://forum.kodi.tv/showthread.php?tid=336969

(2019-07-08, 10:02)Yanta Wrote: The incorrect count is a symptom of Sets and multiple versions of the same movie.
v19 is still a while off, but something that might interest you... https://forum.kodi.tv/showthread.php?tid...version%22
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply

Logout Mark Read Team Forum Stats Members Help
Paths not being deleted and errors in log file.0