🎧 Your Personal Streaming Service
Go airsonicmadsonicmedia-servermusicmusic-servernavidromeopensubsonicraspberry-piself-hostedstreamerstreaming-apistreaming-audiosubsonicsubsonic-server
Coalesce null annotation values, to better rank them against annotations with value 0
Deluan595186b1b283
diff --git a/persistence/sql_annotations.go b/persistence/sql_annotations.goindex 8e26fcf7f..58c35965f 100644--- a/persistence/sql_annotations.go+++ b/persistence/sql_annotations.go@@ -19,7 +19,13 @@ func (r sqlRepository) newSelectWithAnnotation(idField string, options ...model."annotation.item_id = "+idField+" AND annotation.item_type = '"+r.tableName+"'"+" AND annotation.user_id = '"+userId(r.ctx)+"')").- Columns("starred", "starred_at", "play_count", "play_date", "rating")+ Columns(+ "coalesce(starred, 0) as starred",+ "coalesce(rating, 0) as rating",+ "coalesce(play_count, 0) as play_count",+ "starred_at",+ "play_date",+ )}func (r sqlRepository) annId(itemID ...string) And {