NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 19 20 21 22 23 … 93 Next »
DVD info lookup via WMP?

 
  • 0 Vote(s) - 0 Average
DVD info lookup via WMP?
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#11
2009-12-29, 06:53 AM
I'll be uploading this to the GBPVRLibrary project but here is a quick build of just the MediaCenter metadata part. I'll be removing this download once I commit it to the library.

http://www.oshinetworks.com/DirectShow/G...Center.zip

I included a copy of DirectShowLib-2005.dll (needed for reading the DiscID) if you don't already have it. Just place the contents of the zip file in the Plugins\common folder and add it as a reference to your project.

Some quick usage examples:

Reading a DVD ID and checking for online metadata (first checks the MS datasource and then e-home.no if the MS call fails):
Code:
long dvdid= GBPVRLibrary.UtilityLibrary.DvdId.GetAsLong("D:\\"); // Reads a disc to get the dvdid.
GBPVRLibrary.MetadataLibrary.MediaCenter.DVD.Metadata metadata = GBPVRLibrary.MetadataLibrary.MediaCenter.DVD.Metadata.GetDvdInfo(dvdid); // This call can accept a string if you want to read the dvdid from a dvdxml file instead.
bool b = metadata.Save(@"c:\dvdtest.xml"); //Save the metadata to a file. Returns false if the save fails.

GBPVRLibrary.UtilityLibrary.DvdId also contains two static methods for converting between long and string dvdids without needing to re-read the disc.

You can get more info using SOAP calls instead. You can get the cast list and characters they played, similar movies, etc. The downside is that you need to make multiple calls for the info you want and then convert the data to the DvdInfo. I recommend trying to get the DVDInfo first and then updating it with the extra data. To get the basic DVD data:
Code:
GBPVRLibrary.MetadataLibrary.MediaCenter.Video.DvdRequest dr = new GBPVRLibrary.MetadataLibrary.MediaCenter.Video.DvdRequest();
dr.Crc64 = (ulong)GBPVRLibrary.UtilityLibrary.DvdId.GetAsLong("D:\\"); // You must cast to ulong to set the DvdRequest.Crc64 or the SOAP calls will fail..
GBPVRLibrary.MetadataLibrary.MediaCenter.Video.WMMovieMetadataProvider md = new GBPVRLibrary.MetadataLibrary.MediaCenter.Video.WMMovieMetadataProvider();
GBPVRLibrary.MetadataLibrary.MediaCenter.Video.DvdMatch[] matches = md.GetDvdCandidates(dr);

You can also use GetMovieCandidates() to search by movie title and release year/date. GetMovies() will search by the wmContentID (a Guid value).

I've currently hardcoded the locale as "us-en" (id: 409). I will make this changeable before I commit it to the library.

Now I just have to figure out how MediaCenter is getting the DiscID for Blu-rays.
McBainUK
Offline

Posting Freak

Posts: 4,711
Threads: 429
Joined: Sep 2005
#12
2010-02-01, 10:20 AM
whurlston, is this MediaCentre metadata lookup no part of the GBPVRLibrary? I couldn't see it even after an SVN update.
Wiki profile
My Projects
Programs Plugin [SIZE=2](retired)
| Volume OSD Plugin (retired) | Documentation Wiki (retired)
[/SIZE]
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#13
2010-02-01, 10:20 PM
I was waiting to hear back from reven on this question and I eventually forgot about it:

whurlston Wrote:I have some code to commit to the SVN but I want to check something before I do. I had to update the solution/projects to target "x86" instead of "Any CPU" since I'm developing on x64. If I commit that change will it mess things up for people developing on x86?

I'll dig out the code and get it to you. (Having to rebuild my dev machine after a driver update screwed it beyond repair).I'll have it to you tonight (my time).
McBainUK
Offline

Posting Freak

