NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Kodi / XBMC v
« Previous 1 … 39 40 41 42 43
Upcoming Recordings Showing In Recordings List

 
  • 0 Vote(s) - 0 Average
Upcoming Recordings Showing In Recordings List
wileecoyote
Offline

Member

Posts: 121
Threads: 9
Joined: Sep 2012
#1
2012-09-25, 06:25 PM (This post was last modified: 2012-09-25, 06:38 PM by wileecoyote.)
The recordings list shows all recordings, past, present and future. I was playing around with the addon and added this code to only show recordings that are completed.

This code is in the GetRecordings(ADDON_HANDLE handle) method. Code modifed is in bold

// include already-completed recordings
CStdString response;
CStdString status;
CStdString title;

if (DoRequest("/service?method=recording.list&filter=ready", response) == HTTP_OK)
{
TiXmlDocument doc;
if (doc.Parse(response) != NULL)
{
PVR_RECORDING tag;

TiXmlElement* recordingsNode = doc.RootElement()->FirstChildElement("recordings");
TiXmlElement* pRecordingNode = recordingsNode->FirstChildElement("recording");
for( pRecordingNode; pRecordingNode; pRecordingNode=pRecordingNode->NextSiblingElement())
{
[COLOR="#FF0000"] status = pRecordingNode->FirstChildElement("status")->FirstChild()->Value();
if(status == "Ready")
{[/COLOR]

memset(&tag, 0, sizeof(PVR_RECORDING));

PVR_STRCPY(tag.strRecordingId, pRecordingNode->FirstChildElement("id")->FirstChild()->Value());
//PVR_STRCPY(tag.strTitle, pRecordingNode->FirstChildElement("title")->FirstChild()->Value());
PVR_STRCPY(tag.strDirectory, pRecordingNode->FirstChildElement("name")->FirstChild()->Value());

title = pRecordingNode->FirstChildElement("name")->FirstChild()->Value();

if (pRecordingNode->FirstChildElement("desc") != NULL && pRecordingNode->FirstChildElement("desc")->FirstChild() != NULL)
{
PVR_STRCPY(tag.strPlot, pRecordingNode->FirstChildElement("desc")->FirstChild()->Value());
[COLOR="#FF0000"] title += " - ";
title += pRecordingNode->FirstChildElement("desc")->FirstChild()->Value();[/COLOR]

}

PVR_STRCPY(tag.strTitle, title);

tag.recordingTime = atoi(pRecordingNode->FirstChildElement("start_time_ticks")->FirstChild()->Value());
tag.iDuration = atoi(pRecordingNode->FirstChildElement("duration_seconds")->FirstChild()->Value());

CStdString strStream;
strStream.Format("http://%s:%d/live?recording=%s", g_szHostname, g_iPort, tag.strRecordingId);
strncpy(tag.strStreamURL, strStream.c_str(), sizeof(tag.strStreamURL));


PVR->TransferRecordingEntry(handle, &tag);

}
}
}
}
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#2
2012-09-25, 06:35 PM
That "&filter=ready" part of the request was supposed to be telling it to only return the ready recordings. I'll check it.
wileecoyote
Offline

Member

Posts: 121
Threads: 9
Joined: Sep 2012
#3
2012-09-25, 06:37 PM
Ah... Gotcha.

Speaking of the filter, could you also return the Sub-title in the return xml? That way it can be displayed along with the title (notice above I was adding the description to the title so I could tell which episode it was.)
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Import recordings from Humax FVP-5000T ceejayemm 2 896 2024-05-12, 07:44 AM
Last Post: ceejayemm
  Recordings Disappear and Reappear boukmandutty 8 1,190 2024-04-22, 01:38 PM
Last Post: boukmandutty
  Kodi Omega NextPVR Recordings short press context menu (More... item) mmortal03 5 1,241 2024-04-18, 11:19 PM
Last Post: mmortal03
  Manual insert to EPG_EVENT not showing in Kodi bzellinger 3 1,635 2023-10-25, 09:48 AM
Last Post: George2
Question Kodi 19.4 not seeing NextPVR v4 Recordings Aussie 3 1,391 2022-07-28, 02:37 PM
Last Post: mvallevand
  Kodi not playing older recordings bobster151 10 2,542 2022-06-28, 10:18 PM
Last Post: mvallevand
  When running Kodi, new recordings not showing up jorrenb 53 12,567 2022-05-18, 12:52 AM
Last Post: mvallevand
  NextPVR v5. Analog FM Channels not showing in Kodi RazorRust 1 1,107 2022-04-06, 02:33 AM
Last Post: mvallevand
  Recordings with Schedules Direct data don't show title? Caesium 4 1,706 2022-02-20, 09:48 PM
Last Post: mvallevand
  "Include filesize with recordings" Creates Delays PRBUK 15 3,727 2021-09-02, 09:54 AM
Last Post: PRBUK

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode