Anyway to get the current playing channel?

Dec 6, 2009 at 1:02 AM

Anyway to get the current playing channel on media center?

Developer
Dec 7, 2009 at 6:32 AM

need to take look at that. but as i wrote in another post, all the tv functionality isn't available in Win 7 build at the moment. as soon i have my new hardware i will try to get the tv stuff up and running.

Jan 19, 2010 at 10:28 AM

I think it would be a great feature to be able to send the existing command 'mediametadata' and it would return metadata on what is currently playing.  Regardless if it is live tv, recorded tv, dvd, music, etc.  Instread of the current functionallity of only returning metadata of music. (Althought this is still great)

Coordinator
Jan 19, 2010 at 5:02 PM
Edited Jan 19, 2010 at 5:05 PM

The Mediametadata command is just a wrapper that dumps the MediaMetadata class (a dictionary structure). It would be awkward to extend it beyond that functionality. Having said that I believe it should show recorded tv status (and for the life of me, I cannot figure out why they chose to not list live tv...)

Anyway for fun, here is all the context / data that should be returned:

 

Context Property Description
album AlbumArtist Name of the album artist
  AlbumTitle Name of the album
  Genre Name of the musical genre
  Label Name of the recording label
  ReleaseDate Release date of the album
artist AlbumArtist Name of the recording artist
genre Genre Name of the musical genre
playlist Name Name of the playlist
  URL Name of the playlist file
song AlbumArtist Name of the album recording artist
  AlbumTitle Title of the album
  Genre Genre of the music
  Label Name of the recording label
  ProductionCompany Name of the music production company
  ReleaseDate Date when the album was released
  TrackArtist Name of the artist who recorded the currently playing track
  TrackComposer Name of the composer of the currently playing track
  TrackDuration Total length, in seconds, of the currently playing track
  TrackNumber Number of the currently playing track
  TrackTitle Title of the currently playing track
  Uri URI of the audio file
DVD Name Name of the DVD
  ChapterTitle Title of the currently playing chapter
  Duration Total length, in seconds, of the video
  Uri URI of the DVD media or files
  MPAARating Parental advisory rating of the video
video Name Name of the video
  Title Title of the video
  Duration Total length, in seconds, of the video
  MPAARating Parental advisory rating of the video
  Title Title of the video
  Uri Uri of the video file
picture Name The path and filename of the image
DVR Name Name of the video
  Title Title of the video
  Duration Total length, in seconds, of the video
  Uri URI of the video file

 

Context Property Description album AlbumArtist Name of the album artist
AlbumTitle Name of the album
Genre Name of the musical genre
Label Name of the recording label   ReleaseDate Release date of the album artist AlbumArtist Name of the recording artist genre Genre Name of the musical genre playlist Name Name of the playlist   URL Name of the playlist file song AlbumArtist Name of the album recording artist
AlbumTitle Title of the album
Genre Genre of the music
Label Name of the recording label
ProductionCompany Name of the music production company
ReleaseDate Date when the album was released
TrackArtist Name of the artist who recorded the currently playing track
TrackComposer Name of the composer of the currently playing track
TrackDuration Total length, in seconds, of the currently playing track
TrackNumber Number of the currently playing track
TrackTitle Title of the currently playing track
Uri URI of the audio file DVD Name Name of the DVD
ChapterTitle Title of the currently playing chapter
Duration Total length, in seconds, of the video
Uri URI of the DVD media or files
MPAARating Parental advisory rating of the video video Name Name of the video
Title Title of the video
Duration Total length, in seconds, of the video
MPAARating Parental advisory rating of the video
Title Title of the video
Uri Uri of the video file picture Name The path and filename of the image DVR Name Name of the video
Title Title of the video
Duration Total length, in seconds, of the video
Uri URI of the video file

 

 

Coordinator
Jan 19, 2010 at 5:08 PM

I'm not in the MediaCenter code right now, but looking at the documentation it seems like it would be pretty easy to add a new command (something like "broadcastserviceid") that returned the value of BroadcastService.ServiceID which msdn says is a string of "The service ID."

I'm guessing that's the currently playing channel...

Jan 20, 2010 at 9:07 AM

Hi Onhiatus,

Thanks for your quick and detailed reply.

I can only seem to return the metatdata when music is playing.  When I play recorded tv it still returns the music metadata.  Running on Windows 7 64bit.  I'll take another look at my simple c# tcp client i'm trying to put together when i get home tonight.

Coordinator
Jan 20, 2010 at 5:16 PM

Hmm, I'm not sure. I use the metadata for music and dvds - and it works as expected for both. I don't have a tuner though so I do not use it with tv or recorded tv. I'm also running 32bit Vista - so it's entirely possible that things have changed in Win7.

Let us know what you find out, Tony (onhiatus)

Jan 20, 2010 at 7:48 PM

Ok I have had another look, and realised that metadata is returned for recorded tv, just not the live tv, as mentioned above.  My mistake, sorry for the confusion.

It would be great if it could return some kind of data when live tv is active, like the service id mentioned above.  Also the name of the tv program that is on would be fantastic. (is that even possible?)

This is a great piece of software.  I'm currently working on a plugin for HouseBot home automation software.  The plan is to allow it to work a bit like a jukebox with mediacenter.