Downloader fansub is now sets with configuration.

This commit is contained in:
Kylart 2017-04-16 15:22:31 +02:00
parent 68f7899152
commit 14d9229d77
2 changed files with 4 additions and 3 deletions

View File

@ -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

View File

@ -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.')