Fix crash when using old queue files
This commit is contained in:
parent
516eb2557f
commit
6d771b1faf
@ -363,9 +363,19 @@ export class DeemixApp {
|
|||||||
switch (currentItem.__type__) {
|
switch (currentItem.__type__) {
|
||||||
case 'Single':
|
case 'Single':
|
||||||
downloadObject = new Single(currentItem)
|
downloadObject = new Single(currentItem)
|
||||||
|
// Remove old incompatible queue items
|
||||||
|
if (downloadObject.single.trackAPI_gw) {
|
||||||
|
fs.unlinkSync(configFolder + `queue${sep}${filename}`)
|
||||||
|
return
|
||||||
|
}
|
||||||
break
|
break
|
||||||
case 'Collection':
|
case 'Collection':
|
||||||
downloadObject = new Collection(currentItem)
|
downloadObject = new Collection(currentItem)
|
||||||
|
// Remove old incompatible queue items
|
||||||
|
if (downloadObject.collection.tracks_gw) {
|
||||||
|
fs.unlinkSync(configFolder + `queue${sep}${filename}`)
|
||||||
|
return
|
||||||
|
}
|
||||||
break
|
break
|
||||||
case 'Convertable':
|
case 'Convertable':
|
||||||
downloadObject = new Convertable(currentItem)
|
downloadObject = new Convertable(currentItem)
|
||||||
|
Loading…
Reference in New Issue
Block a user