INTERACT FORUM

Please login or register.

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

Author Topic: Build my own user interface  (Read 1268 times)

rolf_eigenheer

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 303
  • nothing more to say...
Build my own user interface
« on: December 02, 2020, 01:21:31 pm »

I love old user interfaces. Front panels with buttons which directly perform a certain function - regardless of the context.
Like gas and brake pedals, which do not change their function even when you are standing or driving.

I plan to build such a panel for my media center. The design is inspired by the well-known ReVox devices.

But why am I telling you this ?! There are a few things I don't have a solution to yet.

There are no direct keyboard commands for some operations. For this I would like to assign buttons to MCC commands.
https://wiki.jriver.com/index.php/User_Defined_Global_Keyboard_Shortcuts
However, the Resource.xml cannot be downloaded. Has that been postponed?

Then there are operations for which I cannot find any direct commands.
So I would like to jump to the previous / next branch in the theater view. So when I'm in the albums, to the next album. When I'm in artist then to the next artist.

For my main concern there is an MCC command (MCC_LIST_SEND_TO_PLAYING_NOW) but no documentation. I want to copy the current selection to Playing now in the theater view. With different buttons for the individual selected element or the entire selection. And optionally to the beginning of Playing now or to the end.

I am grateful for your support.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Build my own user interface
« Reply #1 on: December 02, 2020, 01:54:08 pm »

Downloading Resource.xml from the link in the Wiki worked fine for me. Note that, depending on your browser, you likely have to right-click on the URL and choose save target as. Otherwise the browser will try (and fail, not knowing what to make of MJRS formatting) to display the XML, so it just shows up blank.

For the rest, you might want to explain a bit better what you actually want to know or would like to have added, because I'm not clear on some of it (like your MCC_List_Send question).

I will say, generally, that the MCC commands that let you activate different "Views" in Theater View have been, in the past for me, unreliable if you aren't using the default Theater View setup and Library. I can't say for sure that is still true, as it has been years and years since I've tried, but... That might be an exercise in frustration for you, and you'd be better off not trying to automate opening and closing Views in Theater View, and instead consider simplifying it so the users can just use Up/Down/Left/Right/OK as designed.
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: Build my own user interface
« Reply #2 on: December 02, 2020, 02:03:33 pm »

Also keep in mind that you can also access all of MCWS for control, and modern extensions to MC's interface have all been done that way.

If you don't need any feedback from MCWS, you can even just use MC.exe to launch the commands directly (without having to script it or use curl or whatever). But, if you're only looking at MCCs and the Command Line Options, you're missing out on a lot of the power of MC's scriptability, and ALL of the modern stuff.
Logged
"Some cultures are defined by their relationship to cheese."

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

rolf_eigenheer

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 303
  • nothing more to say...
Re: Build my own user interface
« Reply #3 on: December 03, 2020, 12:47:54 am »

Downloading Resource.xml from the link in the Wiki worked fine for me. Note that, depending on your browser, you likely have to right-click on the URL and choose save target as. Otherwise the browser will try (and fail, not knowing what to make of MJRS formatting) to display the XML, so it just shows up blank.

Thanks. EDGE was able to download the file. Chrome does not offer a 'save as file' option for this address.
Would be helpful if a zipped version would be available for download.
Logged

rolf_eigenheer

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 303
  • nothing more to say...
Re: Build my own user interface
« Reply #4 on: December 03, 2020, 01:06:04 am »

For the rest, you might want to explain a bit better what you actually want to know or would like to have added, because I'm not clear on some of it (like your MCC_List_Send question).

MCC_LIST_SEND_TO_PLAYING_NOW is command 26031
It has a parameter SENDTO_PLAYING_NOW_TYPES Type
I cannot find any information about supported parameters.

In 'Standard View' Parameter 2 replaces all tracks in 'Playing now' with the ones which are filtered by the panes. Parameter 3 seems to add Tracks with similar genre. There might be many other smart parameters I'd like to know.

