fix(nextup): include completed or partially watched items in NextUp query
This commit is contained in:
@@ -199,6 +199,7 @@ func buildListNextUpQuery(q NextUpQuery, limit int) (string, []interface{}) {
|
||||
WHERE uwp2.user_id = $1
|
||||
AND uwp2.profile_id = $2
|
||||
AND uwp2.media_item_id = e2.content_id
|
||||
AND (uwp2.completed = TRUE OR uwp2.position_seconds > 0)
|
||||
)
|
||||
ORDER BY e2.season_number, e2.episode_number
|
||||
LIMIT 1
|
||||
|
||||
@@ -20,6 +20,7 @@ func TestBuildListNextUpQuery_PrefersRecentCompletedOverOlderPartialProgress(t *
|
||||
"uwp_ip.updated_at > ce.updated_at",
|
||||
"FROM user_history_hidden_items hhi",
|
||||
"uwp.updated_at <= hhi.hidden_before",
|
||||
"AND (uwp2.completed = TRUE OR uwp2.position_seconds > 0)",
|
||||
"ORDER BY e.series_id, uwp.updated_at DESC, e.season_number DESC, e.episode_number DESC",
|
||||
"LIMIT $3",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user