NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 3 4 5 6 7 … 93 Next »
Media Browser Integration

 
  • 0 Vote(s) - 0 Average
Media Browser Integration
UncleJohnsBand
Offline

Posting Freak

U.S.A.
Posts: 5,643
Threads: 258
Joined: Feb 2005
#121
2013-12-17, 12:29 AM (This post was last modified: 2013-12-17, 12:38 AM by UncleJohnsBand.)
Maybe this helps....

The epgEventJSONObject can contain up to 4 segments.

epgEvent - This is the event itself. It has two boolean attributes HasSchedule an ScheduleIsRecurring that tell you if there is a schd and/or recurring segment. If the HasSchedule element is false there will be no schedule segment present. Likewise if the ScheduleIsRecurring element is false there will be no recur segment.

schd - This contains the info about the how the epgEvent is scheduled and the various attributes about the schedule and the status of that schedule (i.e. pending, in-progress, etc)

recurr - This segment contains the info about the recurring schedule entry that continually generates schedules for a targeted epgEvent

rtn - This segment contains any error info in regards to the epgEvent if the Error element is True.

Code:
"epgEventJSONObject":{
               "epgEvent":{
                  "OID":6532962,
                  "UniqueId":"EP007537960210",
                  "ChannelOid":7166,
                  "StartTime":"2013-12-17T01:00:00Z",
                  "EndTime":"2013-12-17T01:30:00Z",
                  "Title":"How I Met Your Mother",
                  "Subtitle":"Bass Player Wanted",
                  "Desc":"A man at the wedding intentionally stirs up trouble; Marshall finally arrives at the Farhampton Inn.",
                  "Rating":"TV-14",
                  "Quality":"HDTV",
                  "StarRating":"",
                  "Aspect":"",
                  "Audio":"stereo",
                  "OriginalAirdate":"2013-12-16T00:00:00",
                  "FanArt":"public/download.aspx?rid=_wEC9f___w8*&path=_wEFOkQ6XFVzZXJzXFB1YmxpY1xOUFZSXE1lZGlhXFNob3dzXEhvdyBJIE1ldCBZb3VyIE1vdGhlci5qcGc*&mode=1",
                  "Genres":[
                     "Sitcom"
                  ],
                  "FirstRun":true,
                  "HasSchedule":true,
                  "ScheduleIsRecurring":true
               },
               "schd":{
                  "OID":19208,
                  "ChannelOid":7166,
                  "Priority":0,
                  "Name":"How I Met Your Mother",
                  "Quality":"Best",
                  "Type":"Multiple",
                  "Day":"Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday",
                  "StartTime":"2013-12-17T01:00:00Z",
                  "EndTime":"2013-12-17T01:30:00Z",
                  "Status":"Pending",
                  "FailureReason":"",
                  "PrePadding":"0",
                  "PostPadding":"0",
                  "MaxRecordings":"0",
                  "DownloadURL":"",
                  "RecordingFileName":"",
                  "PlaybackPosition":0,
                  "PlaybackDuration":0,
                  "LastWatched":"0001-01-01T00:00:00",
                  "OnlyNew":false,
                  "Blue":false,
                  "Green":false,
                  "Red":false,
                  "Yellow":false,
                  "FanArt":"public/download.aspx?rid=_wEC9f___w8*&path=_wEFOkQ6XFVzZXJzXFB1YmxpY1xOUFZSXE1lZGlhXFNob3dzXEhvdyBJIE1ldCBZb3VyIE1vdGhlci5qcGc*&mode=1"
               },
               "recurr":{
                  "Type":"Recurring",
                  "OID":143,
                  "RecurringName":"How I Met Your Mother",
                  "PeriodDescription":"All New Episodes",
                  "EPGTitle":"How I Met Your Mother",
                  "ChannelOid":7166,
                  "StartTime":"2012-01-10T01:00:00Z",
                  "EndTime":"2012-01-10T01:30:00Z",
                  "RecordingDirectoryID":null,
                  "Priority":0,
                  "Quality":"Best",
                  "PrePadding":"0",
                  "PostPadding":"0",
                  "MaxRecordings":"0",
                  "allChannels":false,
                  "OnlyNew":true,
                  "Day":"Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday",
                  "AdvancedRules":null,
                  "RulesXmlDoc":{
                     "Rules":{
                        "EPGTitle":"How I Met Your Mother",
                        "ChannelOID":"7166",
                        "ChannelName":"72.1624-WHPDT",
                        "StartTime":"2012-01-10T01:00:00.0000000Z",
                        "EndTime":"2012-01-10T01:30:00.0000000Z",
                        "PrePadding":"0",
                        "PostPadding":"0",
                        "Quality":"3",
                        "Keep":"0",
                        "OnlyNewEpisodes":"true"
                     }
                  }
               },
               "rtn":{
                  "Error":false,
                  "Message":""
               }
            }
         },
