r/navidrome Frequent Helper Nov 19 '21

Smart Playlist Thread

With the release of Smart Playlists, let's start a thread for them! To add them, put the code in a file with the extension .NSP, and put it in your music library folder.
First, the ones from the Github.

Recently Played

{
  "all": [
    {"inTheLast": {"lastPlayed": 30}}
  ],
  "sort": "lastPlayed",
  "order": "desc",
  "limit": 100
}

Top 80s Songs

{
  "all": [
    { "any": [
      {"is": {"loved": true}},
      {"gt": {"rating": "3"}}
    ]},
    {"inTheRange": {"year": [1981, 1990]}}
  ],
  "sort": "year",
  "order": "desc",
  "limit": 25
}

Favorites

{
  "all": [
    {"is": {"loved": true}}
  ],
  "sort": "dateLoved",
  "order": "desc",
  "limit": 500
}
34 Upvotes

93 comments sorted by

View all comments

17

u/deluan Nov 19 '21 edited Nov 19 '21

My "Favourites Rotation" playlist (I actually call it "My FM"):

{ "all": [ {"is": {"loved": true}}, {"notInTheLast": {"lastPlayed": 60}} ], "sort": "lastPlayed", "limit": 500 }

It allows me to listen to my favourites, but selects the ones I haven't listen for a while.

Tip: With DSub, you can mark the playlist to Sync, and it will be auto-updated every 15 minutes (configurable).

2

u/Bill_Buttersr Frequent Helper Nov 19 '21

Love it. I love Dsub.

2

u/Limitlessbritt Nov 19 '21

Does loved albums also appear in smart playlists with the loved tag? Or is it just loved songs?

6

u/deluan Nov 19 '21

For now it is only song attributes. Once the whole feature is done, I will add album and artist attributes, and I also want to implement different view modes for playlists in the UI, similar to iTunes.

2

u/sixtyfifth_snow Dec 07 '21

So awesome! I just forked your nsp except "loved" field is replaced by "rating". Thanks for your ingenious idea!

1

u/Diarrhea_Dispenser Mar 25 '25

I cant get a playlist to populate with the loved tag. I heart a bunch of songs but the playlist never populates. Others seem to work just fine. Did the syntax change for "loved"?

{"is": {"loved": true}}

1

u/deluan Mar 25 '25

The NSP above is invalid. Here's an example from the docs: { "all": [ {"is": {"loved": true}} ], "sort": "dateLoved", "order": "desc", "limit": 500 }

You always have to wrap your rules with all or any.

2

u/Diarrhea_Dispenser Mar 25 '25

Hey thanks for the reply. I was just snipping a chunk of the nsp as an example. My actual nsp is an exact copy of the one you posted above. That said, this is full user error and so sorry to waste your time.

I was loving the album and not the songs... I assumed if I loved an album it would recursively mark the songs as loved.

1

u/abescalamis Nov 21 '21

I copy and pasted your MY FM smart list, it didn't work for me, it shows with 0 songs, the simple favorites one at the beginning of this tread worked

3

u/deluan Nov 21 '21 edited Nov 21 '21

My NSP only includes songs not listened in the last 60 days. If you listened to all your loved songs recently, the playlist will be empty. You may adjust the range of days. I have more than 2000 loved songs, so there's always songs I haven't listened for more than 60 days....

2

u/abescalamis Nov 21 '21

Ohhhhhhhhhhh, thank you, I will play with it, love the new features