But the parameters I found which worked in 'Standard View' didn't do anything in 'Theater View'.

Assume we have a view with categories Artist and Album. After entering an Artist, all his Albums are shown. One Album would have the focus (border). Now I'd like to know the Parameters which sends to the Playlist:
- the focussed Item (Album in this example)
- All the filered (shown) Items (all Albums of that Artist in my example)

Further I'd like to use individual Buttons for:
- Replace Playing Now
- Add at the End
- Add in Front

Don't worry about the numbers of buttons this will require. An old-style rotary switch would do that.

Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2674
Re: Build my own user interface
« Reply #5 on: December 03, 2020, 02:14:00 am »

Thanks. EDGE was able to download the file. Chrome does not offer a 'save as file' option for this address.
Would be helpful if a zipped version would be available for download.

That's an FTP link. Chrome and Firefox are removing support for FTP, and Edge will surely follow. FTP is considered obsolete and insecure, and they're trying to kill it.
https://www.securityweek.com/mozilla-remove-support-ftp-firefox
https://www.bleepingcomputer.com/news/google/google-has-started-removing-ftp-support-from-chrome/

There's a flag in chrome://flags that you can enable to get FTP back. That flag will soon be gone as well.
Alternatively, you can install Filezilla and set it as the FTP:// handler, so that when you click on an FTP link in Chrome it will open Filezilla. (Apparently Filezilla doesn't have an option to register the ftp:// handler)

Jim, maybe it's time to retire ftp.jriver.com? Newest files I see there are from 2011. Soon, no browser will be able to access them, only Filezilla and similar clients.
Logged

rolf_eigenheer

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 303
  • nothing more to say...
Re: Build my own user interface
« Reply #6 on: December 03, 2020, 11:59:49 am »

Finally found the Resource.XML and added some Command. This works fine! Thanks!

But MCC_LIST_SEND_TO_PLAYING_NOW doesn't work in Theater View. The Header-File (http://www.jriver.com/DevZone/MCCommands.h) is outdated. This command is not even listed. Therefore the Parameters are missing too.

The user interface should look like this:
- The lower 6 buttons are controlling the 'Playing Now' queue. Next/Previous Track, Next/Previous Album, Play/Stop
- Navigating in Theater View with cursor Keys
- Two buttons for adding single/all items
- A rotary switch to select how tracks were added to the queue.
Logged

rolf_eigenheer

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 303
  • nothing more to say...
Re: Build my own user interface
« Reply #7 on: December 03, 2020, 12:37:20 pm »

This Panel acts as a keyboard. With its USB keyboard controller the thickness is less than 12mm.

If anybody is interested in this DIY project, please PM me. I'm ordering PCBs and alloy front panels soon.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Build my own user interface
« Reply #8 on: December 03, 2020, 10:52:19 pm »

The commands are kept updated (at least reasonably so) on the Wiki article for MC Core Commands: https://wiki.jriver.com/index.php/Media_Center_Core_Commands

They haven't published a new Header file in a long, long time.

As I said, almost all new development (for years) has gone towards the Web Service API, though, so if you're targeting something, you should consider targeting that if at-all possible. It'll be more flexible, even if you use it alongside the Core Commands (and COM API).
Logged
"Some cultures are defined by their relationship to cheese."

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

rolf_eigenheer

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 303
  • nothing more to say...
Re: Build my own user interface
« Reply #9 on: December 04, 2020, 01:53:36 am »

The commands are kept updated (at least reasonably so) on the Wiki article for MC Core Commands: https://wiki.jriver.com/index.php/Media_Center_Core_Commands

They haven't published a new Header file in a long, long time.

As I said, almost all new development (for years) has gone towards the Web Service API, though, so if you're targeting something, you should consider targeting that if at-all possible. It'll be more flexible, even if you use it alongside the Core Commands (and COM API).

