navidrome / navidrome

🎧☁️ Modern Music Server and Streamer compatible with Subsonic/Airsonic
https://www.navidrome.org
GNU General Public License v3.0
10.01k stars 772 forks source link

Smart Playlists #1417

Open deluan opened 2 years ago

deluan commented 2 years ago

Smart playlists can be created as a json object into a file with .nsp extension and Navidrome will create a dynamic/query based playlist and keep it updated. These .nsp files will be imported the same way as normal playlists, i.e. at scan time. See comment below for a complete list of fields and operators available.

Some examples:

TODO

deluan commented 2 years ago

Current list of fields available (case-insensitive):

title
album
artist
albumartist
hascoverart
tracknumber
discnumber
year
size
compilation
dateadded
datemodified
discsubtitle
comment
lyrics
sorttitle
sortalbum
sortartist
sortalbumartist
albumtype
albumcomment
catalognumber
filepath
filetype
duration
bitrate
bpm
channels
genre
loved
dateloved
lastplayed
playcount
rating

Operators available (case-insensitive):

is
isNot
gt
lt
contains
notContains
startsWith
endsWith
inTheRange
before
after
inTheLast
notInTheLast
inPlaylist
notInPlaylist
RedKage commented 2 years ago

Hello, not sure if I should post this here or make a new issue. I have a use case which is to find all the songs which are unrated. I want to find those which have no star.

I played a bit with the NSP, and my take is that it's like an expression tree which builds SQL queries. Haven't looked at the source, yet. And indeed, the "problem" is that select * from annotation where rating = 0 and item_type = 'media_file' returns only the songs with no rating, but they still need to have a row in the annotation table.

In effect I have only 10 songs returned without star. When in actuality I have thousands, but these have never been annotated. So they are never in the scope of the expression tree. So they can never be found? Or is there another way?

EDIT: I wonder if there's like some sort of left outer join or something that would still target media_files which have no annotations yet, kinda like changing that LeftJoin in persistence/playlist_repository.go:207

deluan commented 2 years ago

Hello, not sure if I should post this here or make a new issue.

That's fine

I played a bit with the NSP, and my take is that it's like an expression tree which builds SQL queries. Haven't looked at the source, yet. And indeed, the "problem" is that select * from annotation where rating = 0 and item_type = 'media_file' returns only the songs with no rating, but they still need to have a row in the annotation table.

Yes, that's how it works, and yes, this is a "problem". I think a good approach for this is to introduce a new operator, isSet (true/false) that will be converted to is null/is not null and will allow these use cases where you don't have the record in the annotation table.

EDIT: I wonder if there's like some sort of left outer join or something that would still target media_files which have no annotations yet, kinda like changing that LeftJoin in persistence/playlist_repository.go:207

It is already a left join, the issue is that when there's no matching row in the annotation table, its values are all null

deluan commented 2 years ago

I actually did some experimentation and I think a better way is to wrap all fields from the left joined tables with COALESCE, like this:

COALESCE(annotation.rating, 0 ) = 0)

This will allow to use "is": {"rating": 0} in the NSP file.

0bmay commented 2 years ago

First off, thanks for the smart playlists.. It really opens up the possibilities for Navidrome!

using the latest docker image (Navidrome Version: | 0.47.0 (8c7d95c1)), trying to use dateadded and datemodified return invalid key errors. I'm attempting to make a Songs newly added and unrated playlist.. I took a cue from the random sorting post on reddit. Not sure if it would work, but it appears I can't filter on dateadded or datemodified. I'm assuming I'm doing something wrong, but just in case....

{ "all": [ {"is": {"rating": 0}}, {"datemodified": {"gt": "DATE('now','-90 day')"}}, -- using this line or the next.. {"dateadded": {"gt": "DATE('now','-90 day')"}} ], "sort": "dateadded", "order": "asc", "limit": 100 }

