[REQ] Is there a way to have MM5 export playlists on exit/schedule/automate export?

Get help for different MediaMonkey 5 Addons.

Moderators: jiri, drakinite, Addon Administrators

F1nchy
Posts: 104
Joined: Sat Jan 14, 2012 8:08 am

[REQ] Is there a way to have MM5 export playlists on exit/schedule/automate export?

Post by F1nchy »

There used to be an addon for MM4 that let you export playlists on exiting MM or by schedule. Is there a similar one for MM5, or another way of doing it?

I use playlists from MM with my Sonos system, but since upgrading to MM5 I'm having to manually export playlists periodically and copy them to a folder that Sonos can see. I use smart playlists to keep them fresh (I hate listening to the same songs too often!) and it would be useful to have some way of automating it again.

Thought I'd ask! Thanks
Lowlander
Posts: 56574
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Re: Is there a way to have MM5 export playlists on exit/schedule/automate export?

Post by Lowlander »

No such Addon exists for MediaMonkey 5 at this time.
F1nchy
Posts: 104
Joined: Sat Jan 14, 2012 8:08 am

Re: Is there a way to have MM5 export playlists on exit/schedule/automate export?

Post by F1nchy »

OK
monkeyfan1970
Posts: 142
Joined: Wed Sep 07, 2011 11:08 pm

Re: Is there a way to have MM5 export playlists on exit/schedule/automate export?

Post by monkeyfan1970 »

Yeap! This is one of the major reason why I still have MM4 installed on my computer. We need the ability to auto export playlist on exit or schedule.

Please add this function.
drakinite
Posts: 965
Joined: Tue May 12, 2020 10:06 am
Contact:

Re: [REQ] Is there a way to have MM5 export playlists on exit/schedule/automate export?

Post by drakinite »

FYI for any developers looking to add this:

There is a way to run JS code on the app exit that has not yet been documented. We have closequery event on thisWindow object. So you can use something like

Code: Select all

app.listen(thisWindow, 'closequery', function (token) {
	// Do your save action, then:
	token.resolved();
});
If you need to do something asynchronously, then you need to set token.asyncResult = true, like this:

Code: Select all

app.listen(thisWindow, 'closequery', function (token) {
	token.asyncResult = true;
	// Do your asynchronous save action, then:
	myFunctionWithCallback(function () {
		token.resolved();
	});
});
Image
Student electrical-computer engineer, web programmer, part-time MediaMonkey developer, full-time MediaMonkey enthusiast
I uploaded many addons to MM's addon page, but not all of those were created by me. "By drakinite, Submitted by drakinite" means I made it on my own time. "By Ventis Media, Inc., Submitted by drakinite" means it may have been made by me or another MediaMonkey developer, so instead of crediting/thanking me, please thank the team. You can still ask me for support on any of our addons.
F1nchy
Posts: 104
Joined: Sat Jan 14, 2012 8:08 am

Re: [REQ] Is there a way to have MM5 export playlists on exit/schedule/automate export?

Post by F1nchy »

If anyone was able to implement this I would be extremely grateful.
Ludek
Posts: 4959
Joined: Fri Mar 09, 2007 9:00 am

Re: [REQ] Is there a way to have MM5 export playlists on exit/schedule/automate export?

Post by Ludek »

It should be quite easy: Just a conjunction of the Drakinite's code example above and the code in /scripts/exportPlaylists/actions_add.js
+ add a config for the export folder.

Assuming that auto-performing the menu File > Export > Playlists... on MM5 closing is what you are asking for, am I right?
F1nchy
Posts: 104
Joined: Sat Jan 14, 2012 8:08 am

Re: [REQ] Is there a way to have MM5 export playlists on exit/schedule/automate export?

Post by F1nchy »

Hi Ludek

Yes, pretty much exactly that. Ideally I'd like to be able to specify which playlists are exported, but I'd be satisifed if it can just do them all on Exit in the way you say (as I can use a copy program to only copy over specific ones to a Sonos viewable folder).

I guess it would just need an option to specify as to where you want the automatically exported playlists, whether as an option in the settings or in the config file (ideally the former!)

That would be great, thanks.
Ludek
Posts: 4959
Joined: Fri Mar 09, 2007 9:00 am

Re: [REQ] Is there a way to have MM5 export playlists on exit/schedule/automate export?

Post by Ludek »

Yes, the config for the export location is needed.
And also the ability to specify which playlists to export as I suppose that exporting all playlists on every close could take significant amount of time.
F1nchy
Posts: 104
Joined: Sat Jan 14, 2012 8:08 am

Re: [REQ] Is there a way to have MM5 export playlists on exit/schedule/automate export?

Post by F1nchy »

That's fine, I can see how that would need a lot more, having all playlists exporting to a specified path everytime it exits would be fantastic. From testing by running the export a few times it looks like it just overwrites old with new so I can easily set up a copy program to copy over specified playlists to another folder for Sonos.

