mirror of
https://github.com/VueTorrent/VueTorrent.git
synced 2025-03-14 12:10:18 +03:00
fix: bugs introduced with search engine (#853)
This commit is contained in:
parent
154ba1973d
commit
ff301f249c
2 changed files with 8 additions and 6 deletions
|
@ -175,7 +175,7 @@ export default {
|
|||
item.newName = item.name
|
||||
this.toggleEditing(item)
|
||||
},
|
||||
async renameFile(item) {
|
||||
renameFile(item) {
|
||||
const lastPathSep = item.fullName.lastIndexOf('/')
|
||||
const args = [this.hash]
|
||||
|
||||
|
@ -185,12 +185,12 @@ export default {
|
|||
args.push(`${prefix}/${item.name}`, `${prefix}/${item.newName}`)
|
||||
}
|
||||
|
||||
await qbit.renameFile(...args).catch(() => Vue.$toast.error(this.$t('toast.renameFileFailed')))
|
||||
qbit.renameFile(...args).catch(() => Vue.$toast.error(this.$t('toast.renameFileFailed')))
|
||||
|
||||
item.name = item.newName
|
||||
this.toggleEditing(item)
|
||||
},
|
||||
async renameFolder(item) {
|
||||
renameFolder(item) {
|
||||
const lastPathSep = item.fullName.lastIndexOf('/')
|
||||
const args = [this.hash]
|
||||
|
||||
|
@ -200,13 +200,13 @@ export default {
|
|||
args.push(`${prefix}/${item.name}`, `${prefix}/${item.newName}`)
|
||||
}
|
||||
|
||||
await qbit.renameFolder(...args).catch(() => Vue.$toast.error(this.$t('toast.renameFolderFailed')))
|
||||
qbit.renameFolder(...args).catch(() => Vue.$toast.error(this.$t('toast.renameFolderFailed')))
|
||||
|
||||
item.name = item.newName
|
||||
this.toggleEditing(item)
|
||||
},
|
||||
async setFilePrio(fileId, priority) {
|
||||
await qbit.setTorrentFilePriority(this.hash, [fileId], priority).then(() => this.initFiles())
|
||||
setFilePrio(fileId, priority) {
|
||||
qbit.setTorrentFilePriority(this.hash, [fileId], priority).then(() => this.initFiles())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -80,6 +80,7 @@ export default {
|
|||
async addTag(tag) {
|
||||
if (this.activeTags.includes(this.availableTags.indexOf(tag))) {
|
||||
await this.deleteTag(tag)
|
||||
return
|
||||
}
|
||||
|
||||
await qbit.addTorrentTag([this.hash], [tag])
|
||||
|
@ -90,6 +91,7 @@ export default {
|
|||
async setCategory(cat) {
|
||||
if (this.torrent.category === cat.name) {
|
||||
await this.deleteCategory()
|
||||
return
|
||||
}
|
||||
|
||||
await qbit.setCategory([this.hash], cat.name)
|
||||
|
|
Loading…
Add table
Reference in a new issue