time="2021-11-20T00:56:54Z" level=error msg="Error parsing SmartPlaylist" error="invalid expression key dateadded" playlist="Songs to Rate - Newly Added" requestId=e31872cd1409/MIUyT3LsdO-001067, time="2021-11-20T00:56:54Z" level=error msg="Error parsing playlist" error="invalid expression key dateadded" path="/music/playlists/Songs to Rate - Newly Added.nsp" requestId=e31872cd1409/MIUyT3LsdO-001067, time="2021-11-20T01:02:46Z" level=error msg="Error parsing SmartPlaylist" error="invalid expression key datemodified" playlist="Songs to Rate - Newly Added" requestId=e31872cd1409/MIUyT3LsdO-001108, time="2021-11-20T01:02:46Z" level=error msg="Error parsing playlist" error="invalid expression key datemodified" path="/music/playlists/Songs to Rate - Newly Added.nsp" requestId=e31872cd1409/MIUyT3LsdO-001108,

deluan commented 2 years ago

Hey @0bmay, the issue is that the key of the rule has to be the operator, not the field. So in the snippet:

{"dateadded": {"gt": "DATE('now','-90 day')"}}

should be:

{"gt": {"dateadded": "DATE('now','-90 day')"}}

Also notice the operator inTheLast, that was created specifically for this type of rules:

{"inTheLast": {"dateadded": "90"}}, 

I don't even know if DATE('now','-90 day') will work..

0bmay commented 2 years ago

Thank you @deluan!

MichaelBechHansen commented 2 years ago

Smart playlists are similar, but not the same as normal playlists in the Subsonic API - yet they are exposed via the same API endpoints. Some differences are, smart playlists are readonly, and are auto regenerated on read (I believe). This poses some challenges for client apps / API consumers.

For client apps to be able to give a good user experience, information about what playlists are smart (readonly, auto regenerated) and what playlists are user edited is necessary. This information does not seem to be present with the current implementation.

Some points from a discord discussion on smart playlists in the context of the Subsonic API:

Is there any way of distinguishing smart playlists from plain old user-maintained playlists?

  • so an app does not offer to add tracks to a smart playlist.
  • so an app can know whether it syncs a changed user maintained playlist OR is refreshing a smart playlist.
  • ...

Suggestion for one way to add extra information to the Subsonic API:

I think it's pretty safe to add properties to the existing Subsonic JSON/XML response outputs. So one way could be to add a "navidrome:properties" object to the playlists: "playlist": [ { "navidrome:properties": { "type": "smart", // smart, manual .... } "id": "af1a19a2-bafe-4b17-841c-73b0175891a3", "name": "ABC", "songCount": 0, "duration": 0, "public": false, "owner": "demo", "created": "2021-11-28T07:21:40.384665077Z", "changed": "2021-12-03T09:13:46.098202015Z" },

...

The presence of the "navidrome:properties" could also be conditional on the client sending some magic parameter in the request.

So in sum, one way to deliver extra playlist information to client apps would be:

aewne commented 2 years ago

Would it be possible to add playlist name/id as a selector field for the smart playlists? That way you can mix playlists together without all the hassle that it is now.

AndersMoberg commented 2 years ago

I renamed my NSP files to include emoji, and Navidrome started counting them as separate playlists.. ergo, it wouldn't purge the smart playlists that didn't have a file still.

Green are the new files, yellow are the previous names of these playlists.

image

certuna commented 2 years ago

Yes, playlist import is a one-direction process unfortunately. Change the name of the m3u/nsp, and it gets re-imported as a new playlist.

ryoku-cha commented 2 years ago

Is there any way to assign the Smart Playlists to any user (or all users)?

I tried putting the following in the .nsp File. But that did not change anything. "owner": "username" -> where username was the username for my account.

Currently my Smart Playlists appear only for the "admin" User, but not for my daily use user-account.

TheWrathKing commented 2 years ago

Is there any way to assign the Smart Playlists to any user (or all users)?