In the MCWS doc I couldn't find the commands which do the same as the context menu in Theater View does. When browsing the Audio Library, I want a single key to add the Album the Playlist. And another key for adding the Track. With a single click! instead of shimmy through a menu.

- Right click on the track 
  two more clicks to advance to 'More Playing Options'
  Enter
  2x Down until 'Add'
  Enter

- Right click on the track 
  two more clicks to advance to 'More Playing Options'
  Enter
  9x Down until 'Add (as next to play)'
  Enter



Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Build my own user interface
« Reply #10 on: December 04, 2020, 12:36:42 pm »

You can do this with MCWS, but if that's all you want, that's easy:
26031   MCC_LIST_SEND_TO_PLAYING_NOW   SENDTO_PLAYING_NOW_TYPES Type

SENDTO_PLAYING_NOW_TYPES is an integer. 9 does Add (as Next to Play). There's no list for them, but they are as they appear in the UI under Right-Click > Send To > Play (Zone) with Play = 1, Play (shuffled) = 2, and so on and so forth.

So, MC27.exe /MCC 26031,9 will Send to Playing Now > Add (as next to play) on the currently selected file(s) using the current Zone.
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: Build my own user interface
« Reply #11 on: December 04, 2020, 12:37:42 pm »

I should note: According to the documentation, you should be able to do this with the standard Command Line Play controls (at least /Play) by leaving <playitems> blank, but that doesn't seem to be working properly.
Logged
"Some cultures are defined by their relationship to cheese."

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

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Build my own user interface
« Reply #12 on: December 04, 2020, 02:59:03 pm »

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

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Build my own user interface
« Reply #13 on: December 04, 2020, 03:41:25 pm »

Not sure. I do know that MC27.exe /Play alone does not play the currently selected files in MC. If there are files in Playing Now, it plays one of them. If there are no files in Playing Now, it shows the "There is nothing to play" error dialog.

Using /PlayReplace, /PlayNext, and other similar commands with no provided <playitems> is ignored.

Not sure if it used to work and the fixes Matt made to /Clear broke something? Or if it has been broken a long, long time? Or if the documentation is just wrong and it never worked? (Though, for that to be in there like that, it almost certainly came from the original JRiver-sourced documents.)
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: Build my own user interface
« Reply #14 on: December 04, 2020, 05:04:17 pm »

But I should note, again, functionally it doesn't matter because /MCC 26031 works fine on selected files.
Logged
"Some cultures are defined by their relationship to cheese."

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

rolf_eigenheer

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 303
  • nothing more to say...
Re: Build my own user interface
« Reply #15 on: December 05, 2020, 05:54:07 am »

Added to Resource.XML:
    <Entry Key="Ctrl;Shift;7" Command="26031" Param="7" Global="1" />
    <Entry Key="Ctrl;Shift;8" Command="26031" Param="8" Global="1" />

This works fine im StandardView. But in TheaterView it still works on the item wich was selected in StandardView.
Glynor could you verify this with your setup ?
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Build my own user interface
« Reply #16 on: December 05, 2020, 09:50:29 am »

That stinks. I'll try it out.
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: Build my own user interface
« Reply #17 on: December 05, 2020, 10:01:11 am »

Yep. You're right. It does continue to work using whatever is selected in Standard View even if you manually "select" the files in Theater View using the Select menu item.

So, when I tested it a few times, I got 3x copies of the file that was left selected in Standard View in Playing Now, even though I'd opened and selected a completely different set of files in Theater View when I was testing.
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: Build my own user interface
« Reply #18 on: December 05, 2020, 10:04:47 am »

I'll note: Assuming that /Play and /PlayReplace, etc are broken and should be able to accept "selected files" via some mechanism, and have to be fixed, I think I'd prefer that "selected" (or something like that) be added as a special <playitem> option instead of just passing no additional parameter.

I think that would be more clear, and also allow you to use /PlayReplace, etc and have it be ignored if no parameter is passed (as it is now).
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/
Pages: [1]   Go Up