The Media Center Sandbox

Resources and discussion for developing experiences in the Windows Media Center platform.
Welcome to The Media Center Sandbox Sign in | Join | Help
in Search

Getting Guide Data

Last post 09-06-2007, 4:46 PM by kcchesnut. 11 replies.
Sort Posts: Previous Next
  •  02-15-2007, 4:54 AM 1794

    Getting Guide Data

    I have a external application which gets channel changes, program title, program time etc. I want to also be able to pull back the info for the tv show being watched.

    Any ideas how to do this? By the way I am writing in VB.Net.

     

    Thanks.

  •  02-15-2007, 1:45 PM 1797 in reply to 1794

    Re: Getting Guide Data

    Because Australia has no guide data, there has been a lot of work done on www.xpmediacenter.com.au about this topic. You may want to check there for more information, and check out the programs already available to do this kind of work. Bladerunner, EPGStream and it's friends are all interesting packages that add guide data.
    100 downloads a day for Yougle Vista - goin' allright!

    Check out http://www.thedigitallifestyle.com/cs/Blogs/developer/default.aspx and http://www.push-a-button.com.au/products/mce
  •  03-09-2007, 5:27 AM 1946 in reply to 1794

    Re: Getting Guide Data

    Hey guys

    I'm a newbie here so this might be a silly question. How does Media Center retrieve the EPG data? I know that the data suplier is BDS in the UK but is it possible to override this data from a different source?  What are the mechanisms that can be used to do this.

    J
  •  03-09-2007, 10:18 AM 1950 in reply to 1946

    Re: Getting Guide Data

    There are entries in the registry that define where the data is downloaded from - you could try modifying that and guessing what you need to do by the requests/responses your web app is getting from the EPG download process, but it's going to be tough.  Also I'd imagine that a secure connection is made, and the key used may be hardcoded in to Media Center for this.

    Have a look under HKLM\SOFTWARE\Microsoft\Windows\Current Version\Media Center for the Media Center specific keys.

    Cheers,
    Andrew

  •  03-11-2007, 12:57 AM 1966 in reply to 1946

    Re: Getting Guide Data

    The Media Center uses a file-based SQLLite Database which is some kind of a feature limited version of SQL Server Mobile. You can connect to the SQLLite database and update the records with your own guide data.

    Take a look at the assembly named "ehepg.dll" in %WINDIR%\ehome. Since MCE 2005 RU2 MSFT changed the access modifier of a few classes and specific members to private / internal. One of those members were a method which gave you the filename of the current SQL Lite file. I have created a little helper which does the same:

    [CODE]
    public static String GetCurrentEpgFile()
    {
          String strEpgFolder = Environment.GetEnvironmentVariable("PROGRAMDATA") + "\\Microsoft\\eHome\\EPG";
          String[] strFiles = Directory.GetFiles(strEpgFolder, "*.sdf");
          String strFile = (strFiles.Length > 0 ? strFiles[0] : String.Empty);

          foreach(String s in strFiles)
          {
             if (File.GetCreationTime(s) > File.GetCreationTime(strFile))
                strFile = s;
          }
          return strFile;
    }
    [/CODE]

    You can also get the value from the registry, like Andy mentioned already :)

  •  03-21-2007, 7:37 AM 2040 in reply to 1966

    Re: Getting Guide Data

    Thanks Olcay

    Just to clarify I'm using VISTA MCE

    Is the "ehepg.dll" assembly the only way to access the SQlite file?. I've taken a look at the existing MCE EPG query tool but that doesnt work with Vista.

    Cheers

    J


  •  03-21-2007, 9:59 AM 2043 in reply to 2040

    Re: Getting Guide Data

    I have a Vista compatible version - I will release it this week.
  •  03-28-2007, 6:39 AM 2141 in reply to 2043

    Re: Getting Guide Data

    Any joy with that Vista version?, checked MCEDev but nothing there.
  •  04-05-2007, 7:32 AM 2252 in reply to 2141

    Re: Getting Guide Data

    Sorry I was a little bit busy. I will release it in a few hours.

    Thanks,
    Olcay

  •  04-05-2007, 11:26 PM 2305 in reply to 2141

    Re: Getting Guide Data

    It's online since last night.

    Link: http://mcedev.com/News.aspx?nwid=5c978378-8672-46c3-8918-1d8e59028ec9

    Have fun :)

  •  04-14-2007, 9:03 AM 2643 in reply to 2305

    Re: Getting Guide Data

    This is great, thanks.


    Gordon: Has reached the end!
  •  09-06-2007, 4:46 PM 4666 in reply to 2643

    Re: Getting Guide Data

    started with this post and ended up making a simple sample app to show how to get the guide data. it uses a typed DataSet with the relationships set to make it easy to move around the data. the only oddity is that the data loads much faster when running within an MCE background add-in.

    the source can be found at the bottom of the article here :

    http://www.brains-N-brawn.com/umpcFrame/

    Cheers, casey

View as RSS news feed in XML
Powered by Community Server, by Telligent Systems