fix: time display for album track list

This commit is contained in:
Phan An 2022-10-31 17:16:09 +01:00
parent dfe1a8e45c
commit 75a6ef2107
No known key found for this signature in database
GPG key ID: A81E4477F0BB6FDC
2 changed files with 3 additions and 3 deletions

View file

@ -17,7 +17,7 @@ import { computed, defineAsyncComponent, Ref, toRefs } from 'vue'
import { queueStore, songStore } from '@/stores'
import { authService, playbackService } from '@/services'
import { useThirdPartyServices } from '@/composables'
import { requireInjection, secondsToHumanReadable } from '@/utils'
import { requireInjection, secondsToHis } from '@/utils'
import { SongsKey } from '@/symbols'
const AppleMusicButton = defineAsyncComponent(() => import('@/components/ui/AppleMusicButton.vue'))
@ -31,7 +31,7 @@ const songsToMatchAgainst = requireInjection<Ref<Song[]>>(SongsKey)
const matchedSong = computed(() => songStore.match(track.value.title, songsToMatchAgainst.value))
const tooltip = computed(() => matchedSong.value ? 'Click to play' : '')
const fmtLength = computed(() => secondsToHumanReadable(track.value.length))
const fmtLength = computed(() => secondsToHis(track.value.length))
const active = computed(() => matchedSong.value && matchedSong.value.playback_state !== 'Stopped')

View file

@ -2,6 +2,6 @@
exports[`renders 1`] = `
<div class="track-list-item" title="" tabindex="0" data-v-da281390=""><span class="title" data-v-da281390="">Fahrstuhl to Heaven</span>
<!----><span class="length" data-v-da281390="">4 min 40 sec</span>
<!----><span class="length" data-v-da281390="">04:40</span>
</div>
`;