View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006412 | MMW v4 | Framework: Scripts/Extensions | public | 2010-07-10 00:22 | 2015-02-05 15:13 |
Reporter | Bex | Assigned To | |||
Priority | high | Severity | feature | Reproducibility | N/A |
Status | assigned | Resolution | reopened | ||
Product Version | 3.2.1 | ||||
Target Version | 4.0.7 | Fixed in Version | 4.0 | ||
Summary | 0006412: Scripting: Implement function GetAutoPlaylistQuery | ||||
Description | It would be nice if scripters could retrieve the SQL's WHERE part from an AutoPlaylist. It has been requested before and there are many scripts which would benefit from it. Something like: Function SDB.Database.GetAutoPlaylistQuery(ID As Integer) As String Where ID is the internal number of the AutoPlaylist. It should work exactly like GetFilterQuery works: http://www.mediamonkey.com/wiki/index.php/ISDBDatabase::GetFilterQuery | ||||
Steps To Reproduce | Related to: http://www.mediamonkey.com/forum/viewtopic.php?f=19&t=53221 | ||||
Tags | No tags attached. | ||||
Fixed in build | 1345 | ||||
|
Assigned to you regarding Forum topic you replied in |
|
This would be nice to add to MM 4.0. I'd make it a SDBPlaylist object property. |
|
I think you misunderstand meaning of GetAutoPlaylistQuery which mean retrieve SQL query of AutoPlaylist not AutoPlaylist content. We are already able to do that using http://www.mediamonkey.com/wiki/index.php/SDBPlaylists and http://www.mediamonkey.com/wiki/index.php/ISDBApplication::PlaylistByTitle which return http://www.mediamonkey.com/wiki/index.php/SDBPlaylist feature you are talking about would be http://www.mediamonkey.com/wiki/index.php/ISDBApplication::PlaylistByID which would be same as http://www.mediamonkey.com/wiki/index.php/ISDBApplication::PlaylistByTitle but instead of String Parameter Playlist ID would be used. |
|
Ok, we might need ISDBApplication::PlaylistByID method as well, but what I wanted to say is that GetAutoPlaylistQuery shouldn't be Application or Database objects property, it should be directly Playlist property. |
|
You are right. GetPlaylistQuery should be part of Playlist property. It should be easy to return SQL query for both Static and Auto-Playlists. Using that SQL in http://www.mediamonkey.com/wiki/index.php/SDBDatabase it would be easy to retrieve all needed info. |
|
Fixed in build 1345: http://www.mediamonkey.com/wiki/index.php/ISDBDatabase::GetAutoPlaylistQuery |
|
Verified 1349 Wiki Source example added to http://www.mediamonkey.com/wiki/index.php/ISDBDatabase::GetAutoPlaylistQuery |
|
Before we close it I wonder if we should add that function work also for Static Playlists? |
|
In case ID is Static Playlist result should be something like: SELECT songs.* FROM Playlists INNER JOIN PlaylistSongs ON PlaylistSongs.IDPlaylist = Playlists.IDPlaylist INNER JOIN Songs ON Songs.ID = PlaylistSongs.IDSong WHERE Playlists.IDPlaylist = <ID Parameter> |