Hi Scott, I started implementing deletion of playlists but the infrastructure code is missing the "hooks" for handling playlists as a whole.
There is a hook to handle files and there is a hook to handle playlist elements but the outer frames for playlists and smartplaylists are copied more or less bindly to the output data structures when reading the GNUtunesDB.xml file. To do it right, I would have to rewrite the event handler in XMLHelper.pm and I don't feel like opening that can of worms. What I did instead was to add a check in XMLHelper that will prevent empty playlists from being written and some code in gnupod_delete that will prevent playlist elements from being added to playlists that you want to delete. The result is pretty much the same for most cases but slightly different for some special cases. E.g. when only deleting a file you might produce an empty playlist that will be dropped automatically. On Thu, Mar 26, 2009 at 07:24:27PM -0400, Scott Talbert wrote: > >> In a second step we could have an additionl "--with-files" option that >> would only work in conjunction with "--playlist" and that would also >> remove the files from that playlist. That one could take additional >> arguments to further filter the files that are to be deleted. > > That sounds cool. I'll try to get there but probably only after easter. >> Maybe a default behaviour of only asking when more than 10(20?) songs are >> to be deleted and both --force and --interactive to allow full control? > That sounds reasonable. After easter.... cheers -henrik _______________________________________________ Bug-gnupod mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/bug-gnupod

