mirror of
https://gitlab.com/RemixDev/deemix-js.git
synced 2024-12-28 02:16:08 +00:00
renamed localTrack prop to local
This commit is contained in:
parent
d561b26c98
commit
2e30a59a8f
|
@ -132,7 +132,7 @@ async function getPreferredBitrate(dz, track, preferredBitrate, shouldFallback,
|
||||||
return url
|
return url
|
||||||
}
|
}
|
||||||
|
|
||||||
if (track.localTrack) {
|
if (track.local) {
|
||||||
let url = await getCorrectURL(track, "MP3_MISC", TrackFormats.LOCAL, feelingLucky)
|
let url = await getCorrectURL(track, "MP3_MISC", TrackFormats.LOCAL, feelingLucky)
|
||||||
track.urls["MP3_MISC"] = url
|
track.urls["MP3_MISC"] = url
|
||||||
return TrackFormats.LOCAL
|
return TrackFormats.LOCAL
|
||||||
|
|
|
@ -29,7 +29,7 @@ class Track {
|
||||||
this.fallbackID = "0"
|
this.fallbackID = "0"
|
||||||
this.albumsFallback = []
|
this.albumsFallback = []
|
||||||
this.filesizes = {}
|
this.filesizes = {}
|
||||||
this.localTrack = false
|
this.local = false
|
||||||
this.mainArtist = null
|
this.mainArtist = null
|
||||||
this.artist = {"Main": []}
|
this.artist = {"Main": []}
|
||||||
this.artists = []
|
this.artists = []
|
||||||
|
@ -65,7 +65,7 @@ class Track {
|
||||||
this.filesizes = trackAPI.filesizes
|
this.filesizes = trackAPI.filesizes
|
||||||
this.fallbackID = "0"
|
this.fallbackID = "0"
|
||||||
if (trackAPI.fallback_id) this.fallbackID = trackAPI.fallback_id
|
if (trackAPI.fallback_id) this.fallbackID = trackAPI.fallback_id
|
||||||
this.localTrack = parseInt(this.id) < 0
|
this.local = parseInt(this.id) < 0
|
||||||
this.urls = {}
|
this.urls = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ class Track {
|
||||||
this.parseEssentialData(trackAPI)
|
this.parseEssentialData(trackAPI)
|
||||||
|
|
||||||
// only public api has bpm
|
// only public api has bpm
|
||||||
if (!trackAPI.bpm && !this.localTrack){
|
if (!trackAPI.bpm && !this.local){
|
||||||
try {
|
try {
|
||||||
let trackAPI_new = await dz.api.get_track(trackAPI.id)
|
let trackAPI_new = await dz.api.get_track(trackAPI.id)
|
||||||
trackAPI_new.release_date = trackAPI.release_date
|
trackAPI_new.release_date = trackAPI.release_date
|
||||||
|
@ -89,7 +89,7 @@ class Track {
|
||||||
catch { /*empty*/ }
|
catch { /*empty*/ }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.localTrack){
|
if (this.local){
|
||||||
this.parseLocalTrackData(trackAPI)
|
this.parseLocalTrackData(trackAPI)
|
||||||
}else{
|
}else{
|
||||||
this.parseTrack(trackAPI)
|
this.parseTrack(trackAPI)
|
||||||
|
|
Loading…
Reference in a new issue