Yes, this is possible in the UI. When logged in as admin, click on the icon next to the word "Playlists" on the left side menu and in this new screen you can make the playlists 'public' or edit them. In the 'Edit' screen you can change the owner of the playlist. Hope this will help

deluan commented 2 years ago

Would it be possible to add playlist name/id as a selector field for the smart playlists? That way you can mix playlists together without all the hassle that it is now.

@aewne Yes, this is planned.

@MichaelBechHansen, I think a generic property instead of navidrome:properties would be a better approach, that could be used by other server implementations

RedKage commented 2 years ago

Hello, just a heads up while testing v0.47.5, it seems some of my smart playlists NSP are broken. After a full refresh my playlists got emptied. They contain NSP like this one

{
  "all": [
    {"is": {"rating": "5"}}
  ],
  "sort": "playcount",
  "order": "desc"
}

Which was working fine on the previous version.

The issue is that the value, in the above 5 is a string with double quotes in my NSP. I changed my NSP with "rating": 5 without double quotes, touched and refresh and now they all work properly.

It makes sense, the value is a number.

This works as of 0.47.5

{
  "all": [
    {"is": {"rating": 5}}
  ],
  "sort": "playcount",
  "order": "desc"
}

This is not a bug, just an observation.

Also confirmed "rating": 0 works! Thanks for the new release!

gardebreak commented 2 years ago

I have a "Recently Played" smart playlist:

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

Only tracks that I play through the web UI will show up on the list. It seems any tracks played on an external client don't get marked as "played." Is that the expected behavior?

deluan commented 2 years ago

@RedKage thanks for reporting this. I'll check if I can keep supporting both syntaxes in future releases

@gardebreak, you need to enable "Scrobbling" in your Subsonic client, see #593

0bmay commented 2 years ago

I think the smart play list sorting by random may be broken.. I'm getting back items that are sorted by song title instead..

{ "all": [ { "any": [ {"is": {"loved": true}}, {"gt": {"rating": 3}} ]}, {"notInTheLast": {"lastPlayed": 180}}, {"contains": {"genre": "metal"}}, ], "sort": "random()", "limit": 25, "source": "https://www.reddit.com/r/navidrome/comments/qxh3qu/comment/hl9fb6x/?utm_source=reddit&utm_medium=web2x&context=3" }

this returns a list of:

EXTINF:260,Corporate Avenger - $20 Bill

EXTINF:186,Celtic Frost - (Beyond the) North Winds

EXTINF:192,Spineshank - (Can't Be) Fixed

EXTINF:256,The Crown - (I Am) Hell

EXTINF:275,The Resistance - (I will) Die Alone

EXTINF:426,Mudvayne - (K)now F(orever)

EXTINF:340,Pantera - (Reprise) Sandblasted Skin

EXTINF:185,Judas Priest - (Take These) Chains

EXTINF:239,Mudvayne - -1

EXTINF:262,Static-X - ...In a Bag

EXTINF:192,Rise to Fall - ...Kills the Reason

EXTINF:550,Seemless - ...Things Fall Apart

EXTINF:378,Isis - 1,000 Shards

EXTINF:201,Five Finger Death Punch - 100 Ways to Hate

EXTINF:386,Megadeth - 1000 Times Goodbye

EXTINF:374,Megadeth - 1000 Times Goodbye

EXTINF:386,Megadeth - 1000 Times Goodbye

EXTINF:232,36 Crazyfists - 11.24.11

EXTINF:223,Lamb of God - 11th Hour (Remixed) [Remastered]

EXTINF:350,Megadeth - 13

EXTINF:396,Corrosion of Conformity - 13 Angels

EXTINF:252,Black Label Society - 13 Years of Grief

EXTINF:161,Seance - 13th Moon

EXTINF:338,Iron Maiden - 2 A.M.

EXTINF:360,Iron Maiden - 2 Minutes to Midnight

songs that match the criteria, that all start with symbols or numbers, sorted by title. I would expect the listing to be more random. I know there were some changes to the smart lists in the latest release. Did random get broken, or is there a new way to randomize the returned data?

Thank you for all the hard work on navidrome.

deluan commented 2 years ago

Yeah, the fix to avoid possible SQL injections also closed this loophole. I just pushed a fix for random. Now you have to specify "sort": "random" (without ()) and it should work. To test it out and use it, please update to the latest dev build

0bmay commented 2 years ago

Thanks! I run navidrome from a docker image, so I will have to wait for either a dev build or a the next release. I didn't see anything in the documentation on how to build a docker image.

krisu5 commented 2 years ago

I tried to make smart playlist with all the songs (reason being that I want to get all the songs listing to Subsonic app), but it only added 1297 out of 1426 songs.

{
  "all": [
    {"notContains": {"genre": "ThisGenreDoesNotExist"}}
  ],
  "sort": "title",
  "order": "asc"
}

I don't know better way to add everything, because just empty "all" didn't work for me.

nishantbb commented 1 year ago

I am getting a "dummy" error, when it appears my "order":"asc", is working, but it raised an error in the logs:

level=error msg="Invalid value in 'order' field. Valid values: 'asc', 'desc'" order=acs

Example NSP file:

{
  "all": [
    {"isNot": {"genre": "something else"}}
  ],
  "sort": "playcount",
  "order": "acs",
  "limit": 20
}

I have the exact same thing with order = desc, which also works but doesn't raise an error.

TheWrathKing commented 1 year ago

@nishantbb I think there is a typo error in your smart playlist file "acs" instead of "asc"

jane0009 commented 1 year ago

Hi! I noticed that a fix for null ratings was added before, but it doesn't seem to work the same for loved tracks.

For example, I have a playlist like this:

{
  "all": [
    {"isNot": {"loved": true}},
    {"notInTheLast": {"lastPlayed": 90}}
  ],
  "sort": "random",
  "limit": 90
}

In practice, importing this only selects tracks which have been first marked as loved and then unmarked.

GlassedSilver commented 1 year ago

Hi! I noticed that a fix for null ratings was added before, but it doesn't seem to work the same for loved tracks.

For example, I have a playlist like this:

{
  "all": [
    {"isNot": {"loved": true}},
    {"notInTheLast": {"lastPlayed": 90}}
  ],
  "sort": "random",
  "limit": 90
}

In practice, importing this only selects tracks which have been first marked as loved and then unmarked.

Sounds like an unset variable simply not getting properly compared. By default, I guess the variable is simply NULL rather than zero?

Jiffy1111 commented 1 year ago

Hi, I've installed Navidrome from git on Debian 11 (./navidrome -v = 0.47.5-SNAPSHOT (ce0db834)) Everything I've tested with smart playlists seems to be working except for the fact that non admin users cannot see them. I'm not sure what else I can tell you that will help you to fix this or to tell me what I may have done wrong. The easiest way to reproduce this issue is to create a non admin user and log in as them. I've cleared cache, tried different PCs and private browsing as well. Firefox, Chrome and Edge all produce the same results.

neingeist commented 1 year ago

Everything I've tested with smart playlists seems to be working except for the fact that non admin users cannot see them.

You have to make the playlist public (as the admin), then the normal user can see it.

djjudas21 commented 1 year ago

Thanks for this. Just a few examples of some smart playlists I wrote after porting from Rhythmbox:

Never-played tracks

{
  "all": [
    {"is": {"playcount": 0}}
  ],
  "sort": "album"
}

Non-album tracks aka standalone recordings. This is how MusicBrainz Picard tags them

{
  "any": [
    {"is": {"album": "[non-album tracks]"}},
    {"is": {"album": "[standalone recordings]"}}
  ],
  "sort": "album"
}

Tracks that have been rated but somehow not played

{
  "all": [
    {"is": {"playcount": 0}},
    {"gt": {"rating": 0}}
  ],
  "sort": "album"
}

Unrated tracks

{
  "all": [
    {"is": {"rating": 0}}
  ],
  "sort": "album"
}
StarrrLiteNL commented 1 year ago

Is there a way to make a smart playlist with all tracks in a specific album/specific artist that are not already in any playlist? There don't seem to be any fields/operators relating to filtering by playlist status.

Jiffy1111 commented 1 year ago

Everything I've tested with smart playlists seems to be working except for the fact that non admin users cannot see them.

You have to make the playlist public (as the admin), then the normal user can see it.

Thank you, that mostly works, but then I tried a playlist of random songs and it's only random for the admin user.

cat 1500\ Completely\ Random\ Songs.nsp { "any": [ {"notInTheLast": {"lastPlayed": 14}} ], "sort": "random", "limit": 1500 } edited, not sure why the code block doesn't look right: cat 1500\ Completely\ Random\ Songs.nsp { "any": [ {"notInTheLast": {"lastPlayed": 14}} ], "sort": "random", "limit": 1500 }

Another edit, I should clarify, When the admin use loads the playlist, switches to another playlist and comes back to it, it is different every time but when the non admin user does that, it is the same every time.

tomerrr commented 1 year ago

i'm trying to create a smart playlist for a certain year , that would be sorted by album and its correct track number in the album. can't figure it out i've tried { "all": [ {"is": {"year": 2022}} ], "sort": "album", "order": "tracknumber", "limit": 100 } but that doesn't seem to work. how do i achieve this?

deluan commented 1 year ago

Hi! I noticed that a fix for null ratings was added before, but it doesn't seem to work the same for loved tracks.

@janeptrv Thanks for reporting, I'll take a look.

When the admin use loads the playlist, switches to another playlist and comes back to it, it is different every time but when the non admin user does that, it is the same every time.

@Jiffy1111 Smart playlists are only updated when their owner access them, in your case the admin. The current solution/workaround is to change the owner of the playlist to another user. You could create one copy of the playlist for each user, change the owner of each playlist to a given user and make it private to avoid all those playlist appearing for everyone. Also check the comment above: https://github.com/navidrome/navidrome/issues/1417#issuecomment-1000173745

Is there a way to make a smart playlist with all tracks in a specific album/specific artist that are not already in any playlist? There don't seem to be any fields/operators relating to filtering by playlist status.

@StarrrLiteNL Yes, that is planned but not implemented yet.

i'm trying to create a smart playlist for a certain year , that would be sorted by album and its correct track number in the album. can't figure it out

@tomerrr "order" can only be "asc" or "desc". You would need to add two fields in the "sort" attribute, something like: "sort": "album, discNumber, trackNumber" but this is currently not supported. I'll take a look and see if this can be improved for next release

Jiffy1111 commented 1 year ago

@Jiffy1111 Smart playlists are only updated when their owner access them, in your case the admin. The current solution/workaround is to change the owner of the playlist to another user. You could create one copy of the playlist for each user, change the owner of each playlist to a given user and make it private to avoid all those playlist appearing for everyone. Also check the comment above: #1417 (comment)

Hi, @deluan, I'm a two user system and can handle this, and I'll probably make my son an admin just to be done with it. I trust him. On the other hand though, I'm thinking this doesn't scale well and I'm sure there are larger deployments out there that can't do this and they're not going to want to make everyone an admin. Just my 2 cents and thank you.

deluan commented 1 year ago

I'm a two user system and can handle this, and I'll probably make my son an admin just to be done with it. I trust him. On the other hand though, I'm thinking this doesn't scale well and I'm sure there are larger deployments out there that can't do this and they're not going to want to make everyone an admin. Just my 2 cents and thank you.

Yes, this is not scalable but that's a limitation of the current implementation. There's more work to do to make Smart Playlists easy to use.

Just a note: making your son admin does not solve your issue: you need to change the ownership of the playlist to your son, as the playlists will only get updated when accessed by their owner. And a playlist can only have one owner. So if the owner is your son, it won't update when you access it and vice versa. Hope this clarifies a bit

EXCIDIVM commented 1 year ago

This feature has infinite potential! But has anyone been able to make "filepath" work? No matter what combination I try, it doesn't work. A working example would be much appreciated.

[e] Or did I understand it wrong and it only allows to specify direct paths to specifc FILES and not entire FOLDERS?

Jiffy1111 commented 1 year ago

I'm a two user system and can handle this, and I'll probably make my son an admin just to be done with it. I trust him. On the other hand though, I'm thinking this doesn't scale well and I'm sure there are larger deployments out there that can't do this and they're not going to want to make everyone an admin. Just my 2 cents and thank you.

Yes, this is not scalable but that's a limitation of the current implementation. There's more work to do to make Smart Playlists easy to use.

Just a note: making your son admin does not solve your issue: you need to change the ownership of the playlist to your son, as the playlists will only get updated when accessed by their owner. And a playlist can only have one owner. So if the owner is your son, it won't update when you access it and vice versa. Hope this clarifies a bit

Understood and thank you!

basicallynewbie commented 1 year ago

How can I add all my songs into one playlist.I can only add 50 songs at a time in webui,and I have over 10000 songs,why can't I select all my songs with one click.I know my question is answered by All songs in random order.But I don't know any thing about coding,I need ui to do this,and I believe I'm not alone.I don't even konw what .nsp is.Should I create a file called all.nsp and put code in?And mount in where?

basicallynewbie commented 1 year ago

Wow.it does work that way.I put code in all.nsp,and put all.nsp in /music/playlists,and scan,the new playlist shows up.It's amazing even though I don't know what's going on.

neingeist commented 1 year ago

But has anyone been able to make "filepath" work? No matter what combination I try, it doesn't work. A working example would be much appreciated.

i have a playlist that contains all files that i put in "incoming", that's where i put everything straight from bandcamp etc. before i opened the tag editor:

{
  "all": [
    {"contains": {"filepath": "/incoming"}}
  ],
  "sort": "lastPlayed",
  "order": "desc"
}
EXCIDIVM commented 1 year ago

But has anyone been able to make "filepath" work? No matter what combination I try, it doesn't work. A working example would be much appreciated.

i have a playlist that contains all files that i put in "incoming", that's where i put everything straight from bandcamp etc. before i opened the tag editor:

{
  "all": [
    {"contains": {"filepath": "/incoming"}}
  ],
  "sort": "lastPlayed",
  "order": "desc"
}

You, sir, just forever changed the way I store, sort and enjoy music. Thank you!

tonyperuca commented 1 year ago

Hi. Im a complete newbie about codes. I just discovered Navidrome and it is really nice. What is the code to create a playlist (nsp file) with genre Metal and 5 stars? Tyvm. I just want to use my tags for ratings (60k music files already rated) but just cant find a docker music server capable of it. Ty again.

djjudas21 commented 1 year ago

What is the code to create a playlist (nsp file) with genre Metal and 5 stars?

{
  "all": [
    {"is": {"genre": "Metal"}}
    {"is": {"rating": 5}}
  ],
  "sort": "album"
}

This should do the trick @tonyperuca. Just to talk you through what the code actually does, we are saying ALL of these conditions muse be true, that the genre IS metal and the rating IS 5. Then we sort the tracks into their album order, otherwise they'd appear in an arbitrary order.

You might need to experiment with the genre matching. You could change is to contains in case it doesn't match sub-genres like death metal, etc.

tonyperuca commented 1 year ago

What is the code to create a playlist (nsp file) with genre Metal and 5 stars?

{
  "all": [
    {"is": {"genre": "Metal"}}
    {"is": {"rating": 5}}
  ],
  "sort": "album"
}

This should do the trick @tonyperuca. Just to talk you through what the code actually does, we are saying ALL of these conditions muse be true, that the genre IS metal and the rating IS 5. Then we sort the tracks into their album order, otherwise they'd appear in an arbitrary order.

You might need to experiment with the genre matching. You could change is to contains in case it doesn't match sub-genres like death metal, etc.

It Works. Thank you. Any chance to create a script or something like that (plugin maybe) to use (read and write) the id3 tags from mp3 files? I dont need a per user rating, Im the only one that use the server to stream music. Ty again.

sprnza commented 1 year ago

Is there a way to get lastPlayed playlist to show tracks from all users history? It seems like this one shows only my tracks

{
  "all": [
    {"inTheLast": {"lastPlayed": 30}}
  ],
  "sort": "lastPlayed",
  "order": "desc",
  "limit": 100
}
deluan commented 1 year ago

Is there a way to get lastPlayed playlist to show tracks from all users history? It seems like this one shows only my tracks

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

This is planned, but not available yet. Currently the values comes from the owner of the playlist.

n0access commented 1 year ago

Hi, is there a way to filter by duration, for example, songs over 10 minutes?

deluan commented 1 year ago

Hi, is there a way to filter by duration, for example, songs over 10 minutes?

Yes, try:

{
  "all": [
    {"gt": {"duration": 600}}
  ],
  "sort": "duration",
  "limit": 100
}

duration is in seconds.

n0access commented 1 year ago

It works like a charm, I really appreciate it

RedKage commented 1 year ago

Hey there, seems like I can't find your comment on GitHub anymore. So replying from email instead in the hopes you may receive it.

My initial thought was that in your path, replaced by "**", there may be some characters which break the path I can see some brackets "{" lying around in your log. But can't tell for sure without knowing the exact path. I think the JSON parsing fails because of that?

My second thgough was this https://github.com/navidrome/navidrome/issues/1720

Best!

------ Original Message ------ From "Martin Richtsfeld" @.> To "navidrome/navidrome" @.> Cc "TacticalFreak" @.>; "Mention" @.> Date 4/28/2022 9:47:33 PM Subject Re: [navidrome/navidrome] Smart Playlists (Issue #1417)

Hi everyone, Just found this project a few weeks ago, and it looks very promising. Thank you for creating it.

Smart Playlists are super important for me and my while music library is based on it. I tried to import the playlist as mentioned above by simply pasting the samples into a m3u/nsp file, but I always get the following error (I replaced the full path with **):

WARN[0599] Path in playlist not found error="data not found" path="/Users//Music/Library/Playlists/{" playlist=test WARN[0599] Path in playlist not found error="data not found" path="/Users//Music/Library/Playlists/\"all\": [" playlist=test WARN[0599] Path in playlist not found error="data not found" path="/Users//Music/Library/Playlists/{" playlist=test WARN[0599] Path in playlist not found error="data not found" path="/Users//Music/Library/Playlists/\"comment\": {" playlist=test WARN[0599] Path in playlist not found error="data not found" path="/Users//Music/Library/Playlists/\"contains\": \"Ether\"" playlist=test WARN[0599] Path in playlist not found error="data not found" path="/Users//Music/Library/Playlists/}" playlist=test

I checked out the code, and I found that it actually requires a "rules" node in the JSON to recognize it as a smart playlist. I'm new to this project, so there might be something very simply I'm missing here.

Please help me. Thank you

— Reply to this email directly, view it on GitHub https://github.com/navidrome/navidrome/issues/1417#issuecomment-1112593457, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC2RIIETVYACJZLTVLGR6RDVHLTNLANCNFSM5GIAFQ2A. You are receiving this because you were mentioned.Message ID: @.***>

sintpon commented 1 year ago

@deluan is it possible to filter songs, which were added to specific playlist recently? i'm trying to make smart playlist for recent playlists updates.