fix library stuff not loading properly
This commit is contained in:
parent
cc40cf0c50
commit
5be1690553
1 changed files with 7 additions and 5 deletions
|
@ -984,6 +984,7 @@ const app = new Vue({
|
||||||
return hash;
|
return hash;
|
||||||
},
|
},
|
||||||
appRoute(route) {
|
appRoute(route) {
|
||||||
|
console.log(route)
|
||||||
if (route == "" || route == "#" || route == "/") {
|
if (route == "" || route == "#" || route == "/") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -997,12 +998,13 @@ const app = new Vue({
|
||||||
let hash = route.split("/")
|
let hash = route.split("/")
|
||||||
let page = hash[0]
|
let page = hash[0]
|
||||||
let id = hash[1]
|
let id = hash[1]
|
||||||
console.log(`page: ${page} id: ${id}`)
|
let isLibrary = hash[2] ?? false
|
||||||
|
console.log(`page: ${page} id: ${id} isLibrary: ${isLibrary}`)
|
||||||
this.routeView({
|
this.routeView({
|
||||||
kind: page,
|
kind: page,
|
||||||
id: id,
|
id: id,
|
||||||
attributes: {
|
attributes: {
|
||||||
playParams: {kind: page, id: id}
|
playParams: {kind: page, id: id, isLibrary: isLibrary}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -1028,8 +1030,8 @@ const app = new Vue({
|
||||||
window.location.hash = `${kind}/${id}`
|
window.location.hash = `${kind}/${id}`
|
||||||
document.querySelector("#app-content").scrollTop = 0
|
document.querySelector("#app-content").scrollTop = 0
|
||||||
} else if (kind.toString().includes("artist")) {
|
} else if (kind.toString().includes("artist")) {
|
||||||
app.getArtistInfo(id, isLibrary)
|
app.getArtistInfo(id, isLibrary)
|
||||||
window.location.hash = `${kind}/${id}`
|
window.location.hash = `${kind}/${id}${isLibrary ? "/"+isLibrary : ''}`
|
||||||
document.querySelector("#app-content").scrollTop = 0
|
document.querySelector("#app-content").scrollTop = 0
|
||||||
|
|
||||||
} else if (kind.toString().includes("record-label") || kind.toString().includes("curator")) {
|
} else if (kind.toString().includes("record-label") || kind.toString().includes("curator")) {
|
||||||
|
@ -1050,7 +1052,7 @@ const app = new Vue({
|
||||||
let params = {extend: "editorialVideo"}
|
let params = {extend: "editorialVideo"}
|
||||||
app.page = (kind) + "_" + (id);
|
app.page = (kind) + "_" + (id);
|
||||||
app.getTypeFromID((kind), (id), (isLibrary), params);
|
app.getTypeFromID((kind), (id), (isLibrary), params);
|
||||||
window.location.hash = `${kind}/${id}`
|
window.location.hash = `${kind}/${id}${isLibrary ? "/"+isLibrary : ''}`
|
||||||
document.querySelector("#app-content").scrollTop = 0
|
document.querySelector("#app-content").scrollTop = 0
|
||||||
} else {
|
} else {
|
||||||
app.playMediaItemById((id), (kind), (isLibrary), item.attributes.url ?? '')
|
app.playMediaItemById((id), (kind), (isLibrary), item.attributes.url ?? '')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue