INTERACT FORUM

Please login or register.

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

Author Topic: NEW: Playing Now Popup can output an image or text file for external processing  (Read 706 times)

Striker

  • World Citizen
  • ***
  • Posts: 176

NEW: Playing Now Popup can output an image or text file for external processing

What information will the text file include? 

What will trigger that text file to be output?  (Start, Stop, Play, Pause, MediaCenter Start/Stop, etc...)

It it configurable?

I posted this a while ago on the original Playing Now Popup Thread


Quote
I was a decades paid user of the original PlayingNow plugin.

One critical feature was the ability to configure it to write out a text file (user defined format) on track change/status, AND then call a user configured program on track change/status.

I used that methodology for my Home Automation system to know of the MC state and track info for display on my HA monitors around my home.

Will that functionality be returning?

Eventually I stopped using the PlayingNow plugin to create any popup or graphics files... I only used it as describe above.

I've since given up on the old PlayingNow plugin so I could go to the 64 bit version of MediaCenter and ended up writing my own program to poll MC using MCWS for that info.  I have always an preferred event-driven solution over polling.

If that old functionality returns, that would be a great reason for me to upgrade from v32 to v33.
Logged

cncb

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3106

Yes, I added it for you :).  You can specify the text that is output with an expression in the settings.  At this point, it is triggered on a track change only but that may change.
Logged
-Craig    MO 4Media remote and player:  Android/TV/Auto | iOS | Windows 10/UWP

Striker

  • World Citizen
  • ***
  • Posts: 176

Yes, I added it for you :).  You can specify the text that is output with an expression in the settings.  At this point, it is triggered on a track change only but that may change.

Thank You. 

For this to be useful to me I'd need to know about TrackChange, Pause, Stop, Play, ProgramStart, ProgramExit.

For the text file output, this is how I configured the text output format.  The format I used works with some library code I have to read it, but I could read/parse it in any format.

Once the text file is written, then I'd need the PlayingNowPopup to call a program I specify like the original PlayingNow plug-in did... this would eliminate me having to run a program every second to poll for a text file change.

Quote
;-------------------------------------------------------------------------------
;  LOGGING SECTION
;-------------------------------------------------------------------------------

[Logging]
MaxEntries=1
Filename=d:\PlayingNow.txt
Tokens=\n[PLAYING_NOW]\nDURATION="<Duration>"\nTRACK="<Number>"\nARTIST="<Artist>"\nALBUM="<Album>"\nSONG="<Name>"\nPLAYCOUNT="<PlayCounter>"\nGENRE="<Genre>"\nGENRE_ALL=" <"Genre-All"> "\nYEAR="<YEAR>"\nNEXT_ARTIST=" <"Next.Artist"> "\nNEXT_ALBUM=" <"Next.Album"> "\nNEXT_SONG=" <"Next.Name"> "\nNEXT_RATING=" <"Next.Rating"> "\nRATING="<Rating>"\nLASTPLAYED="<LastPlayed>"\nDATEIMPORTED=" <"Date Imported"> "\nSOURCE="<"Source">"\nFILETYPE=" <"File Type"> "\n[END]\n\nFINISHED
Script=d:\bat\pn.bat
HideScriptWindow=True


Resulting in an output like this:

Quote

[PLAYING_NOW]
DURATION="5:54"
TRACK="1"
ARTIST="White, Snowy"
ALBUM="1998 Little Wing"
SONG="I'll Be Moving On"
PLAYCOUNT="57"
GENRE="Blues"
GENRE_ALL=" Blues;Rock "
YEAR="1998"
NEXT_ARTIST=" White, Snowy "
NEXT_ALBUM=" 1998 Little Wing "
NEXT_SONG=" Little Wing "
NEXT_RATING=" 3 "
RATING="3"
QUALITY=
LASTPLAYED="2023-09-30 14:38"
DATEIMPORTED=" 2008-12-09 10:17 "
SOURCE="wav"
FILETYPE=" flac "
[END]

FINISHED

Logged

cncb

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3106

Just try it out.  The output should be pretty easy to reproduce with an expression in the expression editor.  There is an option to run a program after the file is created.  It already is produced on track change and play/resume would be easy to add, however, the other triggers are not possible at the moment.
Logged
-Craig    MO 4Media remote and player:  Android/TV/Auto | iOS | Windows 10/UWP
Pages: [1]   Go Up