Imported Playlists Organization

Get answers about the current version of MediaMonkey 5

Moderator: Gurus

Dryst
Posts: 262
Joined: Sun Dec 19, 2021 7:27 am

Imported Playlists Organization

Post by Dryst »

There is a tree node to the left panel for all Imported Playlists. I have many Imported Playlists, but they all end up under this single tree node. To organize my layout, I created Playlists to group them under as follows:

https://www.dropbox.com/scl/fi/95k7jr54 ... hd4f0&dl=0

This took a few minutes to complete, and it helps to structure my playlists. What will happen when I need to delete all of these imported playlists to re-import them all when they later change? Is there a way I can automate where these imported playlists are stored similarly to my manual organization? I would rather not spend this time forever doing this each time.
Lowlander
Posts: 56919
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Re: Imported Playlists Organization

Post by Lowlander »

This is not possible. Imported Playlists will always end up in the Imported Playlists node.

It's best to use MediaMonkey to manage the Playlists and the content on it, and export if needed.
Dryst
Posts: 262
Joined: Sun Dec 19, 2021 7:27 am

Re: Imported Playlists Organization

Post by Dryst »

Hmm. I will check out the database to see if I can find away. The playlists all end up in the same Playlist table. I will check out the existing data to for the possibility of restoring this layout with UPDATE statements after the fact.
Dryst
Posts: 262
Joined: Sun Dec 19, 2021 7:27 am

Re: Imported Playlists Organization

Post by Dryst »

Looking at existing data in the database, this is very do-able and quite easy. The column ParentPlaylist of the table Playlists stores the IDPlaylist of what playlist the particular one is under. An ID of 6 indicates Imported Playlists. For my data, the ID needs to be one of the following:

1777 _Artists
1779 _Genres
1780 _Ratings

A simple change of the ParentPlaylist from 6 to one of the three while MMW5 is closed is all that is needed to automatically make this change.
Dryst
Posts: 262
Joined: Sun Dec 19, 2021 7:27 am

Re: Imported Playlists Organization

Post by Dryst »

I got it done, and it was very easy. Due to this open bug https://www.mediamonkey.com/forum/viewt ... p?t=106207, I deleted all imported playlists except for my three categories via SQL.

Here are my Imported Playlists after old playlist deletion and import of updated M3U8 files:

https://www.dropbox.com/scl/fi/b144o0uo ... oz6kc&dl=0

Here they are again after my SQL UPDATE statements:

https://www.dropbox.com/scl/fi/azo1wm56 ... e2b8t&dl=0

These were my steps if anyone else wishes to accomplish this task:

Code: Select all

-CLOSE MMW5
-DELETE ALL IMPORTED PLAYLISTS:
DELETE FROM PlaylistSongs WHERE IDPlaylist IN (1761, 1762, 1763, 1764, 1765, 1766, 1767, 1768, 1769, 1770, 1771, 1772, 1773, 1774, 1775, 1776)
DELETE FROM Playlists WHERE IDPlaylist IN (1761, 1762, 1763, 1764, 1765, 1766, 1767, 1768, 1769, 1770, 1771, 1772, 1773, 1774, 1775, 1776)

-OPEN MMW5
-CONFIRM IMPORTED PLAYLISTS ARE ALL DELETED EXCEPT FOR:  _Artists, _Genres, _Ratings
-IMPORT M3U8 files

-EXECUTE THREE UPDATE STATEMENTS TO ORGANIZE THE NEWLY IMPORTED PLAYLISTS:
IDPlaylist  PlaylistName
1777        _Artists
1779        _Genres
1780        _Ratings

UPDATE Playlists
  SET ParentPLaylist = 1777
WHERE IDPlaylist IN (
(SELECT IDPlaylist FROM Playlists WHERE PlaylistName = 'ESA'),
(SELECT IDPlaylist FROM Playlists WHERE PlaylistName = 'Fixions'),
(SELECT IDPlaylist FROM Playlists WHERE PlaylistName = 'Infected Mushroom'),
(SELECT IDPlaylist FROM Playlists WHERE PlaylistName = 'Joe Sample'), 
(SELECT IDPlaylist FROM Playlists WHERE PlaylistName = 'Kumi Koda'),
(SELECT IDPlaylist FROM Playlists WHERE PlaylistName = 'Prince'),
(SELECT IDPlaylist FROM Playlists WHERE PlaylistName = 'Wes Montgomery'))


UPDATE Playlists
  SET ParentPLaylist = 1779
WHERE IDPlaylist IN (
(SELECT IDPlaylist FROM Playlists WHERE PlaylistName = 'Electronica'),
(SELECT IDPlaylist FROM Playlists WHERE PlaylistName = 'Jazz'),
(SELECT IDPlaylist FROM Playlists WHERE PlaylistName = 'R&B,Pop,Rock,Metal'))


UPDATE Playlists
  SET ParentPLaylist = 1780
WHERE IDPlaylist IN (
(SELECT IDPlaylist FROM Playlists WHERE PlaylistName = 'Rating1'),
(SELECT IDPlaylist FROM Playlists WHERE PlaylistName = 'Rating2'),
(SELECT IDPlaylist FROM Playlists WHERE PlaylistName = 'Rating3'),
(SELECT IDPlaylist FROM Playlists WHERE PlaylistName = 'Rating4'),
(SELECT IDPlaylist FROM Playlists WHERE PlaylistName = 'Rating5'))
IanRTaylorUK
Posts: 547
Joined: Fri Dec 27, 2019 4:41 pm

Re: Imported Playlists Organization

Post by IanRTaylorUK »

Not certain if this helps with your specific use case.

I tend to use Drag and Drop with multi-select to organise my "imported" playlists leaving behind those I do not want.

I then just delete the imported playlist node to remove those not wanted. The node is recreated next time there are M3Us to import.

Probably about once a month, I export ALL the Playlists to a folder and move files from that folder to another called Archive Playlists if the "date modified" is old. In this way I keep a back-up of All my Playlists.

A little issue is that if you have hierarchical Playlists e.g.
10cc
--->Sheet Music
--->The Very Best of 10cc
then you loose this hierarchy if you have to restore (import from the backup). Can get a little tedious if you have a few Album Artists with 10 or so Albums!
Ian Taylor
Post Reply