MEDIAPORTAL - Download SmartPlaylists plugin SmartPlaylists ============== This plugin allows you to create and execute smart playlists linked to your music collection. A smart playlist is a playlist generated with a custom database query. Once created, this playlist can be played in the music module of MP. This plugin is based on the GlobalSearch plugin made by d-fader. Summary ======= Project name : SmartPlaylists Type : MediaPortal Window plugin Version : 1.1.4.3 Release date : May1, 2012 Author : fabien44 Contact : fabien44(at)hotmail.fr License : GNU General Public License Features ======== 1.1.4.3 ------- - Black Glass & Black Glass Nova skin support - Display thumbnail when selecting song 1.1.4.2 ------ - Default skins are now well displayed - thumbnails are now well displayed 1.1.4.1 -------- - Bugs with Playing now 1.1.4 ------ - MP 1.2.1 compatible 1.1.3 ------ - MP 1.2.0 Beta compatible 1.1.2 ------ - Skin for StreamedMP - Bug with history time duration solved 1.1.1 ------ - 'Add all to playlist' sends back to the playlist window - Display of number of tracks found - No more song details consultation feature - Play song with key enter pressed - Bug of display total runtime corrected - Display of number of tracks found - No more thumbnail album displayed 1.1.0 ------ - History and display of last 10 playlists generated - Context menu for every song - Add album to Playlist - Add all artist's songs to playlist 1.0.1 ------ - Some GUI and skins improvements (made by Trevor) 1.0.0 ------ - Define smartplaylists in a XML file - Select, execute and play a smartplaylist defined in the XML file How it works ============= - First you have to define the smartplaylists you want to play in the SmartPlaylistsQueries.xml. A smartplaylist is caracterised by a name and a query database, but only the "WHERE" clause must be defined. ex: <?xml version="1.0" encoding="utf-8"?> <rootElement> <smartPlaylist name="30 random songs but no pop" query="WHERE strGenre != '| Pop |' ORDER BY RANDOM() LIMIT 30"></smartPlaylist> <smartPlaylist name="Only 20 songs of Indie Music" query="WHERE strGenre == '| Indie |' LIMIT 20"></smartPlaylist> <smartPlaylist name="30 random songs were added in the past 2 weeks" query="WHERE dateAdded >= date('now','-15 day') ORDER BY RANDOM() LIMIT 30"></smartPlaylist> </rootElement> Be careful with the criteria of the clause, every fields must be surround with symbol |. Furthermore, if you want to compare a field with symbol "<", XML cannot accept it. You must replace it by "<" - Then enable the plugin in the configuration tool of MP - Start MP, go to SmartPlaylists - Select a smartplaylist - You can add the generated playlist, jump to my music or jump to the current playing song Notice: if only 1 smartplaylist is defined then the selection takes it and executes it automatically Installation Instructions ========================= Manual ------ - Shutdown MediaPortal - Copy the plugins files (dll & xml files) into the plugins/windows directory and the skin xml into the skin directory to your MediaPortal directory (e.g.: c:\Program Files\Team-MediaPortal\MediaPortal). - Start MediaPortal Thanks ====== d-fader for his GlobalSearch plugin. My code is based upon his work. Trevor for his contribution
I've alweays wanted a smartplaylist for MP thank you any chance you could provide a sample for the dateAdded condition so that it plays 30 random songs that were added in the past 2 weeks? Thank you for the great plugin
You should test this entry: <smartPlaylist name="30 random songs were added in the past 2 weeks" query="WHERE dateAdded >= date('now','-15 day') ORDER BY RANDOM() LIMIT 30"></smartPlaylist> Tell me if it works. Fabien
Here's my file. If I remove the new playlist it displays the list of playlists, but if I add the playlists it wont display the playlsts. <?xml version="1.0" encoding="utf-8"?> <rootElement> <smartPlaylist name="30 random songs but no pop" query="WHERE strGenre != '| Pop |' ORDER BY RANDOM() LIMIT 30"></smartPlaylist> <smartPlaylist name="Only 20 songs of Indie Music" query="WHERE strGenre == '| Indie |' LIMIT 20"></smartPlaylist> <smartPlaylist name="30 new random songs" query="WHERE dateAdded < '1 week' ORDER BY RANDOM() LIMIT 30"></smartPlaylist> <smartPlaylist name="30 random songs were added in the past 2 weeks" query="WHERE dateAdded >= date('now','-15 day') ORDER BY RANDOM() LIMIT 30"></smartPlaylist> </rootElement>
Hi, i see the problem, it's the 3rd playlist: <smartPlaylist name="30 new random songs" query="WHERE dateAdded < '1 week' ORDER BY RANDOM() LIMIT 30"></smartPlaylist> 2 errors: - Syntax error: You should replace comparator symbol "<" by "<" (as mentioned in the first post) - the query cannot work because the clause "dateAdded < '1 week' " does mean nothing. What do you want to do? 1 week from now -> Added in the last week? If it's the case you should write 'dateAdded >= date('now','-7 day')' I hope it helps, Fabien
What about a playlist for music that was released in the current year? I'm assuming you could use the iYear right? I tried <smartPlaylist name="30 random songs of 2008 added in the past 2 weeks" query="WHERE iYear == '| 2008 |'AND strGenre != '| Podcast |' ORDER BY RANDOM() LIMIT 30"></smartPlaylist> but it says to check my query because nothing was found