ankenyr / jellyfin-smartplaylist-plugin

GNU Affero General Public License v3.0
52 stars 12 forks source link

Smart Playlist Plugin for Jellyfin

Overview

This is an attempt to make a smart playlist similar to what iTunes, Plex, and other media players have. It is still in early development and has some limitations which will not be able to be resolved until Jellyfin impliments some features.

Note: The playlist json format is still in flux as I figure things out.

How to Install

To use this plugin download the DLL and place it in your plugin directory. Once launched you should find in your data directory a folder called "smartplaylist". Your JSON files describing a playlist go in here.

Configuration

To create a new playlist, create a json file in this directory having a format such as the following.

{
  "Name": "CGP Grey",
  "FileName": "cgp_grey",
  "User": "rob",
  "ExpressionSets": [
    {
      "Expressions": [
        {
          "MemberName": "Directors",
          "Operator": "Contains",
          "TargetValue": "CGP Grey"
        },
        {
          "MemberName": "IsPlayed",
          "Operator": "Equal",
          "TargetValue": "False"
        }
      ]
    },
    {
      "Expressions": [
        {
          "MemberName": "Directors",
          "Operator": "Contains",
          "TargetValue": "Nerdwriter1"
        },
        {
          "MemberName": "IsPlayed",
          "Operator": "Equal",
          "TargetValue": "False"
        }
      ]
    }
  ],
  "Order": {
    "Name": "Release Date Ascending"
  }
}

Future work

Credits

Rule engine was inspired by this post in Stack Overflow. Initially wanted to convert ppankiewicz's plugin but found it to be too incompatible and difficult to work with. I did take some bits of code mostly around interfacing with the filesystem.