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
#161
2013-12-20, 04:16 AM
lukemb3 Wrote:I don't really pay attention to .net flavors of Rest. To be honest I really have no idea what that means. I know that a major principle is that each interesting resource is available using a unique identifier, which in an http-based api means the Uri. Whether that's /Movies/Unwatched, or /Movies?IsWatched=false is largely a matter of taste. Either way you're pulling down a resource which is unwatched movies.

In any event, it's fine, I can work around it. But my own advice is that it sounds like you're exposing your domain implementation beyond your interface (the api). At least I get that impression based on you're saying that you built it so that clients construct the same objects as you do in your own domain. It just means you're going to feel some pain if you ever have to change anything.

Not talking a .Net flavor.... just discussions on this topic with .Net developers.... REST is not .Net specific and does not have specific requirements.... but there are best practices that are recommended for using a REST architecture.....that is what I was referencing. The REST architecture supports Posting including posting of JSON objects so the practice is not a nitch practice within .Net or and is valid within any system that implements the usage of that ability.

That is why I supply methods to get a default object..... having that ability....the client should be able to check their local object to see if there are differences (i.e. on initial startup, once a day, week etc.) or instantiate their local object on startup by pulling the default object.

With a querystring.... if the host adds add a required parameter that the client isn't aware of you are in the same boat.... the client would have an issue.... correct? I am not sure how the client becomes aware of a required parameter when only available via querystring.

To me... a querystring argument is merely a property from an object..... only not contained within an object.... so even when only using querystrings you are extending the server (interface API) to clients... just in an unstructured manner.

That said.... I can probably extend the objects to be provided via querystring. I'll keep you posted.

Even with that you will only know what you submitted..... not what was all involved in the processing of the action within the host since you are only providing certain properties of the object that is used within server processing.

To manage this issue I created a method tonight which I will implement on the posts that will write the value of submitted object to the web.log on the server when debug level logging is set. Below is an example:

Code:
2013-12-19 22:40:08.391    [INFO][18]    Search Object Properties received:
2013-12-19 22:40:08.392    [INFO][18]    
searchVersion: 4.1
searchName: Testing
autoShowSearch: False
autoRecordSearch: False
searchTitle: True
searchSubTitle: False
searchDescription: False
matchTitle: False
matchSubTitle: False
matchDescription: False
startTitle: False
startSubTitle: False
startDescription: False
searchTreeviewSortOrder:
searchLengthMin: -2147483648
searchLengthMax: 2147483647
searchGenres:
searchPhrase: Letterman
searchCaseSensitive: False
searchChannels:
2
502
searchStartDate:
searchStartTime:
searchEndDate:
searchEndTime:
searchDays:
True
True
True
True
True
True
True
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
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,110
Threads: 957
Joined: May 2006
#162
2013-12-20, 04:39 AM
To avoid logs I just cheat and update NEWA with JSON.net and monitor it with the Windows debugger when I'm walking through it.