I use smart playlists to keep my playlists fresh (I hate hearing the same songs over, which Spotify does all the time!) and I use BarryM's AlbumPlays app to pull all Lastfm scrobbles back into MM5, so however I listen it ends up recorded back to MM5, so if I can get the playlists auto exporting that'll keep the playlists in my Sonos fresh as well. No issue doing it from the config as long as it's explained clearly to me! :)

Thanks, really appreciate you looking at this!
Ludek
Posts: 4959
Joined: Fri Mar 09, 2007 9:00 am

Re: [REQ] Is there a way to have MM5 export playlists on exit/schedule/automate export?

Post by Ludek »

BTW: I wonder whether doing the export automatically on each close of MM5 is really desirable?? It is rather annoying IMO (if you want just close MM5 quickly (or turn off PC).

Isn't it better to add e.g. a toolbar button that would start the export to pre-configured location?
F1nchy
Posts: 104
Joined: Sat Jan 14, 2012 8:08 am

Re: [REQ] Is there a way to have MM5 export playlists on exit/schedule/automate export?

Post by F1nchy »

It might be for some but not for me. It only takes a minute and I have to close MM before running the AlbumPlays app to sync over play counts from LastFM. I don't have MM5 set to rescan for new music on restart (I do that manually) so personally I would prefer the option to have it auto export.
IanRTaylorUK
Posts: 539
Joined: Fri Dec 27, 2019 4:41 pm

Re: [REQ] Is there a way to have MM5 export playlists on exit/schedule/automate export?

Post by IanRTaylorUK »

Good point Ludek,

The MMW4 add-on http://solair.eunet.rs/~zvezdand/Export ... desNew.htm has the option to set automatic export of playlists:
1). On Startup
2). On shutdown
3). At time intervals (looks like 2000min maximum)
4). When a playlist is added or modified

It also allows the location to be specified and allows for the path to be changed for each file. Therefore you can use it to export playlists from MMW4 in a relative format to the location that MMW5 automatically reads by rescanning.

Since a MMW5 license allows you to use MMW4, you could just manage the playlists in MMW4 and let this add-on export on exit so that when you open MMW5 any changes in the playlist get scanned / imported into MMW5.

I would recommend that users consider this approach and support the above addon as this might encourage this functionality to be ported to MMW5.
Ian Taylor
F1nchy
Posts: 104
Joined: Sat Jan 14, 2012 8:08 am

Re: [REQ] Is there a way to have MM5 export playlists on exit/schedule/automate export?

Post by F1nchy »

Hi Ian

That won't really work for me. I'd have to re-import my MM5 DB into MM4 each time. My playlists do not stay static, they change all the time. They are smart playlists and all update with the oldest played tracks, so whenever tracks are played they should drop off playlists.

When I listen via MediaMonkey Audio my plays scrobble to Last.fm via Simple Lastfm.
When I listen via Sonos I scrobble via Barrys 3rd party app, AlbumPlays (as it gives me complete control over what I want and what I don't scrobbled to my LFM account - I have a 4 year old daughter!)
When I listen to Radio Six Music I use Universal Scrobbler to scrobble songs I've listened to
If I'm listening to a radio station that does not work with Universal Scrobbler I use Finale on my Android Phone - this can be set to just listen and scrobble all tracks it hears.

So that gets pretty much everything I listen to and want listing into Last.fm. From there, AlbumPlays pulls all new scrobbles back into MM5, so all of those plays go back into MM5 (assuming they are in my MM5 DB, otherwise they are ignored by AlbumPlays). Doing that updates all those playlists and removes the tracks I've just listened to with fresh ones. That's why I want to be able to easily and regularly export those playlists, as they change everytime I sync it all up, which can be daily or a number of times a day - I also regularly rate tracks in MMA to help manage my smart playlists so like to sync those up regularly if I'm rating a lot that day. I've rated tracks since I had a Gen 3 iPod probably 18 years ago and it lets me create some very flexible and useful smart playlists!

As I mentioned, I really dislike hearing the same track regularly, and this method works for me. A track can be on my running playlist, a general genre playlist, etc, but once it's played on any playlist it'll still drop off the others because they're set to the oldest unplayed tracks.

It might sound complicated/convoluted but it works really well for me. I have Spotify but it drives me crazy that even on playlists with hundreds of tracks it still seems to always play the same ones much more - it's pretty rubbish for that!
IanRTaylorUK
Posts: 539
Joined: Fri Dec 27, 2019 4:41 pm

Re: [REQ] Is there a way to have MM5 export playlists on exit/schedule/automate export?

Post by IanRTaylorUK »

Hi,

Sounds like you would benefit from the Export M3U add-on in MMW4 being updated to MMW5.
Ian Taylor
Post Reply