是否有用于查询 Windows 7 Media Center 节目指南的 .Net API?
我想从 C# 应用程序查询 Windows 7 Media Center 节目指南。例如,回答诸如“第四频道The In Betweeners下一次播出是什么时间?”之类的问题。
我已经查看了 Media Center SDK(v6 和 v5),但这表明只能使用 Microsoft.MediaCenter.TV.Scheduling 类来请求录制(“点击录制”)。我无法找到一种方法来查询并返回放映时间列表而不要求媒体中心记录某些内容。
一些网络搜索表明我可以打开 Media Center 在幕后使用的 SQLite 数据库 (ProgramData\Microsoft\eHome\EPG\epg.sdf) 并进行查询。我可以做到这一点,但直接访问媒体中心的数据感觉有点不稳定。
那么,我是否遗漏了 .Net API 中的某些内容?有没有一种方法可以在不背着媒体中心查询日程的情况下?
I'd like to query the Windows 7 Media Center Program Guide from a C# app. e.g. to answer questions like "What time is The Inbetweeners next showing on Channel 4?".
I've looked through the Media Center SDK (v6 and v5) but this suggests it is only possible to use the Microsoft.MediaCenter.TV.Scheduling classes to request recordings ("Click-to-record"). I can't find a way to just query and get back a list of show times without asking Media Center to record something.
A bit of web searching suggests I could open the SQLite db that Media Center uses behind the scenes (ProgramData\Microsoft\eHome\EPG\epg.sdf) and query that. I could do this, but it feels a bit flakey to access Media Center's data directly.
So, am I missing something in the .Net API? Is there a way to query the schedule without going behind Media Center's back?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
TVSchedule 类 似乎是最接近的记录方式(尽管已弃用)来做到这一点。 Lineup 类 仅用于查找频道。
我还看到了您提到的有关使用 SqlLite 数据库的线程(位于 http://discuss. mediacentersandbox.com/forums/thread/559.aspx),但如果您选择使用已弃用的 API 并访问未记录的数据库,我建议使用前者。 ;-) 特别是因为我怀疑数据库格式已经更改(或将在 Win 8 中更改)。
另外,请查看 http://mobilewares.spaces.live.com/ blog/cns!78533A1A2E078194!4535.entry 这是 Niall Gainsbourg 的帖子,抱怨最新的 SDK 没有任何 EPG 支持。所以你不是唯一一个在寻找这个的人。
您可能想尝试直接遏制 Niall,也许他愿意在这里发布他所知道的有关访问 EPG 的信息……考虑到他有 EPG 相关产品出售,我想他会知道自己在说什么。 :-)
The TVSchedule class seems to be the closest documented (albeit deprecated) way to do this. The Lineup class only works to look up channels.
I also saw the thread you mentioned about using the SqlLite database (at http://discuss.mediacentersandbox.com/forums/thread/559.aspx) but if your choice is using a deprecated API and accessing an undocumented database, I'd suggest the former. ;-) Especially since I suspect the database format has already changed (or will be changing in Win 8).
Also, check out http://mobilewares.spaces.live.com/blog/cns!78533A1A2E078194!4535.entry which is Niall Gainsbourg's post complaining about the latest SDK not having any EPG support. So you're not the only one looking for this.
You might want to try containing Niall directly, perhaps he'd be willing to post what he knows about accessing the EPG here... considering he has an EPG-related product for sale, I imagine he'd know what he's talking about. :-)