-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Offline mode support #20
Comments
I now looked at the code and saw that only some of the information was saved. |
If you solved it, can you share? |
I edited the "getTrackMetaProps" function (attached below code). async getTrackMetaProps(track) {
let meta = track.metadata;
let testArt = [meta.artist_name];
for(let i = 1; true; i++){
if(meta["artist_name:" + i] != undefined){
testArt.push(meta["artist_name:" + i]);
}
else{
break;
}
}
document.getElementById("console").innerText = testArt.toString();
//let extraMeta = await _resources__WEBPACK_IMPORTED_MODULE_2__["default"].getTrackMetadataWG(track.uri);
let { year, month, day } = [0, 0, 0];//extraMeta.album.date;
let date = [year, month, day];
//Truncate date to available precision
if (!day)
date.pop();
if (!month)
date.pop();
return {
title: meta.title,
album_artist: meta.artist_name,
album: meta.album_title,
artist: testArt.join("/"), //extraMeta.artist.map(v => v.name).join("/"),
track: meta.album_track_number,
totaltracks: meta.album_track_count,
disc: meta.album_disc_number,
totaldiscs: meta.album_disc_count,
date: date.map(x => _utils__WEBPACK_IMPORTED_MODULE_0__["default"].padInt(x, 2)).join('-'),
publisher: "YE Software ~ Soggfy", //extraMeta.album.label,
language: undefined, //extraMeta.language_of_performance?.[0],
isrc: undefined, //extraMeta.external_id.find(v => v.type === "isrc")?.id,
comment: _resources__WEBPACK_IMPORTED_MODULE_2__["default"].getOpenTrackURL(track.uri),
explicit: meta.is_explicit ? "1" : undefined
};
} |
i find that the snippet you have written above does not properly work, in the version provided in the readme (version 1.1.84.716), the written code ends up erroring out: |
I think commenting out (that request will almost always be cached, since Spotify always makes it whenever a song starts playing for some reason). |
No, this is not a duplication of #19 .
I wanted to ask if in case the songs already exist on the computer offline, is it possible to cancel the requests to Spotify's server (because then it blocks me after some time).
The information should be stored locally on the computer, and there is no need to make a new request to the server.
Thanks.
The text was updated successfully, but these errors were encountered: