FernetMenta / vdr-plugin-vnsiserver

VDR plugin to handle XBMC clients.
GNU General Public License v2.0
17 stars 33 forks source link

Two recordings with same name in "non-VDR" subdirectory. One deleted, both gone? #89

Open M-Reimer opened 7 years ago

M-Reimer commented 7 years ago

Some days ago, the following happened:

I'm not 100% sure if this really is a major problem and I don't have any more recordings, I want to loose. So please just double check that your new code (with the directories, usually not visible directly in VDR) really works the way it should, especially if it gets to deleting recordings.

FernetMenta commented 7 years ago

What was the value of the new setting during your tests?

M-Reimer commented 7 years ago

I used the "new way", meaning that the "extra directories" are shown in Kodi. What I have in this case, are two layers of directories. For example, if I have several recordings, named "Some Recording", then VDR itself will just show several "Some Recording" items in the recording list. Kodi with VNSI now has only one "Some Recording". If I enter this directory, I have a list of entries with just the name "Some Recording". In my case, I had exactly two recordings with the same name. They only differed in the recording date and time. So I entered the first directory with the name of my recording and had two entries in there, again with my recording name. When deleting one of them, it seems that the whole thing falls back to the case that only one recording with this name exists, which seems to have caused some trouble.

FernetMenta commented 7 years ago

Thanks for the detailled report. I will investigate.

FernetMenta commented 7 years ago

I about to reproduce but I am not sure if I got this right. Look at this example:

~/MyVideos/Tagesschau/2013-03-13.16.03.1-0.rec

A second recording with the same name "Tagesschau" would be in the same OS folder:

xbmc@j4205:~/MyVideos/Tagesschau$ ls -ls total 8 4 drwxrwxr-x 2 xbmc video 4096 Mar 13 2013 2013-03-13.16.03.1-0.rec 4 drwxrwxr-x 2 xbmc video 4096 Mar 13 2013 2013-03-13.16.08.1-0.rec

Is this the situation you are referring to?

M-Reimer commented 7 years ago

Yes. This is the situation where I potentially lost both recordings when trying to delete one of them.

FernetMenta commented 7 years ago

Before. You see that Kodi shows the same structure as the OS file system. The folder "Tagesschau" does exist (vdr does not show it) screenshot001

xbmc@j4205:~/MyVideos/testing/Tagesschau$ ls -la total 16 drwxrwxr-x 4 xbmc xbmc 4096 Mar 11 15:40 . drwxrwxr-x 3 xbmc xbmc 4096 Mar 11 15:40 .. drwxrwxr-x 2 xbmc xbmc 4096 Mar 11 15:40 2013-03-13.16.03.1-0.rec drwxrwxr-x 2 xbmc xbmc 4096 Mar 11 15:40 2013-03-13.16.08.1-0.rec

After having deleted one recording. The OS folder "Tagesschau" is not shown by Kodi anymore. screenshot002

But it still exists:

xbmc@j4205:~/MyVideos/testing/Tagesschau$ ls -la total 16 drwxrwxr-x 4 xbmc xbmc 4096 Mar 11 15:44 . drwxrwxr-x 3 xbmc xbmc 4096 Mar 11 15:40 .. drwxrwxr-x 2 xbmc xbmc 4096 Mar 11 15:40 2013-03-13.16.03.1-0.rec drwxrwxr-x 2 xbmc xbmc 4096 Mar 11 15:40 2013-03-13.16.08.1-0.del

This is desired behaviour and saves an additional click (when playing a recoding), if only a single .rec file is in a folder. In other words, the folder is only shown if there are more than a single .rec file in this folder.