Fixed bug where impossible to read and delete files with special characters in their names

Removed unofficial results from nyaa results
Fixed naming on synopsis (releases page)
Now refresh locals after reset
This commit is contained in:
Kylart 2017-07-03 20:22:48 +02:00
parent 82e0da2273
commit 070b2f2918
5 changed files with 21 additions and 8 deletions

View File

@ -30,7 +30,7 @@ const download = (req, res) => {
console.log(searchData)
const term = `[${searchData.fansub}]+${searchData.quality}+${searchData.name}`
const term = `[${searchData.fansub}]+${searchData.quality}+${searchData.name}+-unofficial`
if (choice === 'si') {
nyaa.searchSi(term).then((data) => {
@ -84,7 +84,7 @@ const getLatest = (url, res) => {
let toReturn = []
if (choice === 'si') {
nyaa.searchSi(`[${fansub}] ${quality}`, 18).then((data) => {
nyaa.searchSi(`[${fansub}] ${quality} -unofficial`, 18).then((data) => {
for (let i = 0; i < 18; ++i) {
const realName = data[i].title[0].replace(' VOSTFR', '')
const name = realName.split(' ').slice(1).join(' ')

View File

@ -45,7 +45,7 @@
</v-card-row>
</v-card>
</v-dialog>
<v-dialog width="650" v-model="resultShow" persistent scrollable>
<v-dialog width="800" v-model="resultShow" persistent scrollable>
<v-card class="secondary">
<v-card-row>
<v-card-title>Result for «{{ searchTerm }}»</v-card-title>
@ -54,8 +54,8 @@
<v-card-text>
<h4 v-if="error">{{ error }}</h4>
<div v-else-if="loading">
<h5 class="loading-text">Info should be displayed in a few seconds</h5>
<h5 class="loading-text">Gathering data...</h5>
<h5 class="loading-text">Info should be displayed in a few seconds</h5>
</div>
<v-row v-else>
{{ info.title }}

View File

@ -74,7 +74,7 @@
</v-btn>
<v-list>
<v-list-item>
<v-list-tile v-on:click.native="openModal(item.name, item.fullSynopsis)">
<v-list-tile v-on:click.native="openModal(item.rawName, item.fullSynopsis)">
<v-list-tile-action>
<v-icon>more</v-icon>
</v-list-tile-action>

View File

@ -171,7 +171,13 @@
console.log(`[${(new Date()).toLocaleTimeString()}]: Requested to play ${path}. Sending...`)
// No need to get through store.
axios.get(`openThis?type=video&path=${path}&dir=${this.$store.state.currentDir}`).then((res) => {
axios.get(`openThis`, {
params: {
type: 'video',
path: path,
dir: this.$store.state.currentDir
}
}).then((res) => {
if (res.status !== 200) { console.log('An error occurred: request to open file ended with a status ' + res.status + '.') }
this.$store.dispatch('appendHistory', {
@ -183,7 +189,13 @@
delThis (path) {
console.log(`[${(new Date()).toLocaleTimeString()}]: Requested to delete ${path}. Sending...`)
axios.get(`openThis?type=delete&path=${path}&dir=${this.$store.state.currentDir}`).then((res) => {
axios.get(`openThis`, {
params: {
type: 'delete',
path: path,
dir: this.$store.state.currentDir
}
}).then((res) => {
if (res.status !== 200) { console.log('An error occurred: request to delete file ended with a status ' + res.status + '.') }
this.$store.dispatch('appendHistory', {

View File

@ -439,12 +439,13 @@ const store = new Vuex.Store({
commit('setRefreshingLocal')
commit('setLocalFiles', data)
},
async resetLocal ({state, commit}) {
async resetLocal ({state, commit, dispatch}) {
log(`Resetting local information...`)
commit('setResettingLocal')
axios.get(`resetLocal?dir=${state.currentDir}`).then(() => {
dispatch('refreshLocal')
log(`Reset completed.`)
}).catch((err) => {
log('An error occurred while resetting.\n' + err)