NextPVR Forums
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 2 3 4 5 6 … 93 Next »
API access to artwork and deleting recordings

 
  • 0 Vote(s) - 0 Average
API access to artwork and deleting recordings
cncb
Offline

Senior Member

Posts: 729
Threads: 112
Joined: Aug 2011
#1
2015-10-01, 11:15 PM
For both of these I'm accessing the file system directly but this presents some challenges when operating a plugin from a client. Is there something in the API I should use instead?

Artwork doesn't seem to be "transferred" to the client Media directory until I view a recording in the default recording list. Is there a way to trigger this? Also, I don't seem to get fanart by default. Is ImageGrabLite necessary to retrieve fanart?

ScheduledRecording.Delete() doesn't seem to delete the file from disk so I have to use System.IO.File.Delete() which won't work from a client since the recordings path is local to the server.
My Plugins: PhotoFilter, MusicMonkey, Windows Desktop Gadget
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 45,335
Threads: 868
Joined: May 2006
#2
2015-10-02, 12:20 AM
I use web api's from the client for art but it is probably easier just to map the Media directory as the share.

For deleting are you using ScheduleHelperFactory.GetScheduleHelper().Delete(...);

Martin
cncb
Offline

Senior Member

Posts: 729
Threads: 112
Joined: Aug 2011
#3
2015-12-05, 02:33 PM
significant changes to the metadata works, and new a API that can now be used by NEWA etc for finding artwork (and demand loading etc), caching etc.

Is this the MetadataEntity class? To use it do we just use the constructor on a recording and it takes care of downloading and caching? Thanks.
My Plugins: PhotoFilter, MusicMonkey, Windows Desktop Gadget
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 102,402
Threads: 742
Joined: Nov 2003
#4
2015-12-05, 05:05 PM
To get artwork given a EPGEvent, you can do:

Code:
MetadataEntity entity = MetadataManager.GetInstance().GetMetadataEntity(null, epgEvent);

To get artwork given a ScheduledRecording, you can do:

Code:
MetadataEntity entity = MetadataManager.GetInstance().GetMetadataEntity(scheduledRecording);

Both of those calls will look for new artwork from the internet if it can't find any in the local cache. If you want it to only use the local cache, and not go out to the internet, you can use the "GetCachedMetadataEntity" calls:

Code:
MetadataEntity metaDataEntity = MetadataManager.GetInstance().GetCachedMetadataEntity(scheduledRecording);

To get artword from the web api, you can use:

Code:
/services/service?method=channel.show.artwork&event_id=123
Code:
/services/service?method=recording.artwork&recording_id=123

With these you can optionally add one of:
fanart=true
banner=true
landscape=true
logo=true
thumb=true
poster=true (default)
cncb
Offline

Senior Member

Posts: 729
Threads: 112
Joined: Aug 2011
#5
2015-12-05, 07:12 PM
Thanks. Is there a way to globally tweak the search name for a show? For example, I record "The Goldbergs" but I need to download artwork for The "Goldbergs (2013)".
My Plugins: PhotoFilter, MusicMonkey, Windows Desktop Gadget
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 102,402
Threads: 742
Joined: Nov 2003
#6
2015-12-05, 07:20 PM
You can call:
Code:
MetadataEntity entity = MetadataManager.GetInstance().GetMetadataEntity("The Goldbergs");
Hopefully it'll find it. The searches are more accurate when initiated from an EPGEvent or recording with proper show identifers from Schedules Direct etc.

In future the API will probably be extended to include a search function, which will return you a selection of matches, then your code can allow the user to select from them etc.
cncb
Offline

Senior Member

Posts: 729
Threads: 112
Joined: Aug 2011
#7
2015-12-05, 08:14 PM
I am searching with a "The Goldbergs" recording that was made with Schedules Direct data and unfortunately it is not finding it.
My Plugins: PhotoFilter, MusicMonkey, Windows Desktop Gadget
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 102,402
Threads: 742
Joined: Nov 2003
#8
2015-12-05, 08:29 PM
Are you passing in the ScheduledRecording object, or trying to search by string?
cncb
Offline

Senior Member

Posts: 729
Threads: 112
Joined: Aug 2011
#9
2015-12-05, 08:35 PM
Passing the ScheduledRecording object directly. Unfortunately, I record several new shows that have this problem (match wrong older shows): The Goldbergs, The Flash, Last Man Standing, MasterChef.
My Plugins: PhotoFilter, MusicMonkey, Windows Desktop Gadget
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 102,402
Threads: 742
Joined: Nov 2003
#10
2015-12-05, 08:42 PM
If you can supply me your npvr.db3, I can check for you.

I happen to have a US epg installed at the moment, and I searched for those shows. I'm seeing artwork for them all, but I'm not that familiar with these shows. I think The Goldbergs and Last Man Standing are giving the correct artwork. I'm getting MasterChef UK's artwork. I'm getting artwork for the Flash, but can't tell if this is the current series or an older one.

Can you also zip the artwork you're getting for these in c:\users\public\npvr\media\shows?
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (3): 1 2 3 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  NextPVR 5: When is PIN Required for API Access? pkscout 3 1,874 2020-05-26, 04:45 AM
Last Post: sub
  Another Artwork question scJohn 15 6,289 2019-09-10, 05:33 PM
Last Post: nonob
  Import/export recordings via API? whurlston 4 3,008 2019-02-19, 11:48 AM
Last Post: Graham
  Unexpected result when deleting a pending recording scJohn 5 2,735 2018-05-06, 10:09 PM
Last Post: sub
  Conflict recordings scJohn 1 2,107 2018-03-23, 07:43 PM
Last Post: sub
  API / web call for setting recordings Pbathuk 2 2,642 2018-01-13, 05:17 AM
Last Post: Pbathuk
  Artwork by show name psycik 4 3,778 2017-07-12, 03:47 AM
Last Post: psycik
  How to move recordings without them getting deleted from db drmargarit 4 3,118 2015-09-27, 05:33 PM
Last Post: sub
  Best approach to creating recurring recordings from c# drmargarit 0 2,172 2015-09-27, 01:32 AM
Last Post: drmargarit
  Show artwork method psycik 31 8,399 2015-07-14, 07:06 AM
Last Post: aloxinh

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

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

Linear Mode
Threaded Mode