INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Monitoring 'Track Changed' Across Multiple Zones  (Read 4605 times)

kemeno

  • Member
  • *
  • Posts: 1
Monitoring 'Track Changed' Across Multiple Zones
« on: July 23, 2008, 12:48:38 pm »

Hey guys, I had a (somewhat) quick question about a plugin I'm trying to develop.

Here's the situation: I'm developing a plugin for another piece of software to interface with MC (the software I'm writing the plugin for is called HomeSeer, www.homeseer.com). I need to know when the track changes for each zone so that I can keep the current track information up to date within the software (which it will use to trigger events in HomeSeer, display the current track on a web page, etc.). It doesn't look like the regular event handler will work for me if a user has multiple zones, since it only fires track changed events for the currently active zone.

Right now I'm using a timer and rotating through the different zones every few seconds to determine if a track has changed (by comparing it to the last known track). This solution works fine in the software, but it makes the MC UI unusable while the plug-in is running if someone has more than one zone.

Does anyone know of a better way to do this? Am I missing something obvious, or is there a creative workaround to this problem that I haven't been able to find?
Logged

gappie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4580

welcom to the forum.. dont know a creative workaround. but i also use a timer in a plugin, just to scan if the zone has changed, or actually to see if the current playing file is different, but it does not make the ui interface unuseable. could it be that the timer speed is a bit rough. would one a second not be enough?

and btw, what is said in the wiki:
Quote
Media Center, however, will only notify changes in the currently active zone. If a track changes in the non-active zone, there will be no event. Only track changes in the active zone will have events.
is not true anymore for track change (i just checked again) and maybe also for playback state. when im in zone 1 but music is playing in zone 0 then i get an event when an other tune is started in zone 0 telling what happened, track changed, and in which zone, in this case zone 0.

 :)
gab
Logged

Craig

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 612

I just checked that and you're right, when did that change?

Craig
Logged
MC2Slim - Windows Shell and JRiver Media Center Integration for Squeezebox.

http://www.duff-zapp.co.uk

gappie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4580

I just checked that and you're right, when did that change?

Craig

i think it changed somewhere januar/februar this year.

uhm...lol.  ;D
i learned about it in this thread: http://yabb.jriver.com/interact/index.php?topic=44939.0

From You!!!  8)
I just run my event viewer program with MC 12.0.432 and  NOTIFY_TRACK_CHANGE seems to be firing and including the zone even when it is not active. However the NOTIFY_PLAYLIST_PROPERTIES_CHANGED and_PLAYLIST_FILES_CHANGED events that fire only contain a '0' as zone info.

Craig


 :)
gab
Logged

Craig

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 612

I must be getting old :-)

Craig
Logged
MC2Slim - Windows Shell and JRiver Media Center Integration for Squeezebox.

http://www.duff-zapp.co.uk

simonk

  • Recent member
  • *
  • Posts: 18
Re: Monitoring 'Track Changed' Across Multiple Zones
« Reply #5 on: July 30, 2009, 01:38:29 pm »

Hey guys, I had a (somewhat) quick question about a plugin I'm trying to develop.

Here's the situation: I'm developing a plugin for another piece of software to interface with MC (the software I'm writing the plugin for is called HomeSeer, www.homeseer.com). I need to know when the track changes for each zone so that I can keep the current track information up to date within the software (which it will use to trigger events in HomeSeer, display the current track on a web page, etc.). It doesn't look like the regular event handler will work for me if a user has multiple zones, since it only fires track changed events for the currently active zone.

Right now I'm using a timer and rotating through the different zones every few seconds to determine if a track has changed (by comparing it to the last known track). This solution works fine in the software, but it makes the MC UI unusable while the plug-in is running if someone has more than one zone.

Does anyone know of a better way to do this? Am I missing something obvious, or is there a creative workaround to this problem that I haven't been able to find?

Sorry to reopen an old thread but I've also got HomeSeer and looking to integrate JRiver Media Center in, I've got 3 audio zones set up and am currently sending Media Center Core Commands such as the command below to stop the player in a particular zone.
  hs.Launch("C:\WINDOWS\SYSTEM32\MC13.exe", "/MCC 10002," & ZoneCode)
I'd be interested to know if you managed to write a plugin and what you were able to do.  I've tried having a go at writing a plugin using the api/sdk but got a bit lost trying to figure out how to understand how to use all the available commands that I required to use in my vb script.

Look forward to hear what you were able to do.

Simon
Logged
Pages: [1]   Go Up