Jump to content

Is it possible to delete single entry from the recordings database?


lehtikissa

Recommended Posts

Hello,

It seems that when a recording is deleted on the Recordings screen of Recording Service, entry for that recording still remains in recordings database (SvcDatabase.db3) even though it doesn't appear in search.

Is there a way to delete a single recording entry from the recordings database apart from using a third-party SQL editor (which might cause issues)?

If this is not possible, here is why it'd be useful:

Scenario:

- Timer is set to automatically record a show and ignore repeat broadcasts.

- A recording of an episode of that show gets corrupted. It is then deleted on the Recordings screen of Recording Service.

Problem:

- When that episode is broadcast again, it isn't automatically re-recorded because Recording Service thinks the episode is already recorded and it thus deactivates the timer. (Of course, one can activate that timer, but if the re-broadcast happens only later, one might not notice it -- after all, one purpose of a timer is to automate recordings.)

Solution:

- If it was possible to remove entry for that episode from the recordings database, timer would automatically re-record it.

- One way to implement this would be to add a new button to the Recordings screen next to the current Delete button that is shown for each entry when mouse is over it.

I hope this issue is not yet addressed on the forums, I did try to search. :)

  • Like 1
Link to comment
It seems that when a recording is deleted on the Recordings screen of Recording Service, entry for that recording still remains in recordings database (SvcDatabase.db3) even though it doesn't appear in search.

 

I can't confirm it. I've just checked it and used the debugger to single-step through the code. It showed me that an ongoing recording gets deleted from the data base when it it is deleted in the web interface. Otherwise it would still be displayed.

 

The executed code is (a bit simplified):

 

DB.ExecSQL('delete FROM recordings where idRecord = ' + IntegerToString(RecID));

Link to comment

Thanks for checking it, Griga.

Sorry, you indeed are right: I now deleted a test recording from web interface and then checked with SQL editor whether it was removed also from the database. It indeed got removed from the database too.

I apparently misinterpreted changelog quoted in this thread and used it to falsely confirm my initial assumption of why timer was deactivated for a re-broadcast of an episode that was deleted using web interface.

That leaves me wondering why the timer was deactivated even though the episode was no longer in database.

Here is what I did:

1. I noticed incomplete recording/episode of a show for which I have an Autosearch Timer.

2. I deleted that recording from web interface.

3. I then run Tasks > Auto Timer to immediately set that episode to be recorded again (it was broadcast again the next day).

4. I checked Timer screen, and timer for re-broadcast of that episode was shown deactivated.

5. To help solve issue, I removed all timers for that show and then used Tasks > Auto Timer again to re-create the Timer entries.

6. Timers for that show were re-created in Timer screen, but timer for the deleted episode was still shown deactivated.

Is there another reason why this might happen? Or should the timer be shown as activated when one does what I outlined above?

Link to comment

You must clear the recordings history and rebuild it afterwards (in RS Tasks) to remove the corresponding entry you did delete from recordings database. The recording history and the recordings database is not the same.

Edited by majstang
Link to comment

Thanks for your tip! Ok, yes, that another thread indeed speaks about recordings history database -- where is that located?

I did notice clear/rebuild functions. The reason I haven't used them is that I'm not sure what exactly will get deleted if I execute them.

I'd rather not lose any information except what I specifically want removed. For an example, much of my older recordings aren't in a folder specified in DVBViewer (and I can't specify them as they're offline), so I'm not sure if DVBViewer would think those recordings no longer exist if I execute clear/rebuild, and as a result it might remove them from the database. That's obviously not something I want as the information is needed both by the timers, and I also use the Search function to manually check if I have a program recorded or not.

Based on your reply the feature I should've requested in my initial post is a button that deletes entry for a deleted recording both from recordings history AND from recordings history database.

Link to comment

When rebuilding the recording history RS searches all recording directories you have specified in RS settings (so if you have multiple directories specify them) and rebuilds a recording history entry for each actual recording found in those directories. So yes if you wanna keep a recording history entry although the actual recording is deleted, clearing the recordings history could cause you troubles. To prevent that you could keep the fileinfo.txt files that gets created when the show is recorded (store those files in one of your recording directories). In that way RS rebuilds the recording history entry quite fine although the actual recording is already deleted.

 

The recordings history can be found in SvcDatabase.db3 table "recordedlist" and the recordings database is in table "recordings". I wouldnt recommend manually removing sql entries with an editor. Yes your request sounds to be very nice :original:

Edited by majstang
Link to comment

Thanks for the details, majstang! I will indeed stay clear from clear/rebuild as I have lots of recordings offline. While I have txt and log files saved for all recordings, gathering them all since at least 2009 would be quite an undertaking.

Let's hope we see this feature in upcoming DVBViewer Media Server. One would think it is quite quick to add and would be really helpful in certain situations (it might not be too bad idea to expose recordings history database for browsing either; if its own screen is too much, maybe a checkbox in Recordings screen would suffice to keep the user interface simple). I'd probably more often use it than current Delete button as when I delete something from Recording Service, it almost always means there is something wrong with the recording. If a recording is OK, I archive it offline sooner or later, but want to keep its details available in Recording Service.

I encountered this issue first time only now as I started using the auto timers only last week and I've already found them a real timesaver.

Ps. To avoid confusing others, what I should've written in my previous post was that I'd like to see a button that deletes recording entry both from recordings database AND from recordings history database.

Link to comment
×
×
  • Create New...