2017-04-15 14:16:14 +00:00
|
|
|
<template xmlns:v-tooltip="http://www.w3.org/1999/xhtml" xmlns:v-bind="http://www.w3.org/1999/xhtml">
|
2017-05-13 14:38:17 +00:00
|
|
|
<v-container fluid class="container">
|
|
|
|
<div v-if="$store.state.releases.length">
|
|
|
|
<v-row style="margin: 0 1% 0 1%;">
|
2017-06-30 14:45:11 +00:00
|
|
|
<v-col md4 sm4 xs12 class="time-container">
|
2017-06-30 15:27:27 +00:00
|
|
|
<span class="update-time">Updated {{ lastUpdateTime }}.</span>
|
2017-05-13 14:38:17 +00:00
|
|
|
</v-col>
|
2017-06-30 14:45:11 +00:00
|
|
|
<v-col md4 sm1 xs0></v-col>
|
2017-05-13 14:38:17 +00:00
|
|
|
<v-col md2 sm3 xs12>
|
2017-05-30 07:26:24 +00:00
|
|
|
<v-select
|
|
|
|
class="select"
|
|
|
|
v-bind:items="fansubList"
|
|
|
|
v-model="$store.state.releaseFansub"
|
|
|
|
label="Fansub"
|
|
|
|
dark
|
|
|
|
single-line
|
|
|
|
hint="Pick a fansub"
|
|
|
|
persistent-hint
|
|
|
|
/>
|
|
|
|
</v-col>
|
|
|
|
<v-col md1 sm2 xs12>
|
2017-05-13 14:38:17 +00:00
|
|
|
<v-select
|
|
|
|
class="select"
|
|
|
|
v-bind:items="qualityList"
|
|
|
|
v-model="$store.state.releaseQuality"
|
|
|
|
label="Quality"
|
|
|
|
dark
|
|
|
|
single-line
|
|
|
|
hint="Which quality ?"
|
|
|
|
persistent-hint
|
|
|
|
/>
|
|
|
|
</v-col>
|
|
|
|
<v-col md1 sm1 xs12 class="refresh-button-container">
|
|
|
|
<v-btn icon
|
|
|
|
class="refresh-button"
|
|
|
|
@click.native="refresh()">
|
|
|
|
<v-icon large>refresh</v-icon>
|
|
|
|
</v-btn>
|
|
|
|
</v-col>
|
|
|
|
<template v-for="item in $store.state.releases">
|
|
|
|
<v-col xs12 md6 xl4
|
|
|
|
class="elem">
|
|
|
|
<v-card class="elem-content elevation-3" v-ripple="true">
|
|
|
|
<v-card-text class="elem-card">
|
|
|
|
<v-container fluid style="padding: 0;">
|
|
|
|
<v-row>
|
2017-05-17 21:24:31 +00:00
|
|
|
<v-col class="elem-title" xs9 v-tooltip:top="{ html: item.rawName }">
|
2017-05-13 14:38:17 +00:00
|
|
|
<h6>{{ item.rawName }}</h6>
|
|
|
|
</v-col>
|
2017-05-14 19:47:44 +00:00
|
|
|
<v-col v-tooltip:top="{ html: 'Episode ' + item.ep }"
|
|
|
|
class="elem-ep text-xs-right" xs3>
|
2017-05-13 14:38:17 +00:00
|
|
|
<h6>Ep {{ item.ep }}</h6>
|
|
|
|
</v-col>
|
|
|
|
<v-col class="elem-image"
|
|
|
|
xl5 lg4 md5 sm3 xs4>
|
|
|
|
<img v-bind:src="item.picture" height="200" class="picture"/>
|
|
|
|
</v-col>
|
|
|
|
<v-col xl7 lg8 md7 sm9 xs8>
|
|
|
|
<div class="elem-text-links">
|
|
|
|
<div class="synopsis">
|
|
|
|
<p>{{ item.synopsis }}</p>
|
|
|
|
</div>
|
|
|
|
<div class="links">
|
|
|
|
<a :href="item.magnetLink" class="download-button">
|
|
|
|
<v-btn dark flat
|
|
|
|
@click.native="print(item)"
|
|
|
|
class="btn--light-flat-pressed">
|
|
|
|
Download
|
|
|
|
</v-btn>
|
|
|
|
</a>
|
|
|
|
<v-menu transition="v-slide-x-transition">
|
|
|
|
<v-btn flat dark slot="activator">
|
|
|
|
More
|
|
|
|
</v-btn>
|
|
|
|
<v-list>
|
|
|
|
<v-list-item>
|
2017-07-03 18:22:48 +00:00
|
|
|
<v-list-tile v-on:click.native="openModal(item.rawName, item.fullSynopsis)">
|
2017-05-17 21:37:10 +00:00
|
|
|
<v-list-tile-action>
|
|
|
|
<v-icon>more</v-icon>
|
|
|
|
</v-list-tile-action>
|
2017-05-16 12:38:36 +00:00
|
|
|
<v-list-tile-title>
|
2017-05-13 14:38:17 +00:00
|
|
|
Check synopsis
|
|
|
|
</v-list-tile-title>
|
|
|
|
</v-list-tile>
|
|
|
|
</v-list-item>
|
|
|
|
<v-list-item>
|
2017-05-16 12:38:36 +00:00
|
|
|
<v-list-tile v-on:click.native="downloadAll(item.rawName)">
|
2017-05-17 21:37:10 +00:00
|
|
|
<v-list-tile-action>
|
|
|
|
<v-icon>file_download</v-icon>
|
|
|
|
</v-list-tile-action>
|
2017-05-16 12:38:36 +00:00
|
|
|
<v-list-tile-title>
|
2017-05-13 14:38:17 +00:00
|
|
|
Download all episodes
|
|
|
|
</v-list-tile-title>
|
|
|
|
</v-list-tile>
|
|
|
|
</v-list-item>
|
|
|
|
<v-list-item>
|
|
|
|
<v-list-tile>
|
2017-05-17 21:37:10 +00:00
|
|
|
<v-list-tile-action>
|
|
|
|
<v-icon>info_outline</v-icon>
|
|
|
|
</v-list-tile-action>
|
2017-05-13 14:38:17 +00:00
|
|
|
<v-list-tile-title>Information</v-list-tile-title>
|
|
|
|
</v-list-tile>
|
|
|
|
</v-list-item>
|
2017-06-27 12:22:57 +00:00
|
|
|
<v-list-item>
|
|
|
|
<v-list-tile @click.native="showChoices(item.rawName)">
|
2017-05-17 21:37:10 +00:00
|
|
|
<v-list-tile-action>
|
2017-06-27 12:22:57 +00:00
|
|
|
<v-icon>add_box</v-icon>
|
2017-05-17 21:37:10 +00:00
|
|
|
</v-list-tile-action>
|
2017-06-27 12:22:57 +00:00
|
|
|
<v-list-tile-title>
|
|
|
|
Add to
|
|
|
|
</v-list-tile-title>
|
2017-05-13 17:29:52 +00:00
|
|
|
</v-list-tile>
|
|
|
|
</v-list-item>
|
2017-05-13 14:38:17 +00:00
|
|
|
</v-list>
|
|
|
|
</v-menu>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</v-col>
|
|
|
|
</v-row>
|
|
|
|
</v-container>
|
|
|
|
</v-card-text>
|
|
|
|
</v-card>
|
|
|
|
</v-col>
|
|
|
|
</template>
|
|
|
|
</v-row>
|
|
|
|
</div>
|
|
|
|
<loader v-else></loader>
|
|
|
|
<div class="text-xs-center modal-container">
|
|
|
|
<v-dialog v-model="modal" width="70%">
|
|
|
|
<v-card class="secondary white--text">
|
|
|
|
<v-card-text class="white--text">
|
|
|
|
<h2 class="title">{{ modalTitle }}</h2>
|
|
|
|
</v-card-text>
|
|
|
|
<v-card-text class="subheading white--text">
|
|
|
|
{{ modalText }}
|
|
|
|
</v-card-text>
|
|
|
|
<v-card-row actions>
|
|
|
|
<v-spacer></v-spacer>
|
|
|
|
<v-btn primary dark
|
|
|
|
style="width: 100px;"
|
|
|
|
v-on:click.native="modal = false">Thanks!
|
|
|
|
</v-btn>
|
|
|
|
</v-card-row>
|
|
|
|
</v-card>
|
|
|
|
</v-dialog>
|
|
|
|
</div>
|
2017-06-27 12:22:57 +00:00
|
|
|
<choice-window :entry="choiceTitle"></choice-window>
|
2017-05-13 14:38:17 +00:00
|
|
|
</v-container>
|
2017-04-15 14:16:14 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import axios from 'axios'
|
|
|
|
import Loader from '~components/loader.vue'
|
2017-06-27 12:22:57 +00:00
|
|
|
import ChoiceWindow from '~components/choiceWindow.vue'
|
2017-04-15 14:16:14 +00:00
|
|
|
|
|
|
|
export default {
|
2017-06-26 20:51:39 +00:00
|
|
|
head () {
|
2017-06-25 23:29:00 +00:00
|
|
|
return {
|
|
|
|
title: 'Releases',
|
|
|
|
meta: [
|
|
|
|
{ hid: 'description', name: 'description', content: 'Latest downloadable anime releases' }
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2017-06-30 14:45:11 +00:00
|
|
|
mounted () {
|
2017-06-30 15:27:27 +00:00
|
|
|
if (this.releases.length) {
|
|
|
|
this.updateTime(this.$store)
|
|
|
|
}
|
|
|
|
|
2017-06-30 14:45:11 +00:00
|
|
|
setInterval(() => {
|
|
|
|
if (this.releases.length) {
|
|
|
|
this.updateTime(this.$store)
|
|
|
|
}
|
|
|
|
}, 60 * 1000)
|
|
|
|
},
|
2017-04-15 14:16:14 +00:00
|
|
|
data () {
|
|
|
|
return {
|
2017-06-27 12:22:57 +00:00
|
|
|
choiceTitle: '',
|
2017-04-15 14:16:14 +00:00
|
|
|
modal: false,
|
|
|
|
modalTitle: '',
|
2017-04-22 10:34:50 +00:00
|
|
|
modalText: '',
|
|
|
|
fansubList: [
|
|
|
|
'HorribleSubs',
|
2017-05-30 13:08:35 +00:00
|
|
|
'PuyaSubs!',
|
|
|
|
'Fuyu',
|
2017-05-30 07:26:24 +00:00
|
|
|
'DurandalSubs',
|
2017-04-22 12:00:38 +00:00
|
|
|
'DefinitelyNotMe'
|
2017-04-22 10:34:50 +00:00
|
|
|
],
|
2017-06-30 14:45:11 +00:00
|
|
|
qualityList: ['480p', '720p', '1080p'],
|
|
|
|
lastUpdateTime: 'a few seconds ago'
|
2017-04-15 14:16:14 +00:00
|
|
|
}
|
|
|
|
},
|
2017-04-26 19:59:41 +00:00
|
|
|
computed: {
|
|
|
|
releases: function () {
|
|
|
|
return this.$store.state.releases
|
|
|
|
}
|
|
|
|
},
|
2017-04-22 10:34:50 +00:00
|
|
|
components: {
|
2017-06-27 12:22:57 +00:00
|
|
|
Loader,
|
|
|
|
ChoiceWindow
|
2017-04-22 10:34:50 +00:00
|
|
|
},
|
2017-04-15 14:16:14 +00:00
|
|
|
methods: {
|
2017-05-13 14:38:17 +00:00
|
|
|
openModal (title, text) {
|
2017-04-25 19:55:30 +00:00
|
|
|
console.log(`[${(new Date()).toLocaleTimeString()}]: Opening modal`)
|
2017-04-15 14:16:14 +00:00
|
|
|
|
|
|
|
this.modalTitle = title
|
|
|
|
this.modalText = text
|
|
|
|
|
|
|
|
this.modal = true
|
|
|
|
},
|
2017-05-13 14:38:17 +00:00
|
|
|
downloadAll (name) {
|
2017-05-14 19:47:44 +00:00
|
|
|
console.log(`[${(new Date()).toLocaleTimeString()}]: Sending a request to download all episodes of ${name}.`)
|
2017-04-15 14:16:14 +00:00
|
|
|
|
2017-05-03 18:22:07 +00:00
|
|
|
name = name.split(' ').slice(0, -2).join(' ')
|
2017-04-22 14:02:04 +00:00
|
|
|
const quality = this.$store.state.releaseQuality
|
|
|
|
|
2017-05-03 18:22:07 +00:00
|
|
|
axios.post('download', {
|
|
|
|
name: name,
|
|
|
|
quality: quality,
|
|
|
|
fromEp: 0,
|
|
|
|
untilEp: 20000
|
|
|
|
}).then(({data}) => {
|
2017-04-25 19:55:30 +00:00
|
|
|
console.log(`[${(new Date()).toLocaleTimeString()}]: Server responded!`)
|
2017-04-15 14:16:14 +00:00
|
|
|
|
2017-05-03 18:22:07 +00:00
|
|
|
data.forEach((link) => {
|
2017-04-15 14:16:14 +00:00
|
|
|
window.open(link)
|
|
|
|
})
|
|
|
|
}).catch((err) => {
|
2017-04-25 19:55:30 +00:00
|
|
|
console.log(`[${(new Date()).toLocaleTimeString()}]: An error occurred... ${err}`)
|
2017-05-03 18:22:07 +00:00
|
|
|
this.$store.commit('setErrorSnackbar', `An error occurred while getting ${name}.`)
|
2017-04-15 14:16:14 +00:00
|
|
|
})
|
|
|
|
},
|
2017-05-13 14:38:17 +00:00
|
|
|
refresh () {
|
2017-04-15 14:16:14 +00:00
|
|
|
this.$store.dispatch('refreshReleases')
|
2017-04-30 12:40:01 +00:00
|
|
|
},
|
2017-05-13 14:38:17 +00:00
|
|
|
print (item) {
|
2017-05-03 18:22:07 +00:00
|
|
|
console.log(`[${(new Date()).toLocaleTimeString()}]: Downloading ${item.name}.`)
|
2017-05-13 17:29:52 +00:00
|
|
|
},
|
2017-06-27 12:22:57 +00:00
|
|
|
showChoices (name) {
|
|
|
|
this.choiceTitle = name
|
|
|
|
this.$store.commit('setAddToChoice', true)
|
2017-06-30 14:45:11 +00:00
|
|
|
},
|
|
|
|
updateTime (store) {
|
|
|
|
const updated = store.state.releasesUpdateTime
|
|
|
|
if (updated) {
|
|
|
|
this.lastUpdateTime = updated.fromNow()
|
|
|
|
}
|
2017-04-22 10:34:50 +00:00
|
|
|
}
|
2017-04-15 14:16:14 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
2017-05-13 14:38:17 +00:00
|
|
|
p
|
|
|
|
{
|
|
|
|
margin-bottom: 0;
|
|
|
|
}
|
2017-04-18 15:34:36 +00:00
|
|
|
|
2017-05-13 14:38:17 +00:00
|
|
|
.select
|
|
|
|
{
|
|
|
|
margin: 10px 0 5px 0;
|
|
|
|
}
|
2017-04-22 13:32:44 +00:00
|
|
|
|
2017-05-13 14:38:17 +00:00
|
|
|
/* ----- Refresh button ----- */
|
|
|
|
.refresh-button-container
|
|
|
|
{
|
|
|
|
display: inline-block;
|
|
|
|
margin-top: 5px;
|
|
|
|
margin-bottom: 2px;
|
|
|
|
text-align: center;
|
|
|
|
padding: 0;
|
|
|
|
align-self: center;
|
|
|
|
}
|
2017-04-15 14:16:14 +00:00
|
|
|
|
2017-05-13 14:38:17 +00:00
|
|
|
.refresh-button
|
|
|
|
{
|
|
|
|
display: inline-block;
|
|
|
|
}
|
2017-04-15 14:16:14 +00:00
|
|
|
|
2017-05-13 14:38:17 +00:00
|
|
|
/* Needed */
|
|
|
|
/*noinspection CssUnusedSymbol*/
|
|
|
|
.icon--large
|
|
|
|
{
|
|
|
|
height: 2.5rem;
|
|
|
|
}
|
2017-04-15 14:16:14 +00:00
|
|
|
|
2017-05-13 14:38:17 +00:00
|
|
|
.time-container
|
|
|
|
{
|
|
|
|
align-self: center;
|
|
|
|
}
|
2017-04-15 14:16:14 +00:00
|
|
|
|
2017-05-13 14:38:17 +00:00
|
|
|
.update-time
|
|
|
|
{
|
|
|
|
padding-left: 20px;
|
|
|
|
color: rgba(255, 255, 255, 0.8);
|
|
|
|
font-weight: 600;
|
|
|
|
font-size: 16px;
|
|
|
|
font-style: italic;
|
|
|
|
}
|
2017-04-15 14:16:14 +00:00
|
|
|
|
2017-05-13 14:38:17 +00:00
|
|
|
.elem
|
|
|
|
{
|
|
|
|
color: rgba(255, 255, 255, 0.8);
|
|
|
|
margin-bottom: 10px;
|
|
|
|
}
|
2017-04-15 14:16:14 +00:00
|
|
|
|
2017-05-13 14:38:17 +00:00
|
|
|
.elem-content
|
|
|
|
{
|
|
|
|
background-color: rgb(60, 60, 60);
|
|
|
|
cursor: default;
|
|
|
|
}
|
2017-04-15 14:16:14 +00:00
|
|
|
|
2017-05-13 14:38:17 +00:00
|
|
|
.elem-content:hover
|
|
|
|
{
|
2017-05-14 19:47:44 +00:00
|
|
|
box-shadow:
|
|
|
|
0 5px 5px -3px rgba(0, 0, 0, 0.2),
|
|
|
|
0 8px 10px 1px rgba(0, 0, 0, 0.14),
|
|
|
|
0 3px 14px 2px rgba(0, 0, 0, 0.12) !important;
|
2017-05-13 14:38:17 +00:00
|
|
|
}
|
2017-04-15 14:16:14 +00:00
|
|
|
|
2017-05-13 14:38:17 +00:00
|
|
|
.elem-card
|
|
|
|
{
|
|
|
|
padding: 0 10px 0 0;
|
|
|
|
}
|
2017-04-15 14:16:14 +00:00
|
|
|
|
2017-05-13 14:38:17 +00:00
|
|
|
.elem-title h6
|
|
|
|
{
|
|
|
|
padding-left: 10px;
|
|
|
|
margin-top: 10px;
|
2017-05-21 12:39:37 +00:00
|
|
|
margin-bottom: 10px;
|
|
|
|
line-height: 26px;
|
2017-05-13 14:38:17 +00:00
|
|
|
white-space: nowrap;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
overflow: hidden;
|
|
|
|
color: rgba(255, 255, 255, 0.8);
|
|
|
|
}
|
2017-04-15 14:16:14 +00:00
|
|
|
|
2017-05-13 14:38:17 +00:00
|
|
|
.elem-ep h6
|
|
|
|
{
|
|
|
|
margin-top: 10px;
|
|
|
|
color: rgba(255, 255, 255, 0.8);
|
|
|
|
white-space: nowrap;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
2017-04-15 14:16:14 +00:00
|
|
|
|
2017-05-13 14:38:17 +00:00
|
|
|
.elem-image
|
|
|
|
{
|
|
|
|
height: 200px;
|
|
|
|
}
|
2017-04-15 14:16:14 +00:00
|
|
|
|
2017-05-13 14:38:17 +00:00
|
|
|
.picture
|
|
|
|
{
|
|
|
|
max-width: 140px;
|
|
|
|
}
|
2017-04-15 14:16:14 +00:00
|
|
|
|
2017-05-13 14:38:17 +00:00
|
|
|
.elem-text-links
|
|
|
|
{
|
|
|
|
height: 100%;
|
|
|
|
position: relative;
|
|
|
|
}
|
2017-04-15 14:16:14 +00:00
|
|
|
|
2017-05-13 14:38:17 +00:00
|
|
|
.synopsis
|
|
|
|
{
|
|
|
|
height: 75%;
|
|
|
|
text-align: justify;
|
|
|
|
padding-right: 10px;
|
|
|
|
}
|
2017-04-15 14:16:14 +00:00
|
|
|
|
2017-05-13 14:38:17 +00:00
|
|
|
.links
|
|
|
|
{
|
|
|
|
height: 25%;
|
|
|
|
position: absolute;
|
|
|
|
bottom: 5px;
|
|
|
|
right: -2px;
|
|
|
|
display: flex;
|
|
|
|
}
|
2017-04-15 14:16:14 +00:00
|
|
|
|
2017-05-13 14:38:17 +00:00
|
|
|
.download-button
|
|
|
|
{
|
|
|
|
text-decoration: none;
|
|
|
|
margin-right: 0;
|
|
|
|
}
|
2017-04-15 14:16:14 +00:00
|
|
|
|
2017-05-13 14:38:17 +00:00
|
|
|
.modal-container .title
|
|
|
|
{
|
|
|
|
color: rgba(255, 255, 255, 0.8);
|
|
|
|
}
|
2017-04-15 14:16:14 +00:00
|
|
|
</style>
|