mirror of https://github.com/Kylart/KawAnime.git
Downloading all episode from releases or watchLists will now pop a magnet modal up if the config magnets is on
This commit is contained in:
parent
820e3eb1d2
commit
e9665e02fd
|
@ -82,8 +82,6 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios'
|
||||
|
||||
export default {
|
||||
mounted () {
|
||||
if (this.releases.length) {
|
||||
|
@ -132,22 +130,13 @@
|
|||
|
||||
const {quality, fansub} = this.$store.state.releases.params
|
||||
|
||||
axios.post('download', {
|
||||
name: name,
|
||||
quality: quality,
|
||||
this.$store.dispatch('downloader/download', {
|
||||
name,
|
||||
quality,
|
||||
fansub,
|
||||
fromEp: 0,
|
||||
untilEp: 20000,
|
||||
fansub: fansub,
|
||||
choice: 'si'
|
||||
}).then(({data}) => {
|
||||
console.log(`[${(new Date()).toLocaleTimeString()}]: Server responded!`)
|
||||
|
||||
data.forEach((link) => {
|
||||
window.open(link)
|
||||
})
|
||||
}).catch((err) => {
|
||||
console.log(`[${(new Date()).toLocaleTimeString()}]: An error occurred... ${err}`)
|
||||
this.$store.commit('setInfoSnackbar', `An error occurred while getting ${name}.`)
|
||||
})
|
||||
},
|
||||
async refresh () {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
v-layout.form-container(row, wrap, justify-center)
|
||||
v-flex.season-container(sm3, xs8)
|
||||
v-select(
|
||||
v-bind:items='seasonChoices',
|
||||
:items='seasonChoices',
|
||||
v-model='$store.state.seasons.season',
|
||||
label='Season',
|
||||
dark, item-text='name',
|
||||
|
@ -21,7 +21,7 @@
|
|||
v-tabs-item(v-for='i in 3', :href="'#' + i", :key='i')
|
||||
| {{ season[i].name }}
|
||||
v-tabs-items
|
||||
v-tabs-content(v-for='i in 3', lazy, v-bind:id='`${i}`', :key='i')
|
||||
v-tabs-content(v-for='i in 3', lazy, :id='`${i}`', :key='i')
|
||||
v-text-field.query(v-model='query', label='Search entry', dark)
|
||||
v-layout.elems(row, wrap)
|
||||
transition-group(name='list')
|
||||
|
@ -106,22 +106,22 @@
|
|||
}
|
||||
},
|
||||
computed: {
|
||||
seasons: function () {
|
||||
seasons () {
|
||||
return this.$store.state.seasons.seasons
|
||||
},
|
||||
stats: function () {
|
||||
stats () {
|
||||
return this.$store.state.seasons.seasonsStats
|
||||
},
|
||||
TVs: function () {
|
||||
TVs () {
|
||||
return this.seasons.TV
|
||||
},
|
||||
OVAs: function () {
|
||||
OVAs () {
|
||||
return this.seasons.OVAs
|
||||
},
|
||||
Movies: function () {
|
||||
Movies () {
|
||||
return this.seasons.Movies
|
||||
},
|
||||
season: function () {
|
||||
season () {
|
||||
return [
|
||||
'',
|
||||
{name: 'TV', items: this.TVs},
|
||||
|
@ -129,7 +129,7 @@
|
|||
{name: 'Movies', items: this.Movies}
|
||||
]
|
||||
},
|
||||
computedSeason: function () {
|
||||
computedSeason () {
|
||||
const query = this.query.toLowerCase()
|
||||
return query === ''
|
||||
? this.season
|
||||
|
|
|
@ -4,13 +4,15 @@ export default {
|
|||
async download ({state, commit, rootState}, obj = {}) {
|
||||
const isDownloader = obj.isDownloader || true
|
||||
const name = obj.name || state.form.name
|
||||
const fromEp = state.form.fromEp !== ''
|
||||
const fromEp = obj.fromEp || (state.form.fromEp !== ''
|
||||
? state.form.fromEp
|
||||
: 0
|
||||
const untilEp = state.form.untilEp !== ''
|
||||
)
|
||||
const untilEp = obj.untilEp || (state.form.untilEp !== ''
|
||||
? state.form.untilEp
|
||||
: 20000
|
||||
const quality = isDownloader ? state.form.quality : rootState.config.config.quality
|
||||
)
|
||||
const quality = obj.quality || (isDownloader ? state.form.quality : rootState.config.config.quality)
|
||||
|
||||
const magnets = rootState.config.config.magnets
|
||||
|
||||
|
|
Loading…
Reference in New Issue