A smart playlist stores a query instead of a list of files. The Player runs the query
against its library each time and plays what it finds. The query lives in a
smartPlaylist element inside the seq of the
file structure.
smartPlaylist
The dynamic part of the playlist. Parent: seq. Children:
querySet and optionally filter.
| Attribute | Required | Value | Meaning |
|---|---|---|---|
version | yes | 1.0.0.0 | The version of the smart playlist schema. |
<smartPlaylist version="1.0.0.0">
<querySet>
<sourceFilter type="smartFilterObject"
id="{4202947A-A563-4B05-A754-A1B4B5989849}"
name="Music in my library">
<fragment name="Genre">
<argument name="condition">Is</argument>
<argument name="value">Rock</argument>
</fragment>
</sourceFilter>
</querySet>
<filter type="smartFilterObject"
id="{BC5E21B0-504C-46F6-82BF-FB975C911AD6}"
name="Microsoft Auto Playlist Filter -- Limits auto playlists by count, size or duration">
<fragment name="Limit Number of Items">
<argument name="number">25</argument>
</fragment>
</filter>
</smartPlaylist>
querySet
Says which items to select from the library, whatever the size of the result. No
attributes. Parent: smartPlaylist. Child: sourceFilter.
sourceFilter
A filter object that selects items from one part of the library. Parent:
querySet. Child: fragment.
| Attribute | Required | Value | Meaning |
|---|---|---|---|
type | no | string | The type of filter object. No values are predefined; Microsoft’s examples use smartFilterObject. |
id | yes | WPL_GUID | The filter object. Its methods interpret the fragment elements. |
name | yes | string | The filter object’s name. |
id | name | Selects from |
|---|---|---|
{4202947A-A563-4B05-A754-A1B4B5989849} | Music in my library | Music in the user’s library |
{B2D9BDDC-8E49-444B-9BA4-193ABF9C7870} | Video in my library | Video in the user’s library |
{CC823400-A8E4-4081-B073-D3B6D952FE69} | Pictures in my library | Photos in the user’s library |
{E5415A66-7763-4BDE-B97F-5557CA73C303} | TV shows in my library | TV items in the user’s library |
One of Microsoft’s examples uses the name
Windows Media Local Music Library Filter with the music GUID.
filter
Limits the result: it removes content the sourceFilter chose, and adds
nothing. Parent: smartPlaylist. Child: fragment.
| Attribute | Required | Value | Meaning |
|---|---|---|---|
type | no | string | The type of filter object. No values are predefined. |
id | yes | {BC5E21B0-504C-46F6-82BF-FB975C911AD6} | The only filter object Microsoft documents. |
name | yes | Microsoft Auto Playlist Filter -- Limits auto playlists by count, size or duration | The name of that filter object. |
fragment
One condition. Parents: sourceFilter, filter. Child:
argument.
| Attribute | Required | Value | Meaning |
|---|---|---|---|
name | yes | one of the names below | The metadata attribute or limiter the condition is about. |
Conditions are written as a condition string in parts: “Album Artist Is Joe” has
the name Album Artist, the condition Is and the value
Joe.
argument
One portion of a condition string. Its text is the value of that portion. Parent:
fragment. No children.
| Attribute | Required | Value | Holds |
|---|---|---|---|
name | yes | Condition | The condition portion. |
Value | The value portion. | ||
Format | The unit for a size or duration limit. | ||
Number | A number for a limit. |
Microsoft writes these names in both capitalised and lower-case forms across its
examples (Condition and condition).
The conditions it lists are: Equals, Does Not Equal,
Contains, Does Not Contain, Is Less Than,
Is Greater Than, Is, Is Not,
Is Before, Is Later Than, Is More Recent Than,
Above, Below, Ascending,
Descending, Random, Is At Least and
Is No More Than. The fragment page additionally uses
Is After, Older Than and More Recent Than.
Condition fragments
A fragment naming a media attribute holds two arguments: a condition
and a value.
<fragment name="Album Artist">
<argument name="Condition">Is</argument>
<argument name="Value">Joe</argument>
</fragment>
The next table gives every metadata attribute, the conditions it accepts and the values it accepts.
| Attribute name | Conditions | Values |
|---|---|---|
| Actor, Album Artist, Album Title, Author, Caption, Channel, Composer, Conductor, Content Provider, Content Provider Genre, Contributing Artist, Copyright Text, Director, Episode, File Type, Genre, Key, Keywords, Language, Mood, Parental Rating, Period, Producer, Provider, Publisher, Series, Station name, Subgenre, Subtitle, Title, Writer | Equals, Does Not Equal, Is, Is Not, Contains, Does Not Contain | Any string |
| Bit Rate (in kilobytes per second) | Equals, Does Not Equal, Is, Is Not, Contains, Does Not Contain | 48, 64, 96, 128, 160, 192, 256, 300, 500, 750, 1000, 1500, 3000, 4500, 6000, 7500 |
| Secondary Media Type | Equals, Does Not Equal, Is, Is Not, Contains, Does Not Contain | Audio: News; Audio: Talk Show; Audio: Audio Books; Audio: Audio Spoken Word; Video: News; Video: Talk Show; Video: Home Video; Video: Movie / Film; Video: TV show; Video: Corporate Video; Video: Music Video |
| File Size (in KB), Image height, Image width, Play Count : Afternoon Totals, Play Count : Evening Totals, Play Count : Morning Totals, Play Count : Night Totals, Play Count : Total Overall, Play Count : Total Weekday, Play Count : Total Weekend | Is Less Than, Is Greater Than, Is, Is Not | Any number |
| Broadcast time, Date Encoded, Date Recorded, Date taken, Release Year | Is Before, Is After, Is, Is Not | Yesterday, Last week, Last month, 6 months, 1 year, 2 years, 5 years, 2000s, 1990s, 1980s, 1970s, 1960s, 1950s, 1940s |
| Date Added | Is Before, Is After, Is, Is Not | Yesterday, Last week, Last month, 6 months, 1 year, 2 years, 5 years |
| Date Last Played | Older Than, More Recent Than, Is, Is Not | Yesterday, Last week, Last month, 6 months, 1 year, 2 years, 5 years |
| Month taken | Is Before, Is More Recent Than, Is, Is Not | 1 to 12 (Microsoft’s page also lists 13) |
| Year taken | Is Before, Is More Recent Than, Is, Is Not | Any year |
| Auto Rating, My Rating | Is At Least, Is No More Than, Is, Is Not | Unrated, 1 Star, 2 Stars, 3 Stars, 4 Stars, 5 Stars |
| Custom Field #1, Custom Field #2, File Name, Key Fields | Contains, Does Not Contain | Any string |
| Protection | Is, Is Not | No value; the fragment holds only a condition, as in “Protection Is present” |
Limits
Fragments that limit the size of the playlist belong in a filter.
| Fragment name | Arguments | Values |
|---|---|---|
| Limit Total Size To | Number, Format | Any number; Kilobytes, Megabytes or Gigabytes |
| Limit Total Duration To | Number, Format | Any number; Seconds, Minutes, Hours or Days |
| Limit Number of Items | Number | Any number |
<fragment name="Limit Total Size To">
<argument name="Format">Megabytes</argument>
<argument name="Number">5</argument>
</fragment>
<fragment name="Limit Total Duration To">
<argument name="Format">Minutes</argument>
<argument name="Number">20</argument>
</fragment>
<fragment name="Limit Number of Items">
<argument name="Number">15</argument>
</fragment>
Playback order
A fragment named Randomize Playback Order holds no arguments and plays
the list in random order.
A fragment named Sort By holds a Value argument, which is
the attribute to sort on, and a Condition argument, which is
Ascending, Descending or Random.
<fragment name="Sort By">
<argument name="value">Title</argument>
<argument name="condition">Ascending</argument>
</fragment>
Sorting must use an attribute that applies to the items being sorted. Music cannot
be sorted by Actor, for example.
| Media type | Attributes that can be sorted on |
|---|---|
| Music | Genre, Title, Date Added, Auto Rating, My Rating, Play Count : Total Overall, Play Count : Morning Totals, Play Count : Afternoon Totals, Play Count : Evening Totals, Play Count : Night Totals, Play Count : Total Weekday, Play Count : Total Weekend |
| Video or TV | Genre, Actor, Subtitle, Title, Date Added, Auto Rating, Station name, Channel, Broadcast time, Director, Release Year, Writer, Producer, Date Recorded, Date Encoded, Bit Rate, My Rating, Protection, Play Count : Total Overall, Play Count : Morning Totals, Play Count : Afternoon Totals, Play Count : Evening Totals, Play Count : Night Totals, Play Count : Total Weekday, Play Count : Total Weekend |
| Radio | Title, Date Added, Bit Rate |
| Photo | Title |
| Other | Genre, Title, Date Added, Auto Rating, My Rating, Bit Rate, Play Count : Total Overall, Play Count : Morning Totals, Play Count : Afternoon Totals, Play Count : Evening Totals, Play Count : Night Totals, Play Count : Total Weekday, Play Count : Total Weekend |