mirror of
https://github.com/koel/koel
synced 2024-11-14 00:17:13 +00:00
fix: some song lists' filtering were broken (#1865)
This commit is contained in:
parent
63f2dc5241
commit
b4e657686c
3 changed files with 10 additions and 7 deletions
|
@ -294,7 +294,7 @@ const onPlay = async (playable: Playable) => {
|
|||
const discIndexMap = computed(() => {
|
||||
const map: { [key: number]: number } = {}
|
||||
rows.value.forEach((row, index) => {
|
||||
const { disc } = row.playable
|
||||
const { disc } = row.playable as Song
|
||||
if (!Object.values(map).includes(disc)) {
|
||||
map[index] = disc
|
||||
}
|
||||
|
|
|
@ -29,18 +29,21 @@ import ThumbnailStack from '@/components/ui/ThumbnailStack.vue'
|
|||
export const useSongList = (
|
||||
playables: Ref<Playable[]>,
|
||||
context: PlayableListContext = {},
|
||||
config: Partial<PlayableListConfig> = {
|
||||
config: Partial<PlayableListConfig> = {},
|
||||
) => {
|
||||
const defaultConfig: PlayableListConfig = {
|
||||
filterable: true,
|
||||
sortable: true,
|
||||
reorderable: false,
|
||||
collaborative: false,
|
||||
hasCustomOrderSort: false,
|
||||
},
|
||||
) => {
|
||||
const filterKeywords = ref('')
|
||||
config = reactive(config)
|
||||
}
|
||||
|
||||
config = reactive({ ...defaultConfig, ...config })
|
||||
context = reactive(context)
|
||||
|
||||
const filterKeywords = ref('')
|
||||
|
||||
const { isCurrentScreen, go, url } = useRouter()
|
||||
|
||||
const fuzzy = config.filterable
|
||||
|
|
2
resources/assets/js/types.d.ts
vendored
2
resources/assets/js/types.d.ts
vendored
|
@ -161,7 +161,7 @@ interface Song extends Playable {
|
|||
album_artist_name: Artist['name']
|
||||
genre: string
|
||||
track: number | null
|
||||
disc: number | null
|
||||
disc: number
|
||||
year: number | null
|
||||
lyrics: string
|
||||
is_public: boolean
|
||||
|
|
Loading…
Reference in a new issue