Posts: 4,711
Threads: 429
Joined: Sep 2005
#14
2010-02-02, 08:58 AM
whurlston Wrote:I'll dig out the code and get it to you.
That would be great. Thanks.
Wiki profile
My Projects
Programs Plugin [SIZE=2](retired)
| Volume OSD Plugin (retired) | Documentation Wiki (retired)
[/SIZE]
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#15
2010-02-02, 07:45 PM (This post was last modified: 2010-02-02, 07:50 PM by whurlston.)
Unzip and place this in the GBPVRMetadataLibrary folder of the project. You'll then have to include the files in your project. This way I don't modify the svn project files and mess them up for anyone.

Sorry I didn't get it to you last night as promised.
McBainUK
Offline

Posting Freak

Posts: 4,711
Threads: 429
Joined: Sep 2005
#16
2010-02-04, 09:50 PM
I've added it to my project and it's looking good so far. How do you get the DVD cover images?

Currently using "MDRDVD.CoverArtBaseUrl + metadata.MrDvdLargeCoverURL" which gives "http://services.windowsmedia.com/cov150/drt000/t036/t03668othkp.jpg". This URL doesn't exist.

Any suggestions?
Wiki profile
My Projects
Programs Plugin [SIZE=2](retired)
| Volume OSD Plugin (retired) | Documentation Wiki (retired)
[/SIZE]
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#17
2010-02-05, 12:31 AM
My mistake on that. It should be "http://services.windowsmedia.com/dvdcover/cov150/drt000/t036/t03668othkp.jpg"

Just adjust MdrDvd.cs to:
Code:
public const string CoverArtBaseUrl = "http://services.windowsmedia.com/dvdcover/";
McBainUK
Offline

Posting Freak

Posts: 4,711
Threads: 429
Joined: Sep 2005
#18
2010-03-06, 09:11 PM
Hmm. Recently the hit rate has dropped to near zero. Could MS have changed somthing on the 'API'?
Wiki profile
My Projects
Programs Plugin [SIZE=2](retired)
| Volume OSD Plugin (retired) | Documentation Wiki (retired)
[/SIZE]
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#19
2010-03-07, 05:40 PM
Not sure. I've been preparing for and on vacation so I haven't tested it in a couple of weeks. Is it the title lookup that's failing or the dvdid lookup or both?
McBainUK
Offline

Posting Freak

Posts: 4,711
Threads: 429
Joined: Sep 2005
#20
2010-03-07, 07:35 PM
I've only tried DVDID lookup.
Wiki profile
My Projects
Programs Plugin [SIZE=2](retired)
| Volume OSD Plugin (retired) | Documentation Wiki (retired)
[/SIZE]
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (3): « Previous 1 2 3 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  API (URL Info?) arrmo 14 14,434 2015-08-26, 02:04 PM
Last Post: arrmo
  Timing.Info question mvallevand 2 2,137 2013-04-19, 03:54 AM
Last Post: mvallevand
  NPVR 2.x recordings metadata and timing.info whurlston 4 2,956 2012-08-01, 06:19 PM
Last Post: whurlston
  Getting reoccurring extras info fla 6 2,337 2009-08-28, 06:47 PM
Last Post: fla
  DVB-S tuning info bgowland 11 4,015 2008-12-08, 11:37 PM
Last Post: bgowland
  EXIF info ACTCMS 5 2,336 2008-07-11, 02:27 AM
Last Post: bgowland
  Function to provide more info on playing video? markm 3 2,045 2007-09-16, 02:19 PM
Last Post: ralphy
  Video OSD plugin - Current channel info McBainUK 4 1,982 2006-09-21, 01:34 AM
Last Post: tipstir
  How to get info on a running instance of GBPVR McBainUK 5 2,405 2006-03-23, 11:09 PM
Last Post: McBainUK
  Gmail plugin - How to encrypt saved account info? McBainUK 3 2,126 2006-03-06, 01:25 PM
Last Post: McBainUK

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

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

Linear Mode
Threaded Mode