🎧 Your Personal Streaming Service
Go airsonicmadsonicmedia-servermusicmusic-servernavidromeopensubsonicraspberry-piself-hostedstreamerstreaming-apistreaming-audiosubsonicsubsonic-server
Add `has_rating` filter to albums
Deluan5178f44094d9
diff --git a/persistence/album_repository.go b/persistence/album_repository.goindex edca77808..01d37935e 100644--- a/persistence/album_repository.go+++ b/persistence/album_repository.go@@ -44,6 +44,7 @@ func NewAlbumRepository(ctx context.Context, o orm.Ormer) model.AlbumRepository"year": yearFilter,"recently_played": recentlyPlayedFilter,"starred": booleanFilter,+ "has_rating": hasRatingFilter,}return r@@ -60,6 +61,10 @@ func recentlyPlayedFilter(field string, value interface{}) Sqlizer {return Gt{"play_count": 0}}+func hasRatingFilter(field string, value interface{}) Sqlizer {+ return Gt{"rating": 0}+}+func yearFilter(field string, value interface{}) Sqlizer {return Or{And{