2024-10-27 19:49:14 +01:00
|
|
|
# Jellyfin SmartPlaylist Plugin
|
|
|
|
|
2024-10-28 02:31:20 +01:00
|
|
|
Smart playlists with Lisp filter engine.
|
2024-10-27 19:49:14 +01:00
|
|
|
|
|
|
|
## How to use
|
|
|
|
|
|
|
|
After [installing](#installation) the plugin and restarting Jellyfin
|
2024-10-27 19:51:26 +01:00
|
|
|
create a file in `config/data/smartplaylists` like this:
|
2024-10-27 19:49:14 +01:00
|
|
|
|
|
|
|
```
|
2024-10-27 19:51:26 +01:00
|
|
|
$ echo '{}' > config/data/smartplaylists/a.json
|
2024-10-27 19:49:14 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
Afterwards run the Task `(re)generate Smart Playlists`, this will rename
|
|
|
|
the `json` file and populate it with some default values. You can now
|
2024-10-27 19:51:26 +01:00
|
|
|
adjust the file to your liking. [Go here](examples/index.md) to see more
|
2024-10-27 19:49:14 +01:00
|
|
|
examples.
|
|
|
|
|
|
|
|
Example file
|
|
|
|
```json
|
|
|
|
{
|
|
|
|
"Id": "a1d02dee-f1da-4472-bee3-f568c15c8360",
|
|
|
|
"Playlists": [
|
|
|
|
{
|
|
|
|
"PlaylistId": "24f12e1e-3278-d6d6-0ca4-066e93296c95",
|
|
|
|
"UserId": "6eec632a-ff0d-4d09-aad0-bf9e90b14bc6"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"Name": "a1d02dee-f1da-4472-bee3-f568c15c8360",
|
|
|
|
"Program": "(begin (invoke item 'IsFavoriteOrLiked' (user)))",
|
|
|
|
"Filename": "/config/data/smartplaylists/a1d02dee-f1da-4472-bee3-f568c15c8360.json",
|
|
|
|
"Enabled": true
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### Id
|
|
|
|
|
|
|
|
Arbitrary Id assigned to this playlist, can usually be left alone.
|
|
|
|
The filename is derived from this.
|
|
|
|
|
|
|
|
### Playlists
|
|
|
|
|
|
|
|
A list of Playlist/User mappings. By default all users get an entry.
|
|
|
|
|
|
|
|
The ids must have the dashes in them as of now. To convert a id
|
|
|
|
from without dashes to the canonical form run this command:
|
|
|
|
|
|
|
|
`echo '<your id here>' | python3 -c 'import uuid; import sys; print(uuid.UUID(sys.stdin.read().strip()))'`
|
|
|
|
|
|
|
|
To get your user id navigate to your user profile and copy the part
|
|
|
|
after `userId` in the address bar.
|
|
|
|
|
|
|
|
#### PlaylistId
|
|
|
|
|
|
|
|
The id of the playlist that should be managed, must be owned by the
|
|
|
|
corresponding user.
|
|
|
|
|
|
|
|
#### UserId
|
|
|
|
|
|
|
|
The user associated with this playlist.
|
|
|
|
|
|
|
|
### Name
|
|
|
|
|
|
|
|
The name of the generated playlists, this is just a default value.
|
|
|
|
If the user changes the name of their playlist the plugin will
|
|
|
|
work as usual
|
|
|
|
|
|
|
|
### Program
|
|
|
|
|
|
|
|
A lisp program to decide on a per item basis if it should be included in
|
|
|
|
the playlist, return `nil` to not include items, return `t` to include
|
|
|
|
them.
|
|
|
|
|
|
|
|
### Filename
|
|
|
|
|
|
|
|
The path to this file.
|
|
|
|
|
|
|
|
### Enabled
|
|
|
|
|
|
|
|
Enable this playlist, currently ignored.
|
|
|
|
|
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
2024-10-30 03:22:19 +01:00
|
|
|
Add the [plugin repository](https://jellyfin.org/docs/general/server/plugins/#catalog)
|
|
|
|
to Jellyfin:
|
|
|
|
`https://gitea.redxef.at/redxef/jellyfin-smart-playlist/raw/branch/manifest/manifest.json`
|
|
|
|
|
|
|
|
Go to `Dashboard>Catalog>(Gear)>(Plus)` and paste the provided link into
|
|
|
|
the field labeled `Repository URL`, give the plugin a descriptive name
|
|
|
|
too.
|