home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Development
General Development (no feature request here!)
Recorded shows dialog, help needed :)
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="pilehave" data-source="post: 401648" data-attributes="member: 71550"><p>Hi there</p><p></p><p>I'm doing a plugin to show the recorded TV-shows in a popup to allow a fast way of playing back all your recorded TV. Now, the code below should in theory work (as far as I can tell), but the array containing recorded tv doesn't have any elements in it, despite the fact that I have recorded several shows, and these come up by navigating the old fahion way.</p><p>[CODE]</p><p> // Shows recorded TV in a dialog</p><p> private void oneClickPlayRecordings()</p><p> {</p><p> List<TVRecorded> recordings = new List<TVRecorded>();</p><p> TVDatabase.GetRecordedTV(ref recordings);</p><p> List<GUIListItem> itemlist = new List<GUIListItem>();</p><p></p><p> int GetID = (int)GUIWindow.Window.WINDOW_TVFULLSCREEN;</p><p> GUIDialogMenu dlg = (GUIDialogMenu)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_MENU);</p><p> if (dlg == null)</p><p> {</p><p> return;</p><p> }</p><p> dlg.Reset();</p><p> dlg.SetHeading("PowerPlay :)");</p><p></p><p> dlg.Add(recordings.Count.ToString());</p><p></p><p> foreach (TVRecorded rec in recordings)</p><p> {</p><p> GUIListItem item = new GUIListItem();</p><p> item.Label = rec.Title;</p><p> item.TVTag = rec;</p><p> itemlist.Add(item);</p><p> dlg.Add(item);</p><p> dlg.AddLocalizedString(655);</p><p> }</p><p> dlg.DoModal(GetID);</p><p> if (dlg.SelectedLabel == -1)</p><p> {</p><p> return;</p><p> }</p><p></p><p> }[/CODE]</p><p></p><p>The plugin compiles and I can pop the dialog, but there's nothing in the array, when calling <strong>TVDatabase.GetRecordedTV(ref recordings);</strong>, hence it is returning 0 (when I count the array).</p><p></p><p>This code is used in a couple of other places in MediaPortal, and I have included</p><p></p><p>[CODE]</p><p>using MediaPortal.TV.Database;</p><p>using MediaPortal.TV.Recording;[/CODE]</p><p></p><p>Help appreciated <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p></blockquote><p></p>
[QUOTE="pilehave, post: 401648, member: 71550"] Hi there I'm doing a plugin to show the recorded TV-shows in a popup to allow a fast way of playing back all your recorded TV. Now, the code below should in theory work (as far as I can tell), but the array containing recorded tv doesn't have any elements in it, despite the fact that I have recorded several shows, and these come up by navigating the old fahion way. [CODE] // Shows recorded TV in a dialog private void oneClickPlayRecordings() { List<TVRecorded> recordings = new List<TVRecorded>(); TVDatabase.GetRecordedTV(ref recordings); List<GUIListItem> itemlist = new List<GUIListItem>(); int GetID = (int)GUIWindow.Window.WINDOW_TVFULLSCREEN; GUIDialogMenu dlg = (GUIDialogMenu)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_MENU); if (dlg == null) { return; } dlg.Reset(); dlg.SetHeading("PowerPlay :)"); dlg.Add(recordings.Count.ToString()); foreach (TVRecorded rec in recordings) { GUIListItem item = new GUIListItem(); item.Label = rec.Title; item.TVTag = rec; itemlist.Add(item); dlg.Add(item); dlg.AddLocalizedString(655); } dlg.DoModal(GetID); if (dlg.SelectedLabel == -1) { return; } }[/CODE] The plugin compiles and I can pop the dialog, but there's nothing in the array, when calling [B]TVDatabase.GetRecordedTV(ref recordings);[/B], hence it is returning 0 (when I count the array). This code is used in a couple of other places in MediaPortal, and I have included [CODE] using MediaPortal.TV.Database; using MediaPortal.TV.Recording;[/CODE] Help appreciated :) [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
Recorded shows dialog, help needed :)
Contact us
RSS
Top
Bottom