Skip to content

Dynamic Playlists - a plugin for Logitech Media Server that lets you play continuous music mixes based on selection criteria defined in so-called dynamic playlists.

License

Notifications You must be signed in to change notification settings

werdeil/lms-dynamicplaylists

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dynamic Playlists

This plugin1 lets you play continuous music mixes based on selection criteria defined in so-called dynamic playlists.
Dynamic Playlists will keep adding small batches of tracks in random order to your current playlist (complete albums can be added in album order). It comes with a collection of built-in, ready-to-use dynamic playlists to get you started. At some point you'll probably want to create a dynamic playlist that's tailored to your very specific needs because the built-in dynamic playlists cannot cover all possible use cases.

Some preferences are not enabled by default. Please take a look at the preferences and their descriptions on the plugin's settings page.

⬅️ Back to the list of all plugins

Requirements

  • LMS version >= 7.9
  • LMS database = SQLite


Installation

⚠️ Please read the FAQ before installing this plugin.

You should be able to install Dynamic Playlists from the LMS main repository (LMS plugin library):
LMS > Settings > Plugins.

If you want to test a new patch that hasn't made it into a release version yet or you need to install a previous version, you'll have to install the plugin manually.

It usually takes a few hours for a new release to be listed on the LMS plugin page.



Features:

  • Use your own custom dynamic playlist files/definitions directly in DPL without intermediary plugins - you don't have to install other plugins to get dynamic playlists. See FAQ.
  • Comes with more than 200 ready-to-use dynamic playlists (stand-alone + for context menus).
  • Multiple selection of genres, decades, years and static playlists
  • Preselect multiple artists or albums from their context menu at your leisure. DPL remembers your preselection so that you can easily use it later with dynamic playlists that use preselection.
  • Use LMS virtual libraries.
  • Save dynamic playlists with (user input) parameters to LMS favourites (see FAQ).
  • Create a Don't Stop the Music seed list and auto-start your DSTM mix.
  • New playlist parameters (see wiki).
  • New preference options (e.g. balanced shuffle) and UI changes.
  • Compatible with Custom Skip, Alternative Play Count and Dynamic Playlist Creator.
  • If you have installed the Alternative Play Count plugin, you will see some additional dynamic playlists that use the data from this plugin.
  • Use dynamic playlists to create static playlists




Context Menus

While the Dynamic Playlists menu in the LMS home menu is easy to find, its context menus can easily be overlooked. You'll find the Dynamic Playlists menus in the context menus for artists, albums, genres, years (for years and decades) and static playlists. Some of them are presented below.

Players with Jivlite UI (Touch, piCorePlayer, SqueezePlay, Radio)

Players with Jivlite UI (Touch, piCorePlayer, SqueezePlay, Radio)



LMS Web UI - Default Skin

LMS Web UI - Default Skin



Material Web UI

Material Web UI



Reporting a bug

If you think that you've found a bug, open an issue here on GitHub and fill out the Bug report issue template. Please post bug reports only on GitHub.



FAQ

