adjusted routeview for routes
This commit is contained in:
parent
f8491848fd
commit
05f97ad4a1
1 changed files with 121 additions and 107 deletions
|
@ -582,7 +582,9 @@ const app = new Vue({
|
||||||
console.log(kind, id, isLibrary)
|
console.log(kind, id, isLibrary)
|
||||||
|
|
||||||
if (true) {
|
if (true) {
|
||||||
|
if (kind == "playlist") {
|
||||||
app.showingPlaylist = [];
|
app.showingPlaylist = [];
|
||||||
|
}
|
||||||
if (kind.toString().includes("apple-curator")) {
|
if (kind.toString().includes("apple-curator")) {
|
||||||
kind = "appleCurator"
|
kind = "appleCurator"
|
||||||
app.getTypeFromID("appleCurator", (id), false, {
|
app.getTypeFromID("appleCurator", (id), false, {
|
||||||
|
@ -591,9 +593,13 @@ const app = new Vue({
|
||||||
extend: "editorialArtwork",
|
extend: "editorialArtwork",
|
||||||
"art[url]": "f"
|
"art[url]": "f"
|
||||||
});
|
});
|
||||||
|
window.location.hash = `${kind}/${id}`
|
||||||
|
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}`
|
||||||
|
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")) {
|
||||||
if (kind.toString().includes("record-label")) {
|
if (kind.toString().includes("record-label")) {
|
||||||
kind = "recordLabel"
|
kind = "recordLabel"
|
||||||
|
@ -606,15 +612,19 @@ const app = new Vue({
|
||||||
include: 'grouping,playlists',
|
include: 'grouping,playlists',
|
||||||
views: 'top-releases,latest-releases,top-artists'
|
views: 'top-releases,latest-releases,top-artists'
|
||||||
});
|
});
|
||||||
|
window.location.hash = `${kind}/${id}`
|
||||||
|
document.querySelector("#app-content").scrollTop = 0
|
||||||
} else if (!kind.toString().includes("radioStation") && !kind.toString().includes("song") && !kind.toString().includes("musicVideo") && !kind.toString().includes("uploadedVideo")) {
|
} else if (!kind.toString().includes("radioStation") && !kind.toString().includes("song") && !kind.toString().includes("musicVideo") && !kind.toString().includes("uploadedVideo")) {
|
||||||
app.page = (kind) + "_" + (id);
|
app.page = (kind) + "_" + (id);
|
||||||
app.getTypeFromID((kind), (id), (isLibrary), { extend: "editorialVideo" });
|
app.getTypeFromID((kind), (id), (isLibrary), { extend: "editorialVideo" });
|
||||||
|
window.location.hash = `${kind}/${id}`
|
||||||
|
document.querySelector("#app-content").scrollTop = 0
|
||||||
} else {
|
} else {
|
||||||
app.playMediaItemById((id), (kind), (isLibrary), item.attributes.url ?? '')
|
app.playMediaItemById((id), (kind), (isLibrary), item.attributes.url ?? '')
|
||||||
}
|
}
|
||||||
document.querySelector("#app-content").scrollTop = 0
|
|
||||||
}
|
}
|
||||||
window.location.hash = `${kind}/${id}`
|
|
||||||
},
|
},
|
||||||
async getNowPlayingItemDetailed(target) {
|
async getNowPlayingItemDetailed(target) {
|
||||||
let u = await app.mkapi(app.mk.nowPlayingItem.playParams.kind, (app.mk.nowPlayingItem.songId == -1), (app.mk.nowPlayingItem.songId != -1) ? app.mk.nowPlayingItem.songId : app.mk.nowPlayingItem["id"], { "include[songs]": "albums,artists" });
|
let u = await app.mkapi(app.mk.nowPlayingItem.playParams.kind, (app.mk.nowPlayingItem.songId == -1), (app.mk.nowPlayingItem.songId != -1) ? app.mk.nowPlayingItem.songId : app.mk.nowPlayingItem["id"], { "include[songs]": "albums,artists" });
|
||||||
|
@ -1337,10 +1347,14 @@ const app = new Vue({
|
||||||
});
|
});
|
||||||
app.lyrics = preLrc.reverse();
|
app.lyrics = preLrc.reverse();
|
||||||
} else {
|
} else {
|
||||||
preLrc = richsync.map(function (item){ return { startTime: item.ts,
|
preLrc = richsync.map(function (item) {
|
||||||
|
return {
|
||||||
|
startTime: item.ts,
|
||||||
endTime: item.te,
|
endTime: item.te,
|
||||||
line: item.x,
|
line: item.x,
|
||||||
translation: ''}})
|
translation: ''
|
||||||
|
}
|
||||||
|
})
|
||||||
if (preLrc.length > 0)
|
if (preLrc.length > 0)
|
||||||
preLrc.unshift({
|
preLrc.unshift({
|
||||||
startTime: 0,
|
startTime: 0,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue