Merge branch 'master' into worktree-mosaic-library
# Conflicts: # scripts/extract-traces.test.ts
This commit is contained in:
@@ -44,7 +44,7 @@ pub struct Library {
|
||||
/// collection-type → category table any more than an item-type one. See
|
||||
/// `SearchScope::for_collection_type`.
|
||||
///
|
||||
/// TRACES: UR-075 | DR-173
|
||||
/// TRACES: UR-075 | DR-175
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub favorites_scope: Option<SearchScope>,
|
||||
}
|
||||
@@ -389,7 +389,7 @@ impl SearchScope {
|
||||
/// `All` is never returned: it is the *absence* of a category, offered
|
||||
/// alongside the libraries rather than derived from one.
|
||||
///
|
||||
/// TRACES: UR-075 | DR-173 | UT-161
|
||||
/// TRACES: UR-075 | DR-175 | UT-161
|
||||
pub fn for_collection_type(collection_type: &str) -> Option<SearchScope> {
|
||||
match collection_type {
|
||||
"movies" => Some(SearchScope::Movies),
|
||||
@@ -707,7 +707,7 @@ mod search_scope_tests {
|
||||
assert!(matches!(all.scope, Some(SearchScope::All)));
|
||||
}
|
||||
|
||||
/// TRACES: DR-173 | UT-161
|
||||
/// TRACES: DR-175 | UT-161
|
||||
#[test]
|
||||
fn test_collection_type_maps_to_its_favorites_scope() {
|
||||
assert_eq!(
|
||||
@@ -728,7 +728,7 @@ mod search_scope_tests {
|
||||
/// than one that opens an unfiltered list. `All` is never derived from a
|
||||
/// library — it is the cross-library entry offered beside them.
|
||||
///
|
||||
/// TRACES: DR-173 | UT-161
|
||||
/// TRACES: DR-175 | UT-161
|
||||
#[test]
|
||||
fn test_uncategorised_collection_types_have_no_favorites_scope() {
|
||||
for collection_type in ["livetv", "channels", "boxsets", "books", "unknown", ""] {
|
||||
@@ -740,7 +740,7 @@ mod search_scope_tests {
|
||||
}
|
||||
}
|
||||
|
||||
/// TRACES: DR-173 | UT-161
|
||||
/// TRACES: DR-175 | UT-161
|
||||
#[test]
|
||||
fn test_library_carries_its_favorites_scope_to_the_frontend() {
|
||||
let music = Library::new("1".into(), "Music".into(), "music".into(), None);
|
||||
|
||||
Reference in New Issue
Block a user