INTERACT FORUM

Please login or register.

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

Author Topic: Any way to bind a key to a specific favourite view or audio sub tree?  (Read 982 times)

zeltak

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 478

Hi
on a Mac and struggling to find a way to bind a key to a specific favourite view or audio sub tree.

for example if I have a tree like this (see attached) where I have a sub audio tree named `XAlbums`, how does one bind a key to jump to it?

thx a lot

Z

Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8009
Re: anyway to bind a key to a specific favourite view or audio sub tree?
« Reply #1 on: July 11, 2019, 09:36:21 am »

As far as I know, there's no MCC (media center core command) to change tree or view.  To bind a key using MC, you need an MCC to execute.

There appears to be an MCWS command (web REST interface) that can show views, but I can't get it to work.  The function is called "Show" and is in the user interface section of MCWS.

http://localhost:52199/MCWS/v1/doc

Of course even if you can get that to work, you'd have to use some external key mapping program which is not a part of MC since MC can not call MCWS stuff from it's key bindings.

You can open several tabs and keep them on your favorite views and then have MC start up in "last location", which will preserve all of your tabs and what you have them showing.

There's also some functionality under View > Navigation > Organize Favorites that's related to this I think.  I have never used it as it seems confusing to me.  But maybe it can help you.

That's all I've got!  Good luck.

Brian.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41942
  • Shoes gone again!
Re: anyway to bind a key to a specific favourite view or audio sub tree?
« Reply #2 on: July 11, 2019, 09:51:38 am »

I'm making MCWS/v1/UserInterface/Show richer in the next build.

Here's the history:
Changed: Made the MCWS UserInterface/Show treat anything that's not a known string as a tree path to select.

Thanks for the prod :)
Logged
Matt Ashland, JRiver Media Center

zeltak

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 478
Re: anyway to bind a key to a specific favourite view or audio sub tree?
« Reply #3 on: July 12, 2019, 07:34:46 am »

Sounds very promising

thx a lot will wait for next version

Z
Logged

zeltak

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 478
Re: anyway to bind a key to a specific favourite view or audio sub tree?
« Reply #4 on: July 20, 2019, 03:46:46 am »

Hi Matt and all

I understand that in the latest version you implemented the selection of the view:

"Changed: Made the MCWS UserInterface/Show treat anything that's not a known string as a tree path to select."

I'm trying to get it to work but a bit lost, appreciate  any help with this. So I have a view called "3Main". Im issuing this:


Code: [Select]
zeltak@imbp-50:/|⇒  wget http://localhost:52199/MCWS/v1/Playback/UserInterface/Show\=3Main -O /dev/null

but get this error

Code: [Select]
--2019-07-20 11:42:40--  http://localhost:52199/MCWS/v1/Playback/UserInterface/Show=3Main
Resolving localhost (localhost)... 127.0.0.1, ::1
Connecting to localhost (localhost)|127.0.0.1|:52199... connected.
HTTP request sent, awaiting response... 500 Internal server error
2019-07-20 11:42:40 ERROR 500: Internal server error.

can anyone show me an example of how to get it to work?

thx a lot

Z
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10713
Re: anyway to bind a key to a specific favourite view or audio sub tree?
« Reply #5 on: July 20, 2019, 03:52:01 am »

The proper URL for that would be this:

http://localhost:52199/MCWS/v1/UserInterface/Show?View=3Main

with appropriate escaping, of course.
Logged
~ nevcairiel
~ Author of LAV Filters

zeltak

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 478
Re: anyway to bind a key to a specific favourite view or audio sub tree?
« Reply #6 on: July 20, 2019, 04:40:32 am »

thx so much @Hendrik

ive tried that with not much success still:

Code: [Select]
zeltak@imbp-50:~/ZH_tmp|⇒  wget http://localhost:52199/MCWS/v1/Playback/UserInterface/Show\?View\=3Main
--2019-07-20 12:38:09--  http://localhost:52199/MCWS/v1/Playback/UserInterface/Show?View=3Main
Resolving localhost (localhost)... 127.0.0.1, ::1
Connecting to localhost (localhost)|127.0.0.1|:52199... connected.
HTTP request sent, awaiting response... 500 Internal server error
2019-07-20 12:38:09 ERROR 500: Internal server error.

also tried via the web and get this error (see attachment 1)

also attaching the current view in MC

can you elaborate more about escaping? I don't have a empty space in my view as far as a I can tell but perhaps I'm missing something

best

Z

Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8009
Re: anyway to bind a key to a specific favourite view or audio sub tree?
« Reply #7 on: July 20, 2019, 10:23:20 am »

Try it in a web browser first.  Once you get it working there, you can probably copy the URL to wget.  It also might be helpful to surround the URL in wget with single quotes, as that should protect the special characters from the shell, and let get see them directly.

Brian.
Logged

zeltak

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 478
Re: anyway to bind a key to a specific favourite view or audio sub tree?
« Reply #8 on: July 20, 2019, 11:56:06 am »

thx appreciate  the answer
This is the error I get when using the browser:


Code: [Select]
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<Response Status="Failure" Information="Function 'Playback/UserInterface/Show' not found."/>

I also tried the normal Audio view:

Code: [Select]
http://localhost:52199/MCWS/v1/Playback/UserInterface/Show?View=Audio

alas with same error

any clue?

thx

Z
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10713
Re: anyway to bind a key to a specific favourite view or audio sub tree?
« Reply #9 on: July 20, 2019, 12:59:11 pm »

Oh, remove the Playback from the path.
Should be only http://localhost:52199/MCWS/v1/UserInterface/Show?View=3Main

You can lookup commands and their parameters here:
http://localhost:52199/MCWS/v1/doc
Logged
~ nevcairiel
~ Author of LAV Filters

zeltak

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 478
Re: Any way to bind a key to a specific favourite view or audio sub tree?
« Reply #10 on: July 21, 2019, 12:14:00 am »

Thx so much @Hendrik
it works great
last question if you don't mind. If I have subviews such as Audio>xAlbums (see attached screen), how does one refer to them?
I tried with several methods such as normal unix paths '/' and so on but always gets an error

thx

Z
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Any way to bind a key to a specific favourite view or audio sub tree?
« Reply #11 on: July 21, 2019, 01:06:27 am »

On Windows;

http://localhost:52199/MCWS/v1/UserInterface/Show?View=Audio\xAlbums

would work.

I assume on the Mac you tried;

http://localhost:52199/MCWS/v1/UserInterface/Show?View=Audio/xAlbums

I suspect that last part is just a string passed into MC as a path to follow, and it may use the "Windows" path delimiter, "\".
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

zeltak

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 478
Re: Any way to bind a key to a specific favourite view or audio sub tree?
« Reply #12 on: July 21, 2019, 05:56:48 am »

thx again!

using the '\\' did the trick!!

thx again

Z

Logged
Pages: [1]   Go Up