Currently played info to file

Post a reply

:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review

Expand view Topic review: Currently played info to file

Re: Currently played info to file

by PhanZero » Wed Apr 21, 2021 3:37 pm

Sorry, had no time to check back on my topic. Your script works great for what I need @TIV73 and if there's something more I might need in it, it'll be a good starting point for me. Thank you very much!

Re: Currently played info to file

by TIV73 » Wed Feb 17, 2021 11:57 am

I actually needed something vaguely similar for debugging reasons a while ago and still had it lying around, so I figured I could just freshen it up a little, add some of the requested features, and publish it.

The addon hooks into the event that fires whenever a track is changed, gets the details of that track and exports the track title, artist, and cover to their respective files in the specified export directory.

A word of warning - this is intended as starting point, not as end-user ready addon. I tested it locally and it worked as advertised, but there's only the bare minimum of polish and error handling, so you might need to further customize and/or troubleshoot it if it doesn't work for you. With that out of the way, you can get the addon here.

Re: Currently played info to file

by drakinite » Sun Feb 14, 2021 11:30 pm

I admittedly haven't used the VBS2JS tool myself, so I'm not sure how well the converted code will work. But try this:

Create a file "init.js", and in it put:

Code: Select all

localRequirejs('<NAME OF YOUR OTHER JS FILE>');
So if your other js file is called "myScript.js", it'll be:

Code: Select all

MM automatically searches for init.js in your addon, so init.js will automatically run. The "localRequirejs" command will invoke your other script; and the "requirejs('actions')" is standard as actions.js initializes the majority of MM5 code.

Currently played info to file

by PhanZero » Sun Feb 14, 2021 6:19 pm

I have written myself a little script for MM4 to output some information from the currently played track to files - artist, title and cover art. I converted that script with that VBS2JS tool, but have no idea how to add it to MM5. I created a info.json file and made a zip file with these, renamed it to .mmip and imported it. You might have already guessed it: It installed, but it's not working. Probably it's the file name or the conversion, I really don't know. See, I'm not a programmer, I did this script with a lot of trial & error and it's not perfect, but it worked. Now what do I do to get it to run in MM5?

It's really a deal breaker with MM5...