Code:
[HttpPost]
        public HttpResponseMessage GetSortedFilteredList(recordingsSortFilter sortFilter)
        {

            System.Diagnostics.Debug.Write(JsonConvert.SerializeObject(sortFilter, Formatting.Indented));

Code:
[936] {
[936]   "resultLimit": -1,
[936]   "datetimeSortSeq": 0,
[936]   "channelSortSeq": 0,
[936]   "titleSortSeq": 0,
[936]   "statusSortSeq": 0,
[936]   "datetimeDecending": false,
[936]   "channelDecending": false,
[936]   "titleDecending": false,
[936]   "statusDecending": false,
[936]   "All": false,
[936]   "None": false,
[936]   "Pending": false,
[936]   "InProgress": false,
[936]   "Completed": true,
[936]   "Failed": false,
[936]   "Conflict": false,
[936]   "Recurring": false,
[936]   "Deleted": false,
[936]   "FilterByName": false,
[936]   "NameFilter": null,
[936]   "NameFilterCaseSensative": false
[936] }

Martin
UncleJohnsBand
Offline

Posting Freak

U.S.A.
Posts: 5,643
Threads: 258
Joined: Feb 2005
#163
2013-12-20, 04:53 AM
mvallevand Wrote:To avoid logs I just cheat and update NEWA with JSON.net and monitor it with the Windows debugger when I'm walking through it.

Code:
[HttpPost]
        public HttpResponseMessage GetSortedFilteredList(recordingsSortFilter sortFilter)
        {

            System.Diagnostics.Debug.Write(JsonConvert.SerializeObject(sortFilter, Formatting.Indented));

Code:
[936] {
[936]   "resultLimit": -1,
[936]   "datetimeSortSeq": 0,
[936]   "channelSortSeq": 0,
[936]   "titleSortSeq": 0,
[936]   "statusSortSeq": 0,
[936]   "datetimeDecending": false,
[936]   "channelDecending": false,
[936]   "titleDecending": false,
[936]   "statusDecending": false,
[936]   "All": false,
[936]   "None": false,
[936]   "Pending": false,
[936]   "InProgress": false,
[936]   "Completed": true,
[936]   "Failed": false,
[936]   "Conflict": false,
[936]   "Recurring": false,
[936]   "Deleted": false,
[936]   "FilterByName": false,
[936]   "NameFilter": null,
[936]   "NameFilterCaseSensative": false
[936] }

Martin

Cool....
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
#164
2013-12-20, 04:57 AM
20131219-1 on server now dumps the posted object contents to the web.log when debug level logging is turned on.
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
#165
2013-12-20, 05:25 PM
I know that Rest isn't .net specific. That's what I was hinting at by not knowing what that means. I also know that what you are doing with requiring post bodies for actions to retrieve data does happen so it's not uncommon. I just don't think it's very developer friendly. And I understand that I can get the default object first. It just creates a lot of ceremony compared to a friendlier api such as /Recordings/Recurring. And these factors become points of consideration for developers when they're evaluating one service vs another. You might consider something like three-state filters. A nullable bool for instance. For example, IsRecurring. If omitted, no filter is applied. If supplied, Recordings are filtered based on the value. That type of pattern allows you to add new filters with little impact.

Anyhow, back to regularly scheduled programming - is there anyway to determine if an epg event is sports, a tv series, kids show, or a movie? I've added these to our api because the other back-ends we're building support it. For next pvr it looks like the best we can do is attempt to infer it based on genres, which is a bit of a hack and won't work if the genres are ever localized.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,110
Threads: 957
Joined: May 2006
#166
2013-12-20, 06:37 PM
lukemb3 Wrote:Anyhow, back to regularly scheduled programming - is there anyway to determine if an epg event is sports, a tv series, kids show, or a movie? I've added these to our api because the other back-ends we're building support it. For next pvr it looks like the best we can do is attempt to infer it based
on genres, which is a bit of a hack and won't work if the genres are ever localized.

In North America most user use Schedules Direct or mc2xml which are both based on the the zap2it data http://tvlistings.zap2it.com/tvlistings/...aid=zap2it. NextPVR populates the UNIQUE_ID with the zap2it identifier which will start with two letters EP episodic MV - movies SP - sports and SH - shows. SP and SH aren't used often though, it's pretty much only MV and everything else. You can get a 5 day trial to SD to see or just hover your mouse overs the shows in the web listing to see the ID.

Martin
Svekke
Offline

Member

Posts: 121
Threads: 7
Joined: Oct 2012
#167
2013-12-20, 08:05 PM
Unclejohnsband i can't access the ftp server...
The first days it worked, but now i get Always the same error

This page can’t be displayed
• Make sure that the web address "the url you provided to luke" is correct.
• Look for the page with your search engine.
• Refresh the page in a few minutes.
lukemb3
Offline

Member

Posts: 109
Threads: 1
Joined: Jul 2013
#168
2013-12-21, 05:53 AM
One more question - for channels, recordings and epg events, can a property of some kind be added to indicate if it has an image or not? Or perhaps don't fill in the url's if there isn't an image?
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,110
Threads: 957
Joined: May 2006
#169
2013-12-21, 06:05 PM
lukemb3 Wrote:One more question - for channels, recordings and epg events, can a property of some kind be added to indicate if it has an image or not? Or perhaps don't fill in the url's if there isn't an image?

I like the earlier request for channel icons but for recordings and epg_events that might slow things too much. JSON is already slower than XML because of the extra fields NEWA adds and especially if this requires a disk lookup this is a lot of overhead. For me 3 hours of EPG is 600+ shows thats a lot of calls. On top of that the cover could be in several folders. On the various details calls it would make sense though since you are calling be oid.

Martin
lukemb3
Offline

Member

Posts: 109
Threads: 1
Joined: Jul 2013
#170
2013-12-21, 07:58 PM
Are you not able to store that information in a database so that it doesn't have to be determined on the fly each time? This is just my own feedback, hopefully constructive, but it sounds like you're making your public facing api a bit more difficult to deal with on account of what appears to be an internal engineering issue. Every other information provider such as tvdb, tmdb, etc embeds image url's into their metadata, but only when those images actually exist. Sure, I can account for it, but that means I have to put next-pvr specific hacks into our core tv services which don't need to know anything about the various back-ends that we're supporting. Or I can not account for it and just allow the calls to fail, but then I'll have to explain to our next pvr users why there are so many download failures in our server log.
« Next Oldest | Next Newest »

Users browsing this thread: 2 Guest(s)

Pages (56): « Previous 1 … 15 16 17 18 19 … 56 Next »
Jump to page 


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