Delete file from usb-drive, shutdown Kodi, boot kodi, file is back ! ?
#1
I got some episodes on an usb stick. After watching I delete the episode (else I can't remember which episode I've already seen).

When I delete an episode, then shutdown Kodi. Next day I boot kodi, the last episode I deleted is back again. Not the episode I deleted 30 min before that last one, but always the last.

Is that some sort of bug? In kodi or with libreelec?
Reply
#2
Firstly, I believe Kodi will keep track of the watched status (whethered index or not).  You might need to check the wiki but I think this is enabled by default.  Secondly, are you sure you deleted the file from the filesystem and not just the entry from the database assuming you're using a database?  How did you do it?  Did you confirm over ssh that the file is removed?
Need help programming a Streamzap remote?
Reply
#3
Kodi never marked anything from an usb-stick as watched. It does that fine in other streaming adons like youtube, just never did with local files.

When I delete the file, there is a confirmation dialog and then the file disappears from the list. Same for the files that stay gone, as the files which magically resurrect the next day.

I'm not using a database.

Just viewing them from:
Kodi > gear-symbol > filemanager > usb
Reply
#4
(2021-04-18, 20:40)carsten8888 Wrote: I'm not using a database.

Yes, you are. The default database for Kodi is a SQLite database file.
Kodi does keep track on all video files, in the video library or not.
Perhaps when you re-insert the USB stick the next time, it has a different drive letter or some other ID.

(2021-04-18, 20:40)carsten8888 Wrote: When I delete the file, there is a confirmation dialog and then the file disappears from the list.

If you have also enabled the Rename and Delete option in the Kodi settings, then you will get a 2nd confirmation dialogue to remove the file from the source.
Reply
#5
I now see that indeed Kodi shows the file as viewed. But that is in the 'videos' menu-item, not in the filemanager.

Ok, I will try watching via the 'videos' menu-item, see if that changes things when the file is deleted.
(Which is a pain because I always hide the 'videos' menu-item, because I want the favorites page to be my homepage, but there is no setting for that, Kodi just uses the first menu-item as a homepage. I made a new thread about that https://forum.kodi.tv/showthread.php?tid=362169)
Reply
#6
Turns out that from the season-view, right click an episode (local on usb!), there is no option to delete it.

So the issue is in the file-manager. Should be easy to reproduce this. Anyone?
Reply
#7
(2021-04-19, 18:36)carsten8888 Wrote: Turns out that from the season-view, right click an episode (local on usb!), there is no option to delete it.

So the issue is in the file-manager. Should be easy to reproduce this. Anyone?
Not sure what you want us to reproduce, you are not deleting the file from the file system because if you did it would be deleted. As already said above, if you have also enabled the "Rename and Delete" option in the Kodi settings, then you will get a 2nd confirmation dialogue to remove the file from the source.
Reply
#8
Sorry for confusing you with things that might have been off-topic. (althou with that option checked, via the videos-menu-item, 1 confirmation, same result)

back on-topic:

to reproduce this:
1. go to the filemanager (Kodi > gear-symbol > filemanager > usb)
2. delete a file from the usb drive, confirm the dialog. *file disappears from the list*
3. shutdown Kodi
4. boot Kodi
5. check if the file is still deleted in the filemanager.

In my case the file is back! Maybe there is some delay in the actual deleting process? Because if I delete a file, watch another episode, then delete the second file, shutdown and boot, only the second file is back.

raspberry pi 3
libreelec 9.2.6
Reply
#9
(2021-04-20, 17:05)carsten8888 Wrote: Sorry for confusing you with things that might have been off-topic. (althou with that option checked, via the videos-menu-item, 1 confirmation, same result)

back on-topic:

to reproduce this:
1. go to the filemanager (Kodi > gear-symbol > filemanager > usb)
2. delete a file from the usb drive, confirm the dialog. *file disappears from the list*
3. shutdown Kodi
4. boot Kodi
5. check if the file is still deleted in the filemanager.

In my case the file is back! Maybe there is some delay in the actual deleting process? Because if I delete a file, watch another episode, then delete the second file, shutdown and boot, only the second file is back.

raspberry pi 3
libreelec 9.2.6
No there is no delay, you need to SSH into the file system and verify that the file is actually deleted. Or remove the USB Drive and put it in your PC & check if the file is gone. What you are saying makes no sense, Kodi won't tell you it's deleted a file then recreate it on a reboot of the system. Try deleting a file from the Kodi install on the SD Card & see if that appears on a reboot, it shouldn't.
Reply
#10
I have no help to offer, but I had to comment that this made me "laugh"; so here are some sh*ts and giggles --

I've browsed through pictures that I've captured from a streaming webcam (smartphone) that I've connected, and after I've done some deleting and such of the photo files, I've noticed old thumbnails get used for the new pictures - that's straight forward to understand; I regenerate thumbnails, exit Kodi, and it's all back in order (so I think).  Also, if a file is deleted, a new file will fill in at the sequential name order (not continue after the last (greatest) file number - still straight forward to understand, I rename the files to get them in tight order and regenerate thumbnails (so I think).  Next, here's where it gets crazy - viewing along, everything seems fine and patched up; I hit Info to play around with the controls (Kodi has a picture with information to the right) -- but it's an old photo that I didn't think I deleted (and wanted).  "OK, it has new thumbnails on old pictures" - "Wait, no", I scroll forward and backward, and the old photo is gone; I see the new photo (so in this mode it must be scrolling thumbnails).  At this point I just close it up wondering why it is so convoluted, not sure if I deleted things or not, am I even remembering what all just happened correctly, or is it doing things erroneously.  (Did I really bump a screen shotshot of Kate Upton that now shows up on my back yard picture thumbnail??!? Opps, LOL)

Just wanted to share this and also make any Kodi programmer aware since I don't think a regular user would tolerate this and give Kodi some bad PR.  Funny to me at the moment, but I am at a DEFCON 3 with what's going on.
Reply

Logout Mark Read Team Forum Stats Members Help
Delete file from usb-drive, shutdown Kodi, boot kodi, file is back ! ?0