INTERACT FORUM

Please login or register.

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

Author Topic: MMC_FIND_MUSIC in c#  (Read 1730 times)

carbo

  • World Citizen
  • ***
  • Posts: 106
MMC_FIND_MUSIC in c#
« on: June 01, 2007, 03:59:14 am »

I've decided to step into the wonderful world of plugin development for Media Center  :)
In the end I would like to offer a way to display the "similar artists" feature seen in allmusic or last.fm.

For the moment I'm doing a little at a time and try to evaluate what i can / can't.

So for now I'd like to navigate to a specific artist when clicking on a button.

The only solution I've found is to use Media Center Core Commands:
I will first send a MCC_SHOW_TREE_ROOT to go to the audio view and then I'd like to do a search (with MCC_FIND_MUSIC) to limit the display to the specific artist. It's not very clean but that's all I've found.

So basically I've 2 questions:

- Is there a better way ? :)

- the core command MCC_FIND_MUSIC has a wchar * as a parameter. How can I use it in c# ?
I'm pretty much a beginner in c# (in general development actually :p) and it seems that pointers are differently managed than in c.

Thanks in advance

Guillaume

PS: I wanted also to thanks Mr ChriZ for his wonderful c# template. It helps me have a environnment set up in no time. Very helpful !
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42382
  • Shoes gone again!
Re: MMC_FIND_MUSIC in c#
« Reply #1 on: June 08, 2007, 12:09:15 am »

There's currently no safe way for a plugin to switch views like that.  You can search or make playlists, but it'd be up to the user to switch the view. (at least for now)

Any MCC that takes a pointer is really for internal use only.  Trying to use it from a plugin or other process may cause problems.

Good luck :)
Logged
Matt Ashland, JRiver Media Center
Pages: [1]   Go Up