Recordings improvement (1 Viewer)

Swede

Portal Pro
September 6, 2006
490
47
West Coast Archipelago
Home Country
Sweden Sweden
Sorry, this should be here instead: Recordings improvement

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.

How about implementing this?


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
+
         }
       }
     }
 

Attachments

  • TvRecorded.patch
    30.6 KB

Users who are viewing this thread

Top Bottom