diff --git a/assets/scripts/init/downloader.js b/assets/scripts/init/downloader.js index 4401007..7555428 100644 --- a/assets/scripts/init/downloader.js +++ b/assets/scripts/init/downloader.js @@ -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 diff --git a/store/index.js b/store/index.js index a5f2735..4359336 100644 --- a/store/index.js +++ b/store/index.js @@ -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.')