some fixes

This commit is contained in:
vapormusic 2022-06-26 07:49:46 +07:00
parent 5d3853d208
commit 0014999586
3 changed files with 8 additions and 5 deletions

View file

@ -1257,7 +1257,7 @@ export class BrowserWindow {
"assetUrl": "file:///" +audio, "assetUrl": "file:///" +audio,
"contentAdvisory": "", "contentAdvisory": "",
"releaseDateTime": "2022-05-13T00:23:00Z", "releaseDateTime": "2022-05-13T00:23:00Z",
"durationInMilliseconds": Math.floor((metadata.format.duration?? 0) * 1000), "durationInMillis": Math.floor((metadata.format.duration?? 0) * 1000),
"offers": [ "offers": [
{ {

View file

@ -185,15 +185,18 @@
return minutes + ":" + (seconds < 10 ? '0' : '') + seconds; return minutes + ":" + (seconds < 10 ? '0' : '') + seconds;
}, },
getDataType() { getDataType() {
let type = ''
if (typeof this.item.attributes.playParams != "undefined") { if (typeof this.item.attributes.playParams != "undefined") {
if (this.item.attributes.playParams?.isLibrary) { if (this.item.attributes.playParams?.isLibrary) {
return this.item.type type = this.item.type
} else { } else {
return this.item.attributes.playParams?.kind type = this.item.attributes.playParams?.kind
} }
} else { } else {
return this.item.type type = this.item.type
} }
if (type == 'podcast-episodes') type = 'episode';
return type;
}, },
select(e) { select(e) {
let data_type = this.getDataType() let data_type = this.getDataType()

View file

@ -231,7 +231,7 @@
}, },
"isPublic": true, "isPublic": true,
"description": { "description": {
"standard": "LocalSongs" "standard": ""
} }
}, },
"relationships": { "relationships": {