mirror of https://github.com/Kylart/KawAnime.git
Downloader fansub is now sets with configuration.
This commit is contained in:
parent
68f7899152
commit
14d9229d77
|
@ -16,8 +16,6 @@ const DIR = path.join(os.userInfo().homedir, '.KawAnime')
|
|||
// Nyanpasu ~
|
||||
const player = require('play-sound')(opts = {})
|
||||
|
||||
const fansub = 'HorribleSubs'
|
||||
|
||||
const deleteOldTorrents = () => {
|
||||
console.log('[Downloader] Processing to purge all old torrent files.')
|
||||
|
||||
|
@ -127,6 +125,7 @@ exports.download = (url, res) => {
|
|||
//noinspection JSUnresolvedVariable
|
||||
const withMagnets = query.magnets || false
|
||||
|
||||
const fansub = query.fansub
|
||||
const quality = query.quality || '720p'
|
||||
const name = query.name.split('_').join(' ')
|
||||
const fromEp = query.fromEp || 0
|
||||
|
|
|
@ -234,10 +234,12 @@ const store = new Vuex.Store({
|
|||
const quality = state.downloaderForm.quality
|
||||
|
||||
const magnets = state.config.magnets
|
||||
const fansub = state.config.fansub
|
||||
|
||||
console.log(`Received a request to download ${name} from ep ${fromEp} to ep ${untilEp}. Transmitting...`)
|
||||
|
||||
const {data, status} = await axios.get(`download?name=${name}&fromEp=${fromEp}&untilEp=${untilEp}&quality=${quality}&magnets=${magnets}`)
|
||||
const {data, status} = await axios.get(
|
||||
`download?name=${name}&fromEp=${fromEp}&untilEp=${untilEp}&quality=${quality}&magnets=${magnets}&fansub=${fansub}`)
|
||||
|
||||
status === 404
|
||||
? console.log('Oops. It looks like something went wrong. Please check your internet connection and retry.')
|
||||
|
|
Loading…
Reference in New Issue