tuc;663257 Wrote: 
> 
> As far as I can see TrackStat (or some other plugin) would have to save
> data about active playlists at the time a playlist is deleted (in the
> sense I described above). This information would be: TrackID and Track
> order. I have no idea of how to implement this with the DB-info in SBS.
> Also, I don't know if it is possible to store data at the time an active
> playlist is deleted.
> To me it seems to be not so easy, but I'd love the functionality :-)
> 
I think the implementation process for something like this would
basically be to:
1. When a track is added/removed from the current playlist, copy it to
a separate database table.
2. When the playlist is deleted, don't do anything (we have already
saved the playlist in point 1)
3. When the playlist is replaced by another playlist, don't do anything
with the previous playlist as it's already saved in point 1, but do also
store the new playlist as a separate copy in the same table.

As far as I know it's not possible to execute anything when a delete
command is executed, the plugin code would execute after the delete
command and this would obviously be too late. Possibly it could be
possible to override the delete command in a plugin to make it possible
to execute some code and then forward the delete command to SBS. The
issue is just that doing things like that tends to break with every new
SBS release because you are really messing around with internal details
of SBS instead of using an API.

However, there is a risk something like this would make the system
rather sluggish because sometimes a lot of tracks are added track by
tracks and that would result in a lot of executions in point 1 in the
above description.

It would probably be possible to do something simpler if only focusing
on remembering saved playlists and ignore the undo scenario. The
question is just what most people are looking for, so far there seems
to be a lot more requests related to party mode to avoid accidental
deletion of current playlist than requests related to view playlist
history. For party mode I think using iPeng or SqueezePad is a lot
better solution for most people and they work already today.


-- 
erland

Erland Isaksson ('My homepage' (http://erland.isaksson.info))
(Developer of 'many plugins/applets (both free and commercial)'
(http://wiki.slimdevices.com/index.php/User:Erland). If my answer
helped you and you like to encourage future presence on this forum
and/or third party plugin/applet development, 'donations are always
appreciated' (http://erland.isaksson.info/donate))
Interested in music discovery ? See 'Social Music Discovery (SMD)'
(http://forums.slimdevices.com/showthread.php?p=656713) project.
------------------------------------------------------------------------
erland's Profile: http://forums.slimdevices.com/member.php?userid=3124
View this thread: http://forums.slimdevices.com/showthread.php?t=49483

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to