INTERACT FORUM

Please login or register.

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

Author Topic: Automatic change of library  (Read 3040 times)

Marquis

  • Junior Woodchuck
  • **
  • Posts: 60
Automatic change of library
« on: May 27, 2007, 01:10:26 pm »

Hi folks,

I have two librarys on the same PC. The 1st one is my personal lib the 2nd one is from my wife. We use the same PC for listening to our music. I would like to have a button "change library" on my remote to switch between these two  ;D

So far I haven't found any solution. There seem to be no library function in the com-object, also no windows messages or a command-line interface. It would be great to see an updated com-interface or at least a command-line switch to do so.

Any other solutions are also welcome :)

Marc
Logged

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Automatic change of library
« Reply #1 on: May 27, 2007, 11:06:12 pm »

I keep music for my wife and I in the same library and use playlists and other tricks to play what I want to hear, what she wants to hear, or what we both want to hear.

j

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Re: Automatic change of library
« Reply #2 on: May 28, 2007, 03:28:59 am »

Still would be a nice feature to see in the SDK though  ;)

Marquis

  • Junior Woodchuck
  • **
  • Posts: 60
Re: Automatic change of library
« Reply #3 on: May 28, 2007, 07:59:55 am »

Hi John,

I tried this before, but it has many disadvantages. It's very hard to design the views and playlists to fit her and my needs. Also adding new music to the library results often in checking for unwanted side-effects, so the views need to be customized to include the new music etc.

It's much easier to have two librarys (not meaning, having to music collections on the hard-drive). Means using the full power of MC12 without making compromises. Also a usefull scenario is a new library for the children allowing parental control (having only movies and music that is allowed for them).

So, please implement soon ;)

Best regards,
  Marc
Logged

Marquis

  • Junior Woodchuck
  • **
  • Posts: 60
Re: Automatic change of library
« Reply #4 on: May 31, 2007, 03:34:29 am »

So it's me again.

I need a hint. Where are the preferences stored about what libraries are available and which one will be loaded during start-up. My work-around will be to manipulate the settings with an external program. So a change of library is

1. Shut down MC12
2. Alter the library setting
3. Restart MC12

Hopefully it's stored unencrypted somewhere :-)
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42046
  • Shoes gone again!
Re: Automatic change of library
« Reply #5 on: May 31, 2007, 08:33:24 pm »

It might be stored here:
HKEY_CURRENT_USER\Software\JRiver\Media Center 12\Properties\Library Directory
HKEY_CURRENT_USER\Software\JRiver\Media Center 12\Properties\Library Name

This approach isn't supported and may not work.

Would an MCC command that took a library index help?  Then you could run it from the command line, or even give it a keyboard shortcut. (requires a little leg-work to create custom shortcuts, but it's possible)

User shortcut information:
http://wiki.jrmediacenter.com/index.php/User_Defined_Global_Keyboard_Shortcuts
Logged
Matt Ashland, JRiver Media Center

Marquis

  • Junior Woodchuck
  • **
  • Posts: 60
Re: Automatic change of library
« Reply #6 on: May 31, 2007, 10:39:50 pm »

A MCC command would be great. It's the most flexible way and Girder can use it as well.

Update: my workaround is successful. I can wait more relaxed now for an update of the mcc command options.

BR/Marc
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42046
  • Shoes gone again!
Re: Automatic change of library
« Reply #7 on: June 01, 2007, 09:55:33 am »

In build 249 and later:

Changed: Loading a library is now available with MCC_LOAD_LIBRARY so that it can be fired from a remote, keyboard shortcut, etc.

MCC commands here:
http://wiki.jrmediacenter.com/index.php/Media_Center_windows_messages
http://www.jrmediacenter.com/DevZone/MCCommands.h
Logged
Matt Ashland, JRiver Media Center

robydago

  • Citizen of the Universe
  • *****
  • Posts: 518
Re: Automatic change of library
« Reply #8 on: June 01, 2007, 11:09:57 am »

In build 249 and later:

Matt,
could JRiver post to everybody (not only beta testers) interim builds changelogs as soon as they release an interim build to beta testers? I'm only talking about the changelog, not the build itself.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Automatic change of library
« Reply #9 on: June 01, 2007, 11:43:20 am »

Fantastic change, Matt!   ;D
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42046
  • Shoes gone again!
Re: Automatic change of library
« Reply #10 on: June 01, 2007, 11:59:21 am »

Matt,
could JRiver post to everybody (not only beta testers) interim builds changelogs as soon as they release an interim build to beta testers? I'm only talking about the changelog, not the build itself.


Probably not.

The beta tester board is used to smoke test any bad stuff out of a build before setting it loose.

We release builds here as soon as they're ready.
Logged
Matt Ashland, JRiver Media Center

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Automatic change of library
« Reply #11 on: June 01, 2007, 12:23:00 pm »

The beta tester board is used to smoke test any bad stuff out of a build before setting it loose.

We light 'em up, smoke 'em, and if no one turns green they publish them.   ;)
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

