Clean Library Function Deletes Empty TV Series
#1
Every time I use the "Clean Library" function, XBMC removes TV episodes that have been deleted from my hard drive (which I want it to do) and also any TV series of which all episodes have been deleted from my hard drive even though the series folder remains on my hard drive (which I do not want it to do).

More specifically, I keep my TV series in C:\TV\ with subfolders for each series (e.g., C:\TV\Series1\). I delete each episode after I watch it, but I never delete the series folder even if I have no more episodes of the show. After I delete episodes, I use the "Clean Library" function. If I have deleted all episodes of a series but left the series folder intact and I use the "Clean Library" function, the entire series is removed from XBMC.

This behavior is undesirable for me because after XBMC removes a series, it no longer scans the series folder for new episodes. That is, if I download a new episode of a series that has been removed from XBMC and place that episode in the series folder, XBMC will not recognize the new episode unless I manually remove and re-add C:\TV\ as a video source in XBMC.

Is there any way to set the "Clean Library" function to not delete empty series (provided that the series folder is still intact)?

Thanks!
Reply
#2
What version? There were some changes not so long ago to this.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
Thanks for your reply! I'm running Eden 11.0. Have the changes happened since then?
Reply
#4
This is probably fixed in Frodo beta1, yes.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#5
Fantastic, thanks.

If anyone else has this problem on Eden and needs a solution before the Frodo final release is available, I have a simple workaround. XBMC will always update the entire TV folder on startup if a new subfolder has been created within it. So, I have a batch file that runs every five minutes which deletes and then recreates a dummy subfolder in my TV folder. This ensures that XBMC will update the entire TV folder every time it starts up.

If anyone is interested, I'm happy to upload the (very simple) contents of the batch file.
Reply
#6
How is it working now ?

http://wiki.xbmc.org/index.php?title=Settings/Videos:

"Clean Library...
This function will perform a number of 'cleanup' tasks on your video database and can be run if you have moved, deleted or renamed files.
Removes any videos with invalid paths and all information tied to these files.
Removes all removable media (example: DVD) without checking for existance + all information tied to these files"

With Raspberry Pi, all media source are HDD or network shares and makes no-sense to remove all removable media without checking for existance

My suggestion is to only remove files from removable media after checking the inexistence (delete only If they were deleted). Important point: if the HDD/SMB/share where the media was previously scrapped are not mounted/connected, alert user that all content will be removed as they "don't exist" - not mounted/connected

What do you think??
Reply
#7
fernandovg -

It's working well enough with the workaround that I described above. The only downside is that XBMfrequently has to re-download the series information for all the TV series it deletes.

All my videos are actually stored on my local disk, not removable media. The problem is simply that the Clean Library function doesn't handle empty TV series properly, as described above.

Thanks!
Reply
#8
jmarshall -

I just installed the final version of XBMC v12, but this problem has not been fixed. Is there anything we can do to get this into a queue of fixes for the developers?

Thanks!
Reply
#9
+1

I have he same problem. If the TV Show's folder is still in the source then the TV Shows should not be removed from the DB.

Reply
#10
I still have this problem in XBMC v13. I'm not sure, but I think it has worked for me before, so maybe a regression?
Reply
#11
I on the other hand would like XBMC not to display tv shows which are empty, so some kind of unified setting for this would be great. ;-)
Reply
#12
(2014-06-18, 01:17)Kamol Wrote: I on the other hand would like XBMC not to display tv shows which are empty, so some kind of unified setting for this would be great. ;-)

See advancedsettings.xml for hiding empty shows
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#13
I am having an issue where Gotham deletes an existing TV path that has no files in it during a DB clean. How do I report this bug? It's really annoying to have my fan art, etc. wiped out constantly just because there aren't any TV shows in the path currently...

(2014-06-18, 01:18)Martijn Wrote:
(2014-06-18, 01:17)Kamol Wrote: I on the other hand would like XBMC not to display tv shows which are empty, so some kind of unified setting for this would be great. ;-)

See advancedsettings.xml for hiding empty shows
Reply
#14
This problem is still occurring

Adding <hideemptyseries>false</hideemptyseries> does not do anything to stop it, all it does is allows the empty shows to be displayed but as soon as a cleanup is done it bumps the empty shows out of the database so they disappear anyway.

This really is a fairly major problem depending on just how you have your XBMC setup.

I have the following setup:

1 Server machine, XBMC running constantly and doing media scans and database cleanups at set intervals. (headless seedbox)
3 desktop PC's all running XBMC (mine, my wifes and my sons)
2 laptops both running XBMC (one connected to the TV, in the living room and another on the TV in the bedroom)

The server machine runs Flexget, which checks trakt for the shows and movies I want and then goes and finds torrents for those shows and automatically feeds them to uTorrent for download into preset folders.

At set intervals XBMC updates it's library so the newly downloaded stuff shows up in the library with a maximum delay of 2 hours.

The XBMC database is shared using mysql, this allows every machine on the network to see the database that is maintained by the server machine.

This makes my household media system streamlined and for the most part fully automatic.

However this issue with removing shows from the database when the folder is still there but no files are in it throws a spanner in the works.

If my wife watches lets say Dallas and deletes the episodes as she goes everything works great until she gets to the last episode.

She deletes that last episode and the show is still in the TV Show list but with no episodes, this would be perfect if it stayed that way but it does not as soon as the server machine cleans the database Dallas is then removed from the database but the show folder remains on the hard drive.

This is where the problem comes in:

fast forward to the next week and the latest episode of Dallas is auto downloaded as soon as it's available.

XBMC does a scan and the new episode is not seen, it's as though XBMC is just ignoring that folder since it became empty so it does not bother checking it anymore to see if there is anything new in it.

The only way to get it to show up is to move the whole Dallas folder out of the XBMC share path, perform a scan and clean, put the folder back and then perform another scan.

There really needs to be an option on the cleanup routine so you can tell it NOT to remove shows with no episodes from the database.
Reply
#15
Update:

This has nothing to do with the cleanup routine.

I disabled cleanup after update so it would only update the library without cleaning the database and sure enough the problem is still there.

Without the cleanup the show still shows in the list but with no episodes, but no new episodes will show up after there is a scan performed with no episodes in the folder.

XBMC is not checking all folders in the path only folders that are either new since the last scan or contained at least one episode during the last scan
Reply

Logout Mark Read Team Forum Stats Members Help
Clean Library Function Deletes Empty TV Series1