Intel Core i7 @ 4.00GHz Skylake 14nm
ASUSTeK COMPUTER INC. Z170-DELUXE
Windows 10 Pro x64
PVR Software: NPVR 5.1.1
SiliconDust HDHomeRun HDHR5-4US Connect Quatro 4 Channel Tuner
Roku Ultra
2 PCH A-100's
UncleJohnsBand
Offline

Posting Freak

U.S.A.
Posts: 5,643
Threads: 258
Joined: Feb 2005
#122
2013-12-17, 01:15 AM
lukemb3 Wrote:truthfully, from the client perspective i think that's pretty trivial and doesn't really matter. A lot of our list endpoints return objects that use this:

public class QueryResult<T>
{
/// <summary>
/// Gets or sets the items.
/// </summary>
/// <value>The items.</value>
public T[] Items { get; set; }

/// <summary>
/// The total number of records available
/// </summary>
/// <value>The total record count.</value>
public int TotalRecordCount { get; set; }

/// <summary>
/// Initializes a new instance of the <see cref="ItemsResult" /> class.
/// </summary>
public QueryResult()
{
Items = new T[] { };
}
}

Some services subclass it to add additional info. But whether you call the result set Items, Results, or something particular to the method, i don't think it really matters.

The only thing I would suggest on the topic of return data is to use natural http response codes as much as you possibly can. In other words, remove the error properties and just have the server throw an error. As it is now clients have to both handle errors and check the error property.

Thanks for the feedback. I can look into setting a different response code if an error is found....
Intel Core i7 @ 4.00GHz Skylake 14nm
ASUSTeK COMPUTER INC. Z170-DELUXE
Windows 10 Pro x64
PVR Software: NPVR 5.1.1
SiliconDust HDHomeRun HDHR5-4US Connect Quatro 4 Channel Tuner
Roku Ultra
2 PCH A-100's
lukemb3
Offline

Member

Posts: 109
Threads: 1
Joined: Jul 2013
#123
2013-12-17, 05:04 AM
I just uploaded it as is

https://www.dropbox.com/s/8tehpwjp03vzxal/npvr.db3
lukemb3
Offline

Member

Posts: 109
Threads: 1
Joined: Jul 2013
#124
2013-12-17, 05:07 AM
UncleJohnsBand Wrote:Thanks for the feedback. I can look into setting a different response code if an error is found....

Thanks, yea we use response codes in our api and it's worked out well. the most common ones are 500 for an internal server error, 404 if the client asks for something that doesn't exist, 401/403 for authentication-related issues, and 400 for bad input arguments. service stack actually does it for us, but even before we started using it I knew it was something that i wanted.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,180
Threads: 958
Joined: May 2006
#125
2013-12-17, 12:54 PM
lukemb3 Wrote:I just uploaded it as is

https://www.dropbox.com/s/8tehpwjp03vzxal/npvr.db3

It looks like dummy schd records aren't being created for manual recordings that don't have epg_event xml