Marquis

  • Junior Woodchuck
  • **
  • Posts: 60
Re: Automatic change of library
« Reply #12 on: June 02, 2007, 05:18:55 am »

Thanks Matt!!!!
Logged

DCKJR

  • Recent member
  • *
  • Posts: 9
Re: Automatic change of library
« Reply #13 on: June 02, 2007, 05:59:22 pm »

Marc -

I would also like to be able to change libraries in MC12 using NetRemote2/Girder4 however I am not enough of a programmer to be able to figure out how to do this using MMC's. 

Can you share any implementation details and/or scripts?

Thanks

Dudley
Logged

BartMan01

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1513
Re: Automatic change of library
« Reply #14 on: June 02, 2007, 10:22:20 pm »

I keep music for my wife and I in the same library and use playlists and other tricks to play what I want to hear, what she wants to hear, or what we both want to hear.

j


I've yet to find a 'nice' way to use MC for 2 different people.  Currently using the 'two library' approach and don't really like the hassle.  I would go to one library, but the biggest issue with that is if you use separate handhelds and care about ratings.  MC will only sync the 'normal' ratings field to the devices.  I could use a single library if I had the ability to tell MC which field in the library actually holds the ratings for that user.
Logged

Marquis

  • Junior Woodchuck
  • **
  • Posts: 60
Re: Automatic change of library
« Reply #15 on: June 03, 2007, 05:03:45 am »

Dudley,

my control chain is NetRemote 2 -> Girder 4 -> MC12. So NR is sending command to G4 and G4 to MC. To send a message to MC you must use the CommandCapture action. then fill out the following parameters:

Message: 33768 (always)
wParam: 10023 (this is the command you wish to send, in this example set rating)
lParam: 5 (parameter for the command, in this example 5)
Sendmessage/Postmessage: SENDMESSAGE

Then select the target application using the Windowpicker and fill out:

Match invisible Task: YES
Classname: MJFRAME
Executable: MEDIA CENTER 12.EXE

In my example I set the rating of a file to 5. For other commands just replace the wParam and lParam. The list of MCC_Commands can be found in the wiki. As you already read, the next version will support the loadlibrary command that makes things easy.

Cheers,
  Marc
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Automatic change of library
« Reply #16 on: June 03, 2007, 11:00:13 am »

my control chain is NetRemote 2 -> Girder 4 -> MC12. So NR is sending command to G4 and G4 to MC. To send a message to MC you must use the CommandCapture action. then fill out the following parameters:

Technically, you should use the SendMessage action instead. This action is available as long as you have SendMessage checked in the plugins settings in Girder4.

Otherwise, what Marquis said is right (and Capture Command would work, but its interface is designed for capturing messages when there is no documentation -- SendMessage is a bit easier to use).
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

DCKJR

  • Recent member
  • *
  • Posts: 9
Re: Automatic change of library
« Reply #17 on: June 03, 2007, 11:31:28 am »

Marc and Glynor - Thanks.  I'll see if I can understand and duplicate this.

Dudley
Logged

Marquis

  • Junior Woodchuck
  • **
  • Posts: 60
Re: Automatic change of library
« Reply #18 on: June 13, 2007, 01:59:28 pm »

Matt,

I have to come back to the new message. The lparam should be the library index. But how to find out the index when only having a name??

My first approach was to take information from the registry, but when I compare the listing in the windows registry vs. the library manager the order does not match. Obviously the order in the lib-manager suits to the index.

The background of my question is, that my script reads out the names of available librarys and offers a menu to choose from. I have to match the name to the index.

Please help,
  Marc
Logged

Marquis

  • Junior Woodchuck
  • **
  • Posts: 60
Re: Automatic change of library
« Reply #19 on: June 19, 2007, 02:53:16 am »

.
Logged
Pages: [1]   Go Up