More > JRiver Media Center 32 for Windows
MCWS Feature Request - Notifications on state change
Striker:
MCWS Feature Request – expand Playback/Info?Field for the Next Track
http://127.0.0.1:52199/MCWS/v1/Playback/Info?Fields=Artist,Album,Name,Genre
to allow the retrieval of the fields for the next track.
http://127.0.0.1:52199/MCWS/v1/Playback/Info?Fields=Artist,Album,Name,Genre,next.Artist, next.Album …
I am currently using the deprecated “PlayingNow” plugin to write out the current/next track info to a file and to call a program I wrote on track change. I'd need to be able to request user fields too (not sure if that is currently allowed).
I’d like to give up my use of the “PlayingNow” plugin so I can use the 64 bit version of MediaCenter.
I know I can get the NextFileKey and then call:
http://localhost:52199/MCWS/v1/File/GetInfo?File=99999&Action=json
to get info about the next track.
That’s two calls to MCWS and it would be great to only have one call since I’ll be polling MC every second to keep my MC info updated.
I currently can’t use the Playback/Info?Fields= or any update you make for this request since I’m still running v30. Of course if JRiver makes this change, I will of course have to purchase the v32 update.
Hendrik:
This doesn't really seem to fit the design of such a call. A request should fit the scope of the information you are requesting, it really gets muddled if it can return mixed information about different files.
I don't think making one more MCWS call is a huge burden on the system here - afterall you effectively only need to do it once for every file, or at least only one call, and skip the second if the next file didnt change.
Striker:
--- Quote from: Hendrik on February 14, 2024, 05:26:17 pm ---This doesn't really seem to fit the design of such a call. A request should fit the scope of the information you are requesting, it really gets muddled if it can return mixed information about different files.
I don't think making one more MCWS call is a huge burden on the system here - afterall you effectively only need to do it once for every file, or at least only one call, and skip the second if the next file didnt change.
--- End quote ---
Thank you for reading my request.
I will still have to do the first MCWS Playback/Info?Fields call every second to know if the info has changed and to check if the playback status changed. Yes if the next key did not change I wouldn't have to do the 2nd call.
Still I'm struggling with giving up the "PlayingNow" plugin and would like to minimize MCWS calls (using curl).
My code would first check if the MediaCenter process is active and if active then do the MCWS calls.
(calling Playback/Info?Fields with MediaCenter not running has a long [computer-time] delay before returning an error)
I hope as you think about this more that you may change your mind. Thanks for reading.
This is an example of what I have the "PlayingNow" plugin write out on track change.
--- Quote ---[PLAYING_NOW]
DURATION="6:30"
TRACK="8"
ARTIST="Blues Company"
ALBUM="1991 Damn Let's Jam"
SONG="Comin' Home, Baby"
PLAYCOUNT="35"
GENRE="Blues"
GENRE_ALL=" Blues "
YEAR="1991"
NEXT_ARTIST=" Blues Company "
NEXT_ALBUM=" 1991 Damn Let's Jam "
NEXT_SONG=" Move On Down The Line "
NEXT_RATING=" 3 "
RATING="3"
QUALITY=3
LASTPLAYED="2023-09-14 13:11"
DATEIMPORTED=" 2008-11-16 17:10 "
SOURCE="flac"
FILETYPE=" flac "
[END]
--- End quote ---
Striker:
Or maybe a MediaCenter option to call a user program on track or state change?
That would eliminate any need for polling using MCWS.
I'd only need to call MCWS when MediaCenter triggered my program on a track or state change.
Striker:
Feature Request - MC option to call a user program on track or state change
This would work great for me... I currently gather information about the current/next track using the deprecated "PlayingNow" plugin. I've configured the PlayingNow plugin to write info about any track change to a file and to call a program on track change to read that file and update my HomeAutomation screens around my house.
I suspect many MC users would find a use for an MC option to call a user program on track/state change.
If MediaCenter itself would call a user program on track/state change, that would eliminate my need for the "PlayingNow" plugin. When MC runs my program it would do the MCWS calls to get the current/next track info and state, eliminating any need for 1 second polling using MCWS.
I'm really working hard to find an alternative to using the 32 bit deprecated "PlayingNow" plugin.
Navigation
[0] Message Index
[#] Next page
Go to full version