mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-05-17 07:21:58 +00:00
ref(folder): remove trailing (none) when no genre is set
This commit is contained in:
parent
17b1b46164
commit
42247c1d57
1 changed files with 7 additions and 2 deletions
|
|
@ -62,7 +62,7 @@ data class CollectionSource(
|
||||||
addonId = sourceAddonId,
|
addonId = sourceAddonId,
|
||||||
type = sourceType,
|
type = sourceType,
|
||||||
catalogId = sourceCatalogId,
|
catalogId = sourceCatalogId,
|
||||||
genre = genre,
|
genre = genre.normalizedOptionalGenre(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -193,7 +193,7 @@ data class CollectionFolder(
|
||||||
addonId = source.addonId,
|
addonId = source.addonId,
|
||||||
type = source.type,
|
type = source.type,
|
||||||
catalogId = source.catalogId,
|
catalogId = source.catalogId,
|
||||||
genre = source.genre,
|
genre = source.genre.normalizedOptionalGenre(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -217,6 +217,11 @@ data class Collection(
|
||||||
get() = FolderViewMode.fromString(viewMode)
|
get() = FolderViewMode.fromString(viewMode)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun String?.normalizedOptionalGenre(): String? =
|
||||||
|
this
|
||||||
|
?.trim()
|
||||||
|
?.takeIf { it.isNotEmpty() && !it.equals("none", ignoreCase = true) }
|
||||||
|
|
||||||
data class AvailableCatalog(
|
data class AvailableCatalog(
|
||||||
val addonId: String,
|
val addonId: String,
|
||||||
val addonName: String,
|
val addonName: String,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue