mirror of
https://github.com/Myxelium/Bridge-Multi.git
synced 2026-04-11 14:19:38 +00:00
Improved chart pack destination folder name
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import { FileDownloader } from './FileDownloader'
|
import { FileDownloader } from './FileDownloader'
|
||||||
import { join } from 'path'
|
import { join, parse } from 'path'
|
||||||
import { FileExtractor } from './FileExtractor'
|
import { FileExtractor } from './FileExtractor'
|
||||||
import { sanitizeFilename, interpolate } from '../../shared/UtilFunctions'
|
import { sanitizeFilename, interpolate } from '../../shared/UtilFunctions'
|
||||||
import { emitIPCEvent } from '../../main'
|
import { emitIPCEvent } from '../../main'
|
||||||
@@ -46,7 +46,11 @@ export class ChartDownload {
|
|||||||
this.updateGUI('', 'Waiting for other downloads to finish...', 'good')
|
this.updateGUI('', 'Waiting for other downloads to finish...', 'good')
|
||||||
this.files = data.driveData.files
|
this.files = data.driveData.files
|
||||||
this.individualFileProgressPortion = 80 / this.files.length
|
this.individualFileProgressPortion = 80 / this.files.length
|
||||||
this.destinationFolderName = sanitizeFilename(`${this.data.artist} - ${this.data.avTagName} (${this.data.charter})`)
|
if (data.driveData.inChartPack) {
|
||||||
|
this.destinationFolderName = sanitizeFilename(parse(data.driveData.files[0].name).name)
|
||||||
|
} else {
|
||||||
|
this.destinationFolderName = sanitizeFilename(`${this.data.artist} - ${this.data.avTagName} (${this.data.charter})`)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export interface NewDownload {
|
|||||||
avTagName: string
|
avTagName: string
|
||||||
artist: string
|
artist: string
|
||||||
charter: string
|
charter: string
|
||||||
driveData: DriveChart
|
driveData: DriveChart & { inChartPack: boolean }
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user