fix: spotify user detected as logged in when only spotify id is saved, causing favorites rendering errors; chore: removed logs
This commit is contained in:
parent
58642b6d48
commit
923f5355ed
File diff suppressed because one or more lines are too long
@ -220,14 +220,11 @@ export default {
|
|||||||
queue: initQueueList,
|
queue: initQueueList,
|
||||||
restored
|
restored
|
||||||
} = data
|
} = data
|
||||||
console.log({ initQueueList })
|
|
||||||
|
|
||||||
const initQueueComplete = Object.values(initQueueList)
|
const initQueueComplete = Object.values(initQueueList)
|
||||||
.filter(el => ['completed', 'withErrors', 'failed'].includes(el.status))
|
.filter(el => ['completed', 'withErrors', 'failed'].includes(el.status))
|
||||||
.map(el => el.uuid)
|
.map(el => el.uuid)
|
||||||
|
|
||||||
console.log({ initQueueComplete })
|
|
||||||
|
|
||||||
if (initQueueComplete && initQueueComplete.length) {
|
if (initQueueComplete && initQueueComplete.length) {
|
||||||
initQueueComplete.forEach(item => {
|
initQueueComplete.forEach(item => {
|
||||||
initQueueList[item].silent = true
|
initQueueList[item].silent = true
|
||||||
|
@ -124,7 +124,6 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showSearchbarMenu(url) {
|
showSearchbarMenu(url) {
|
||||||
console.log(url)
|
|
||||||
const searchbar = document.getElementById('searchbar')
|
const searchbar = document.getElementById('searchbar')
|
||||||
searchbar.dataset.cmLink = url
|
searchbar.dataset.cmLink = url
|
||||||
const contextMenuEvent = {
|
const contextMenuEvent = {
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
<div v-if="playlists.length == 0">
|
<div v-if="playlists.length == 0">
|
||||||
<h1>{{ $t('favorites.noPlaylists') }}</h1>
|
<h1>{{ $t('favorites.noPlaylists') }}</h1>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="playlists.length > 0 || spotifyPlaylists > 0" class="release-grid">
|
<div v-if="playlists.length > 0 || spotifyPlaylists.length > 0" class="release-grid">
|
||||||
<div v-for="release in playlists" :key="release.id" class="release">
|
<div v-for="release in playlists" :key="release.id" class="release">
|
||||||
<router-link :to="{ name: 'Playlist', params: { id: release.id } }" class="cursor-pointer" tag="div">
|
<router-link :to="{ name: 'Playlist', params: { id: release.id } }" class="cursor-pointer" tag="div">
|
||||||
<CoverContainer :cover="release.picture_medium" :link="release.link" is-rounded @click.stop="addToQueue" />
|
<CoverContainer :cover="release.picture_medium" :link="release.link" is-rounded @click.stop="addToQueue" />
|
||||||
@ -63,7 +63,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-show="activeTab === 'album'">
|
<div v-show="activeTab === 'album'">
|
||||||
<div v-if="albums.length == 0">
|
<div v-if="albums.length === 0">
|
||||||
<h1>{{ $t('favorites.noAlbums') }}</h1>
|
<h1>{{ $t('favorites.noAlbums') }}</h1>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="albums.length > 0" class="release-grid">
|
<div v-if="albums.length > 0" class="release-grid">
|
||||||
@ -183,7 +183,7 @@ export default defineComponent({
|
|||||||
BaseTabs,
|
BaseTabs,
|
||||||
BaseTab
|
BaseTab
|
||||||
},
|
},
|
||||||
setup(props, ctx) {
|
setup(_, ctx) {
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
activeTab: 'playlist',
|
activeTab: 'playlist',
|
||||||
tabs: ['playlist', 'album', 'artist', 'track']
|
tabs: ['playlist', 'album', 'artist', 'track']
|
||||||
@ -251,7 +251,6 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
getActiveRelease(tab = this.activeTab) {
|
getActiveRelease(tab = this.activeTab) {
|
||||||
let toDownload
|
let toDownload
|
||||||
// console.log({ tab, play: this.playlists })
|
|
||||||
|
|
||||||
switch (tab) {
|
switch (tab) {
|
||||||
case 'playlist':
|
case 'playlist':
|
||||||
|
@ -191,12 +191,9 @@ export default defineComponent({
|
|||||||
const currentTabKey = `${type}Tab`
|
const currentTabKey = `${type}Tab`
|
||||||
let next = total
|
let next = total
|
||||||
|
|
||||||
// console.log({ currentTabKey, test: state.currentTab.searchType })
|
|
||||||
|
|
||||||
if (nextResult) {
|
if (nextResult) {
|
||||||
next = parseInt(nextResult.match(/index=(\d*)/)[1])
|
next = parseInt(nextResult.match(/index=(\d*)/)[1])
|
||||||
}
|
}
|
||||||
// console.log({ next, total, type, newData })
|
|
||||||
|
|
||||||
if (state.results[currentTabKey].total !== total) {
|
if (state.results[currentTabKey].total !== total) {
|
||||||
state.results[currentTabKey].total = total
|
state.results[currentTabKey].total = total
|
||||||
|
@ -81,7 +81,7 @@ const getters = {
|
|||||||
getClientMode: state => state.clientMode,
|
getClientMode: state => state.clientMode,
|
||||||
|
|
||||||
isLoggedIn: state => !!state.arl,
|
isLoggedIn: state => !!state.arl,
|
||||||
isLoggedWithSpotify: state => !!state.spotifyUser.id
|
isLoggedWithSpotify: state => !!state.spotifyUser.id && !!state.spotifyUser.name
|
||||||
}
|
}
|
||||||
|
|
||||||
const mutations = {
|
const mutations = {
|
||||||
|
@ -12,7 +12,7 @@ class CustomSocket extends WebSocket {
|
|||||||
|
|
||||||
on(key, cb) {
|
on(key, cb) {
|
||||||
if (!Object.keys(this.listeners).includes(key)) {
|
if (!Object.keys(this.listeners).includes(key)) {
|
||||||
console.log('on:', key)
|
// console.log('on:', key)
|
||||||
this.listeners[key] = cb
|
this.listeners[key] = cb
|
||||||
|
|
||||||
this.addEventListener('message', event => {
|
this.addEventListener('message', event => {
|
||||||
@ -27,7 +27,7 @@ class CustomSocket extends WebSocket {
|
|||||||
|
|
||||||
off(key) {
|
off(key) {
|
||||||
if (Object.keys(this.listeners).includes(key)) {
|
if (Object.keys(this.listeners).includes(key)) {
|
||||||
console.log('off:', key)
|
// console.log('off:', key)
|
||||||
this.removeEventListener('message', this.listeners[key])
|
this.removeEventListener('message', this.listeners[key])
|
||||||
delete this.listeners[key]
|
delete this.listeners[key]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user