SmartPlaylists (1.1.4.7) (1 Viewer)

fabien44

Portal Pro
March 12, 2006
414
33
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.7
Release date : July, 2013
Author : fabien44
Contact : fabien44(at)hotmail.fr
License : GNU General Public License


Features
========
1.1.4.7
------
MP 1.4 compatible
1.1.4.6
------
- SmartPlaylists are now defined in MP configuration tool (no need to write them into a xml file)
1.1.4.5
------
- Support of Avalon & Avallonis skins
1.1.4.4
------
- MP 1.3.0a compatible
1.1.4.3
-------
- Black Glass & Black Glass Nova skin support
- Add 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 plugin config in Mediaportal configuration.
A smartplaylist is caracterised by a name and a query database, but only the "WHERE" clause must be defined.
All you need is to write the criteria of the where clause for each smartplaylist in the array of the configuration form.
ex:
name="30 random songs but no pop" criteria="strGenre != '| Pop |' ORDER BY RANDOM() LIMIT 30"
name="Only 20 songs of Indie Music" criteria="strGenre == '| Indie |' LIMIT 20"
name="30 random songs were added in the past 2 weeks" criteria="dateAdded >= date('now','-15 day') ORDER BY RANDOM() LIMIT 30"

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 "&lt;"

- Start MP, go to SmartPlaylists
- Select a smartplaylist
- You can add the generated playlist, run a previous smartplaylist thanks to history, 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


Thanks
======
d-fader for his GlobalSearch plugin. My code is based upon his work.
Trevor for his contribution
 
Last edited:

alteeffour

Portal Member
January 11, 2007
18
0
Home Country
Canada Canada
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
 

fabien44

Portal Pro
March 12, 2006
414
33
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
 

alteeffour

Portal Member
January 11, 2007
18
0
Home Country
Canada Canada
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>
 

fabien44

Portal Pro
March 12, 2006
414
33
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 "&lt;" (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
 

alteeffour

Portal Member
January 11, 2007
18
0
Home Country
Canada Canada
That worked. I added a where strGenre != '| Podcast |' to keep podcasts out.
Thank you
 

alteeffour

Portal Member
January 11, 2007
18
0
Home Country
Canada Canada
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
 

Users who are viewing this thread

Top Bottom