Recordings improvement (1 Viewer)

Swede

Portal Pro
September 6, 2006
493
47
West Coast Archipelago
Home Country
Sweden Sweden
I think that, what to be expected, when entering My Recordings, is that all deleted and invalid recordings are gone. Only the ones you can watch are there. No more angry wife. :p

I have compiled a TvPlugin.dll that does that, even if you have deleted the files in other ways than from within MP. It's for ver. 1.0.0.22029

How about implementing this?
 

Attachments

  • TvPlugin.zip
    30.6 KB

Swede

Portal Pro
September 6, 2006
493
47
West Coast Archipelago
Home Country
Sweden Sweden
Of course, it would be even better if there also was a check for recordings that are in the folder, but not in the database. I'll see if that is easy to add.

Edit: ...nope! ...not easy.
 

Swede

Portal Pro
September 6, 2006
493
47
West Coast Archipelago
Home Country
Sweden Sweden
Patch for those who wants it:

Code:
Index: TVLibrary/TvPlugin/TvPlugin/TvRecorded.cs
===================================================================
--- TVLibrary/TvPlugin/TvPlugin/TvRecorded.cs	(revision 22029)
+++ TVLibrary/TvPlugin/TvPlugin/TvRecorded.cs	(working copy)
@@ -439,7 +439,11 @@
 
     protected override void OnPageLoad()
     {
+
       base.OnPageLoad();
+        DeleteInvalidRecordings(); //Added by Swede
+        Log.Info("DeleteInvalidRecordings - Swede"); //Added by Swede
+
       if (btnCompress != null)
       {
         btnCompress.Visible = false;
@@ -1633,6 +1637,16 @@
         if (!server.IsRecordingValid(rec.IdRecording))
         {
           server.DeleteRecording(rec.IdRecording);
+          
+          CacheManager.Clear();//Added by Swede
+          LoadDirectory();//Added by Swede
+          while (_iSelectedItem >= GetItemCount() && _iSelectedItem > 0)//Added by Swede
+          {//Added by Swede
+              _iSelectedItem--;//Added by Swede
+          }//Added by Swede
+
+          GUIControl.SelectItemControl(GetID, facadeView.GetID, _iSelectedItem);//Added by Swede
+
         }
       }
     }

Edit: This is now implemented in Disaster's MediaPortal Release
 

Attachments

  • TvRecorded.patch
    30.6 KB

nicx

Portal Pro
February 1, 2006
387
12
Stuttgart
Home Country
Germany Germany

Users who are viewing this thread

Top Bottom