INTERACT FORUM

Please login or register.

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

Author Topic: Library Server - Client Views.  (Read 2938 times)

yinmeout

  • Junior Woodchuck
  • **
  • Posts: 52
Library Server - Client Views.
« on: May 25, 2014, 03:41:25 pm »

Hi everyone,

This might be a dumb question so I apologize if I missed this in the Wiki or forum - but I could not find this asked so far.

So I have a library server - which is running truly on a headless server machine (2012r2 server) - now to accommodate JRiver I set up Autologon (from Sysinternals) to give JRiver a desktop to run itself under - (the server is not actually a windows service I discovered.) All good. This library is entirely remotely managed from my client PC with multiple monitors and SSD's and all the client side stuff etc.

To do that I just load the library and off we go.

However here's what I can't figure out. It's extremely useful to create custom views of my music library (on my client). But I read that these will not flow back to the library server as they are a client side setting.
But what I also notice, is that when I have customised my views the way I want them, they are not retained, it seems. If I load up the local library and then flick back to the server - there is no persistence of those views, into the server library.

I just wonder if this is expected behaviour and if so - what (if any) is the current thinking / wisdom on this point?

(If all else fails I don't have a problem curating via an RDP session to the server - as most of the real usage work is done via JRemote and Sonos DLNA devices.)
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Libary Server - Client Views.
« Reply #1 on: May 25, 2014, 04:08:57 pm »

You can only define Views and modify other "structural" things on the machine acting as the Library Server.

Some discussions related:
http://yabb.jriver.com/interact/index.php?topic=75430.msg511454#msg511454
http://yabb.jriver.com/interact/index.php?topic=75474.0
http://yabb.jriver.com/interact/index.php?topic=88169.0
Logged
"Some cultures are defined by their relationship to cheese."

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

yinmeout

  • Junior Woodchuck
  • **
  • Posts: 52
Re: Libary Server - Client Views.
« Reply #2 on: May 25, 2014, 06:10:59 pm »

That's great - thank you sir!
Logged

yinmeout

  • Junior Woodchuck
  • **
  • Posts: 52
Re: Library Server - Client Views.
« Reply #3 on: May 25, 2014, 08:03:23 pm »

Err - this is odd. . .

After reading through the articles you pointed me toward - I decided to use the library (direct) and 'indirect' methods.

I was working on the remote access mode to the library and I couldn't find some music I was sure I had and then when I looked I saw the following. . .

I have in the library view from MC on my server 22026 audio files.
In the Library View (direct) on my client 14327 files  :o
In the Library View (indirect) on my client its 22026 - which I would expect as its a local cached copy of the server files.

The content paths are UNC, so identical. \\server\music\ etc.
The access differs slightly for the library itself
On the server its d:\JRiver\Library
Whereas on the client in direct mode, its \\server\JRiver$

The client does not have any auto import paths configured I did all that on the server configuration.
Am I missing something silly here?

Logged

yinmeout

  • Junior Woodchuck
  • **
  • Posts: 52
Re: Library Server - Client Views.
« Reply #4 on: May 25, 2014, 08:29:01 pm »

Ignore this - I see what the problem is.
The MC on the server loads the "default view" and I was forgetting to load the "server library" after restarting - so I've been working off the wrong library.
All ok now.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Library Server - Client Views.
« Reply #5 on: May 25, 2014, 11:08:23 pm »

Good.

A new tip, since that last stuff was all written.  MCWS (the REST service that Media Network is built upon) now has commands that let you execute Command Line and MCC commands remotely.  This means, among other awesome things, that you no longer need to resort to any PowerShell trickery to close the remote copy of MC in order to "take control" of the Library from your client.

So, for example, if you want to close a copy of MC that is running a Library Server, you only need to visit this "page" in a browser:

http://<SERVER_ADDRESS>:<PORT>/MCWS/v1/Control/CommandLine?Arguments=/Close

Or, to use the MCC_EXIT command to do the same, you'd use:

http://<SERVER_ADDRESS>:<PORT>/MCWS/v1/Control/MCC?Command=20007,1

Unfortunately, shutting it down means it will no longer respond to commands via MCWS, so if you do this, you'd still need to use trickery to start it back up again.  So, instead, don't shut it down.  Make it switch Libraries.  First, you'll need an alternate (junk) Library in MC to switch to.  If you still have the Default Library in MC (the one it creates by default in its AppData directory), but your main Library is a different one, so you don't use the default one for day-to-day operation, you could just switch to that.  If you use the Default Library, just make a new one in the Library Manager.  For example, make a new blank Library called "On Hold".

Import a few files into it, so it doesn't constantly want to do the First-Use Scan every time you switch to it.  Then, when you want to switch to it do:

http://<SERVER_ADDRESS>:<PORT>/MCWS/v1/Control/CommandLine?Arguments=/Library "On Hold"

When you're done messing around with the Library on your client machine, and you want to switch back, do:

http://<SERVER_ADDRESS>:<PORT>/MCWS/v1/Control/CommandLine?Arguments=/Library "My Real Library's Name"

(Substituting the real Library names, of course.)

Of course, this would make you Authenticate each time you use one of them (or once per session anyway), but it uses standard HTTP Authentication, so you can craft your URL like so:

http://<USERNAME>:<PASSWORD>@<SERVER_ADDRESS>:<PORT>/MCWS/v1/Control/CommandLine?Arguments=<COMMAND>

Unfortunately, the latter doesn't work with modern versions of IE and it is tough to make a shortcut that works with it (thanks spoofers).  There's a solution though...
Logged
"Some cultures are defined by their relationship to cheese."

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

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Library Server - Client Views.
« Reply #6 on: May 26, 2014, 01:40:27 am »

You motivated me to make a script I'd been meaning to make a long time.

http://glynor.com/files/MCUtilities/MC-Switch_Library-1000.zip

To use it, download it and unzip it somewhere you won't lose it.
Open it in a text editor, and edit in your Server's address, port, username, and password as indicated (see below).

Then, run it by running:
MC-Switch_Library.wsf /library:"Library Name"

And it'll send a command to the given server to switch to the Library provided.  You can then make Windows shortcuts to this script (with different arguments to load your "pretend" and "real" Libraries) and pin them to the Windows Start Screen, Taskbar, Start Menu or whatever, for easy access.

Code: [Select]
' glynor's MC-Switch_Library.wsf script
' ************************************************************************************************************
' ************************************************************************************************************
' PURPOSE: Switches a remote copy of MC to a different Library via a MCWS Command
' PROCESS: The script sends a MCWS Command to execute MC's /Library command line option
'           on a remote server.
' REQUIRES: MC19 tested (probably works with MC18 too)
' MC must have Media Network enabled and a Username and Password set.
' USAGE: MC-Switch_Library.wsf /library:"Library Name"
' Optional Parameters:
' /verbosity:on - Asks for confirmation before continuing, and provides additional information.
' RETURNS: 0 if successful, 1 if failed
' ************************************************************************************************************
' RELEASE NOTES:
' ************************************************************************************************************
' 1.0.0 (05/26/2014)
' http://glynor.com/files/MCUtilities/MC-Switch_Library-1000.zip
' 1. Initial Release
' ************************************************************************************************************
' USER DEFINED VARIABLES
' ************************************************************************************************************
' You need to modify the values below to point to the server you want to use with this script.

const strServerAddress = "SERVER_ADDRESS:PORT"
' EXAMPLES
' const strServerAddress = "myserver.mynetwork.com:52199"
' const strServerAddress = "192.168.3.120:52199"

const strUsername = "USERNAME"
const strPassword = "PASSWORD"

' END USER DEFINED VARIABLES
' ************************************************************************************************************
' ************************************************************************************************************
Logged
"Some cultures are defined by their relationship to cheese."

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

yinmeout

  • Junior Woodchuck
  • **
  • Posts: 52
Re: Library Server - Client Views.
« Reply #7 on: May 26, 2014, 03:57:44 am »

Hi - thanks - this is great!
Logged
Pages: [1]   Go Up