»What do I need to consider when upgrading from version 3 ➞ 4?«
    »Can I downgrade from version 4 ➞ 3?«
    »What's changed in version 4?«

  • Changes

    For dynamic playlists that can retrieve all tracks matching your search parameters in one initial database query, DPL version 4 loads all tracks into the cache, thus eliminating the need for further database queries. Subsequent batches of new tracks for the active dynamic playlist will be retrieved from the cache only, and added to a client's playlist much faster as a result.
    Dynamic playlists that retrieve each batch of new tracks from a different, randomly chosen artist, album, genre, year, decade or static playlist are not suitable for cache use because not all tracks can be retrieved in one initial database query.
    Furthermore, you can use dynamic playlists to create static playlists and select LMS's balanced shuffle mode as the default plugin shuffle method in the settings now.

    ⚠️ Unlike previous versions, DPL 4 uses track ids (and not track urls) to cache, sort or shuffle (huge result sets of) tracks.
    Therefore, version 4 is no longer compatible with old plugins like SQLPlayList that return track urls instead of track ids (see upgrading section below).

  • Upgrading 3 ➞ 4

    Please don't use version 3 and version 4 at the same time. Uninstall version 3, then install version 4.
    Since version 4 expects the id (instead of the url) and the primary artist (used for LMS's balanced shuffling) for each track, you need to make your custom dynamic playlists compatible with version 4. It's rather easy:

    • If you used the Dynamic Playlist Creator plugin to create your custom dynamic playlist, just click on the Edit button next to its name and simply save it again. Dynamic Playlist Creator will save it in a version compatible with the currently installed version of DPL. That's it.

    • If you have manually created custom dynamic playlists (customized SQLite statements) in the DPL-custom-lists folder, you simply need to replace instances of

          select tracks.url from tracks

      with

          select tracks.id, tracks.primary_artist from tracks

      Save a backup of your manually created custom dynamic playlists before you change them. If you ever wish to downgrade to version 3, you can just use the old dynamic playlists from your backup.

  • Downgrading 4 ➞ 3

    The last version 3 of Dynamic Playlists will remain available for download here to allow you to downgrade at any time. It will, however, no longer be available from the LMS main repository because it won't receive further updates and should be considered deprecated.

    You can either install the last version 3 manually or add the version 3 repository URL below at the bottom of LMS > Settings > Plugins and click Apply:

    https://raw.githubusercontent.com/AF-1/lms-dynamicplaylists/main/repo.xml

    Custom dynamic playlists compatible with version 3 need to return track urls. For details, refer to the upgrade section above.


»With which plugins does DPL work?«

DPL 4 is compatible with Dynamic Playlist Creator, Alternative Play Count and Custom Skip 3.

  • CustomScan: could work, not tested. Compatibility not guaranteed, not supported by me.

  • SQLPlayList: does NOT work with DPL version 4. Compatibility with DPL version 3 not guaranteed, not supported by me. Alternatively, you can give the Dynamic Playlist Creator plugin a try if you use DPL version 4.

  • TrackStat: not supported because no longer needed. LMS keeps track of ratings, play counts and date last played in its own database table.

  • MultiLibrary: not supported because no longer needed. Please considering using native LMS virtual libraries. You can easily create new virtual libraries using saved advanced searches. Or, if you're a little familiar with SQLite, there's the SQLite Virtual Libraries plugin that lets you use SQLite statements to create virtual libraries.


»How do I create / add my own custom dynamic playlist?«

  • If you prefer a GUI and want an easy way to create a custom dynamic playlist without having to deal with SQLite, take a look at the Dynamic Playlist Creator plugin that uses templates to create dynamic playlists and makes them available to DPL 4. If you still use the deprecated DPL version 3, you could try the SQLPlayList plugin.

  • If you are familiar with database queries and SQLite, you can create a fully customized dynamic playlist in a plain text editor of your choice and use it directly in DPL.
    Dynamic playlist definitions are basically plain text files with an "sql" file extension that contain your playlist definition:

    • a couple of parameters (general parameters like the playlist name, group or category and user input parameters) and
    • the SQLite statement itself to fetch tracks from the LMS database.

    Whether you use a built-in dynamic playlist as a template or start from scratch, this will give you a great deal of freedom in creating dynamic playlists tailored to your specific needs.
    In any case please read the wiki for more information on the dynamic playlist format and the few playlist parameters that you should definitely include.
    Put your custom dynamic playlist file (with the sql file extension) in DPL's folder for custom dynamic playlists called DPL-custom-lists.2 The new dynamic playlist should now be listed in DPL, either in the Not classified group or in other groups according to what the -- PlaylistGroups parameter in your playlist definition says.


»Can I save the results of a dynamic playlist as a static playlist?«

Version 4 allows you to save the result set of any dynamic playlist as a static playlist. There's a control icon in the Dynamic Playlists menu (LMS default skin) next to the names of dynamic playlists that looks a bit like an old floppy disk. In Material and jivelite GUI controllers, you get a new option “Save as static playlist“ in addition to Play and Add. You only need to set the maximum number of tracks (max. 4000) and the name of your static playlist. Dynamic playlists with user-input parameters will request that input first and show you the static playlist options (max. track no., playlist name, track sort order) at the end.
Depending on the complexity of your dynamic playlist and the max. track limit you set for your static playlist, saving it might take a while.


»What's preselection? How does it work?«
    »There's more than one DPL context menu item.«

DPL has playlist parameters that allow you to select multiple genres, decades, years and static playlist. But even the smallest music libraries have a large number of artists and albums that would result in poorly browsable, far too long selection lists. The solution is to gather/select artists or albums first using the preselection context menu item and then start a dynamic playlist for preselected artists/albums.
So for artists and albums DPL will show a second context menu that allows you to preselect this artist/album while browsing your music library. DPL will remember your (pre)selection until the next LMS restart/rescan 3.
Once you've finished preselecting artists/albums, go to DPL's home menu and use this selection with any dynamic playlist that makes use of the PlaylistPreselectedArtists or PlaylistPreselectedAlbums playlist parameter. There are some built-in dynamic playlists to get you started (in the Songs group). And it's very easy to add these playlist parameters to your custom dynamic playlists. Read this wiki section for more information.


»How does DPL work with the Don't Stop the Music plugin?«
    »What does the icon with the infinity symbol do?«
    »What does “Create DSTM seed list and play“ mean?«

The Don't Stop the Music (DSTM) plugin “will automatically add similar music to what you've been listening to ... once you've reached the end of your playlist“. DSTM takes a look at the existing tracks in your client's playlist (the seed list) to determine what kind of tracks to search for.

As long as Dynamic Playlists is active, i.e. playing a dynamic playlist, DSTM will not interfere and add tracks.

But now you can use Dynamic Playlists to create a DSTM seed list from any dynamic playlist and start a DSTM mix for you. There's a preference setting if you prefer to skip playback of all seed list tracks (but the last one).


»How do I know whether DPL is still active?«
    »What causes DPL to no longer be active?«

To find out whether Dynamic Playlists is still active just enter the DPL menu from the Home/My Music menu. If it's still active, it will display the active dynamic playlist at the top of the DPL menu.
Some actions/events that stop DPL (= no longer active): clearing your client playlist, DPL no longer finds tracks for the active dynamic playlist, you told DPL to stop adding tracks...


»I've added a dynamic playlist to my LMS favorites, but it no longer works.«
    »There are some dynamic playlists that I can't add to LMS favorites.«
    »DPL shows a favorite icon with a p (default skin) or an orange tint (classic skin) next to my dynamic playlists. Why?«

Prior to Dynamic Playlists 3, you could only save one-click dynamic playlists as favorites that don't ask for user input when you start them.

Now you can also add dynamic playlists with user input parameters.
By default, Dynamic Playlists will not let you save dynamic playlists as LMS favorites that ask users for volatile input at run-time (artist, album, genre, multiple genres, playlist or multiple playlists) because those values could change after a rescan and break such favorites.
If you still want to add dynamic playlists with volatile parameter values (artist, album, genre, multiple genres, playlist or multiple playlists) to LMS favorites, you can enable this in the plugin settings. However, keep in mind that such favorites may no longer work after a rescan and you'd have to delete and readd them. Therefore I suggest you choose a good descriptive name so you'll remember what parameter values you chose (like "Alternative 80s rated").

If you always select the same artists, albums, genres or playlists, it's probably better to create a custom dynamic playlist with the actual artist/album/genre/playlist names. A favorite for such a one-click dynamic playlist is not affected by rescans.

This feature is limited to the LMS web UI (Default and Classic skin), players with jivelite UI (Touch, Radio, SqueezePlay, piCorePlayer) and Material skin.

Please note: Changing the filename of a custom dynamic playlist alters its dynamic playlist id and thus invalidates any existing favorite for this dynamic playlist. That hasn't changed since Dynamic Playlists 2. The same applies to built-in dynamic playlists: If a plugin update changes the filename of a built-in dynamic playlist, you'll have to delete and readd favorites based on that dynamic playlist. Doesn't happen very often and always for good reasons.

The favorite icon with the p (default skin) or an orange tint (classic skin) just indicates that this dynamic playlist contains parameters that will ask for user input when you start it.


»The Not classified group in the DPL (home) menu has disappeared / doesn't show.«

The Not classified group in the DPL (home) menu and on settings pages will only be displayed if DPL found dynamic playlists that belong in this group, i.e. if it's not empty.


»This built-in dynamic playlist is missing a feature that I really want.«

The collection of built-in dynamic playlists includes only a large but limited set of frequently used playlists that won't see regular additions or updates. It can also be used as a starting point for creating your own custom dynamic playlists whose very reason for existence is to help you create dynamic playlists tailored to your specific needs.


»I don't want my dynamic playlist in the Not classified group. I want a custom group (name).«

The Not classified group is a catch-all group for all dynamic playlist that are not assigned to any playlist group. You can create your own custom playlist groups by setting the -- PlaylistGroups: parameter in your dynamic playlist definition (see wiki).


»Does DPL handle online tracks?«

Dynamic Playlists will process online tracks that have been added to your LMS library as part of an album. LMS does not import single online tracks or tracks of online playlists as library tracks and therefore they won't be processed by Dynamic Playlists.


»Some dynamic playlist are not sorted in alphabetical order.«

In general dynamic playlists will always be listed in this order: 1. built-in, 2. custom/user-provided, 3. provided by other plugins. Dynamic playlists in the last two groups should be listed in alphabetical order.
Built-in dynamic playlists are listed in a 'content-based' order created by me. For example, I try to group dynamic playlists together that are about ratings, play count or genre/decade selection. If you don't like how I ordered the built-in dynamic playlists, don't forget that you can clone these playlists and even put them in a custom playlist group just by adding the corresponding parameter (see wiki).
Static (saved) playlists will always be ordered alphabetically.


»Can I use CLI commands to control DPL?«

Explained in the wiki.


»The Home > Dynamic Playlists menu doesn't show dynamic playlists for context menus. Why?«

By default the Home > Dynamic Playlists menu will only show dynamic playlists that don't include the -- PlaylistMenuListType:contextmenu parameter. Here you won't find any dynamic playlists that can be called from an item's context menu.
And context menus (= More menu in the web UI or click/touch-hold on jivelite players) will only show dynamic playlists for context menus. So there may be some overlap but this separation greatly helps reduce clutter.


»I want my dynamic playlist to use one of Custom Skip's filter sets.«

Just add the necessary action/CLI playlist parameters to the SQLite code of your custom dynamic playlist as described here.
If you only need one filter set for all dynamic playlists, create a Custom Skip filter set that will only be active if DPL plays a dynamic playlist. See Custom Skip Wiki.






1 If you want localized strings in your language, read this. Based on Erland's DynamicPlayList plugin.
2 Unless you've changed its location in the settings, you'll find DPL's folder for custom dynamic playlists called DPL-custom-lists in your LMS playlist folder.
3 You can't save your preselection permanently, it's a short-term thing. If you have a fixed selection of artists or albums that you want to listen to frequently, you can "hard-code" them into your own custom dynamic playlist.

About

Dynamic Playlists - a plugin for Logitech Media Server that lets you play continuous music mixes based on selection criteria defined in so-called dynamic playlists.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Perl 85.3%
  • HTML 14.7%