Deleted Playlists remain in Track's Properties

Get answers about using MediaMonkey 4 for Windows.

Moderator: Gurus

pkw115
Posts: 101
Joined: Fri Jan 16, 2009 12:10 am

Deleted Playlists remain in Track's Properties

Post by pkw115 »

I am having a problem with playlists that have been deleted still showing up in the track's properties. I have had to delete and import my playlists several times and now have several entries for the same playlist title listed in the track's properties. These entries show in Track Properties, Classification, Playlists:. There are three check boxes with the same playlist name, however the playlist only shows up once in the tree under imported playlists.

I also have entries in track properties showing as check boxes for playlists that have simply been deleted, have not been reimported and do not show at all in the tree under imported playlists.

The duplicate and deleted entries are also shown in the playlist listing in MonkeyRok, while Playlist Panel is not showing duplicate entries but it does show deleted entries. Finally, Playlist in Main Window is showing both duplicate and deleted entries.

It seems that deletion of the playlists is not being recognized and that the list in Track Properties, Classification, Playlists: simply grows each time a new playlist is added, even if it has the same name as a deleted list, but does not shrink when one is deleted. The deletions were done by deleting the imported playlists parent entry from the tree view. I would have thought deleting a playlist from MM would have deleted references to it in the track properties, but perhaps I have overlooked something obvious in this regard. File Monitor is activated. I have tried rescanning all my tracks, including the playlists, and optimize database, both quick and complete, to no avail.

Any advice as to how to get my tracks to reflect only the playlists currently listed in the tree as imported playlists and without duplicate entries and deleted entries would be greatly appreciated as I have too many playlists and tracks to attempt to fix this manually. Thanks is advance for any suggestions.
Ludek
Posts: 5114
Joined: Fri Mar 09, 2007 9:00 am

Re: Deleted Playlists remain in Track's Properties

Post by Ludek »

I cannot reproduce your trouble.

For me the playlists are always removed from the Properties -> Classification -> Playlists tab too.
It actually gets it from the same table from DB so I don't see a reason why it doesn't work for you.

Which version of MM you are running (3.2.0.1294??)
If not then update to 3.2.0.1294 and re-test.
Thx.
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: Deleted Playlists remain in Track's Properties

Post by nynaevelan »

pkw115 wrote: Any advice as to how to get my tracks to reflect only the playlists currently listed in the tree as imported playlists and without duplicate entries and deleted entries would be greatly appreciated as I have too many playlists and tracks to attempt to fix this manually. Thanks is advance for any suggestions.
Bex's Playlist in Main Window script has a feature to cleanup up playlist orphans. If you also scroll through the SQL Viewer forum topic, there is an sql statement that will cleanup your playlist orphans.
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
pkw115
Posts: 101
Joined: Fri Jan 16, 2009 12:10 am

Re: Deleted Playlists remain in Track's Properties

Post by pkw115 »

@Ludek Thanks for the response. I am running the most current version of MM. Upon further testing on two different databases, the trouble seems to stem from MM not closing properly or having to be terminated through Task Manager in a session in which I tried to delete a lot of playlists. If this occurs it appears that the playlists are deleted from the tree but remain in the track's properties. If I click on the ghost entries, MM locks up and must be termiated by Task Manager. The ghost entries could be deleted one at a time by unchecking the boxes in the track's properties, but that was not a workable solution.

@nynaelvan Thanks for the response. I use Bex's Playlist in Main Window script and its clean up utility was not able remove the ghost entries, I believe this is because the ghost entries remain in the playlistsongs table but no longer show in the tree. I had discovered the SQL Viewer but had been a little intimidated by it and my utter lack of knowledge about SQL. I will review the topic to find the statement you refer to concering playlist orphans and give the Viewer a try when I have some time to devote to this. Perhaps I will be able to confirm my suspicions.

In the meantime, I believe that I have discovered a work around using ZvezdanD's Restore PlayHistory/DateAdded/Playlists script. It appears that if I clear my current library and rescan, I can restore my play stats, history and date added to the new library and reimport my static playlists, instead of restoring the old ones. This would appear to solve the ghost entries, but only works if the playlists were exported or stored outside of MM's db as is the case for my setup. I did not test the effect of using the restore playlists option in the Restore PlayHistory script to see if it restored cleanly or restored the ghosts. This is only a work around and does not solve the underlying problem of incomplete deletion of the playlists.

Thanks to you both for responding.
Ludek
Posts: 5114
Joined: Fri Mar 09, 2007 9:00 am

Re: Deleted Playlists remain in Track's Properties

Post by Ludek »

Ok, so the cause is this issue: http://www.ventismedia.com/mantis/view.php?id=6389 I have just entered into our bug tracking system to be fixed in a future version.
Thanks!
pkw115
Posts: 101
Joined: Fri Jan 16, 2009 12:10 am

Re: Deleted Playlists remain in Track's Properties

Post by pkw115 »

Thanks Ludek.
Owyn
Posts: 2018
Joined: Fri Mar 21, 2008 10:55 am
Location: Canada

Re: Deleted Playlists remain in Track's Properties

Post by Owyn »

This query will find any orphans

Code: Select all

select * from playlists where parentplaylist not in (select idplaylist from playlists) and parentplaylist > 0
and this query will clean them up

Code: Select all

delete from playlists where parentplaylist not in (select idplaylist from playlists) and parentplaylist > 0
Edit:
The process may take a bit of time if there are a lot of orphans. The deletes will also trigger the following automatic cleanups.

Code: Select all

CREATE TRIGGER delete_playlists DELETE ON Playlists
BEGIN
  DELETE FROM PlaylistSongs WHERE PlaylistSongs.IDPlaylist=old.IDPlaylist;
  DELETE FROM SynchPlaylist WHERE SynchPlaylist.IDPlaylist=old.IDPlaylist;
END
Cogito cogito ergo cogito sum. (Ambrose Bierce)
I drink therefore I am. (Monty Python)
Vista 32bit Home Premium SP2 / MM3.2.1.1297 Gold / Last.Fm 1.0.2.22 / IE8
Dell Inspiron 530 (1.8 Core2 / 2GB)
Skin: Vitreous Blue
Scripts: Add/Remove Playstat|Advanced Duplicate Find & Fix|Album Art Tagger|Backup|Batch Art Finder|Calculate Cover Size|Case&Leading Zero Fixer|DB_Audit|DB_Clean|DB_Schema|Event Logger|Genre Finder|Lyricator|Magic Nodes|MM2VLC|Monkey Rok|MusicIP Tagger|PUID Generator|RegExp Find & Replace|Right Click for Scripts|Scriptreloader|SQL Viewer|Stats(Filtered)|Tagging Inconsistencies
pkw115
Posts: 101
Joined: Fri Jan 16, 2009 12:10 am

Re: Deleted Playlists remain in Track's Properties

Post by pkw115 »

Many thanks Owyn, I'll give those a try.
pkw115
Posts: 101
Joined: Fri Jan 16, 2009 12:10 am

Re: Deleted Playlists remain in Track's Properties

Post by pkw115 »

@Owyn

Your SQL statements have cleared up my problems. Many thanks for taking the time to post them for me! I'm pretty sure I could not have come up with them on my own. Thanks again for helping out.
Post Reply