Martin
lukemb3
Offline

Member

Posts: 109
Threads: 1
Joined: Jul 2013
#126
2013-12-17, 01:31 PM
mvallevand Wrote:It looks like dummy schd records aren't being created for manual recordings that don't have epg_event xml

Martin

yea i was playing around and setup some manual recordings so that might be those
lukemb3
Offline

Member

Posts: 109
Threads: 1
Joined: Jul 2013
#127
2013-12-17, 03:59 PM
is it possible to add a channel id filter for GuideService/Listing ?
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,180
Threads: 958
Joined: May 2006
#128
2013-12-17, 10:55 PM
lukemb3 Wrote:is it possible to add a channel id filter for GuideService/Listing ?

sub's xml does provide the listing by selected channel. I prefer channel groups for filtering myself.

Martin
UncleJohnsBand
Offline

Posting Freak

U.S.A.
Posts: 5,643
Threads: 258
Joined: Feb 2005
#129
2013-12-17, 11:27 PM
lukemb3 Wrote:Thanks, yea we use response codes in our api and it's worked out well. the most common ones are 500 for an internal server error, 404 if the client asks for something that doesn't exist, 401/403 for authentication-related issues, and 400 for bad input arguments. service stack actually does it for us, but even before we started using it I knew it was something that i wanted.

Thanks.
Intel Core i7 @ 4.00GHz Skylake 14nm
ASUSTeK COMPUTER INC. Z170-DELUXE
Windows 10 Pro x64
PVR Software: NPVR 5.1.1
SiliconDust HDHomeRun HDHR5-4US Connect Quatro 4 Channel Tuner
Roku Ultra
2 PCH A-100's
UncleJohnsBand
Offline

Posting Freak

U.S.A.
Posts: 5,643
Threads: 258
Joined: Feb 2005
#130
2013-12-17, 11:29 PM
lukemb3 Wrote:is it possible to add a channel id filter for GuideService/Listing ?

mvallevand Wrote:sub's xml does provide the listing by selected channel. I prefer channel groups for filtering myself.

Martin

I can add a channel query parameter....
Intel Core i7 @ 4.00GHz Skylake 14nm
ASUSTeK COMPUTER INC. Z170-DELUXE
Windows 10 Pro x64
PVR Software: NPVR 5.1.1
SiliconDust HDHomeRun HDHR5-4US Connect Quatro 4 Channel Tuner
Roku Ultra
2 PCH A-100's
« Next Oldest | Next Newest »

Users browsing this thread: 5 Guest(s)

Pages (56): « Previous 1 … 11 12 13 14 15 … 56 Next »
Jump to page 


Possibly Related Threads…
Thread Author Replies Views Last Post
  Looking for C# UPnP Media Server code bgowland 5 7,768 2016-12-16, 08:25 PM
Last Post: mvallevand
  Media\Show Directory mvallevand 12 6,146 2014-07-02, 10:58 AM
Last Post: sub
  Media\Shows Metadata mvallevand 2 1,948 2013-05-22, 04:09 AM
Last Post: mvallevand
  Streaming media imilne 44 13,232 2012-12-14, 04:05 AM
Last Post: mvallevand
  SkyDrive Eplorer Integration Released.....also available for Mac and iPad UncleJohnsBand 0 1,485 2012-04-24, 01:06 AM
Last Post: UncleJohnsBand
  Building a list of files in media folders (npvr Music and Videos) bgowland 2 1,964 2012-02-05, 10:29 AM
Last Post: bgowland
  Windows Media Connect - Storing stuff on a Home Server psycik 3 2,769 2009-09-29, 03:47 AM
Last Post: mvallevand
  Plugin notification of stopped media mvallevand 7 2,421 2009-08-19, 11:16 PM
Last Post: mvallevand
  GBPVR Media Events KingArgyle 1 1,623 2005-03-27, 07:12 PM
Last Post: sub

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

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

Linear Mode
Threaded Mode