mirror of
https://github.com/VueTorrent/VueTorrent.git
synced 2025-02-18 00:02:02 +03:00
fix: size error when deleting torrents under certain conditions (#862)
This commit is contained in:
parent
810fe882be
commit
fe1f962c33
2 changed files with 6 additions and 6 deletions
|
@ -170,7 +170,7 @@
|
||||||
</v-toolbar>
|
</v-toolbar>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:item.saveType="{ item }">
|
<template v-slot:item.saveType="{ item }">
|
||||||
{{ monitoredFoldersMonitorTypeOptions.filter(value => value.value === item.saveType)[0].text }}
|
{{ monitoredFoldersMonitorTypeOptions.find(value => value.value === item.saveType).text }}
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:item.actions="{ item }">
|
<template v-slot:item.actions="{ item }">
|
||||||
<v-icon small class="mr-2" @click="editItem(item)">{{ mdiPencil }}</v-icon>
|
<v-icon small class="mr-2" @click="editItem(item)">{{ mdiPencil }}</v-icon>
|
||||||
|
|
|
@ -7,10 +7,10 @@ export default {
|
||||||
containsTorrent: (state: StoreState) => (hash: string) => state.selected_torrents.includes(hash),
|
containsTorrent: (state: StoreState) => (hash: string) => state.selected_torrents.includes(hash),
|
||||||
isDarkMode: (state: StoreState) => () => state.webuiSettings.darkTheme,
|
isDarkMode: (state: StoreState) => () => state.webuiSettings.darkTheme,
|
||||||
getTheme: (state: StoreState) => () => state.webuiSettings.darkTheme ? 'dark' : 'light',
|
getTheme: (state: StoreState) => () => state.webuiSettings.darkTheme ? 'dark' : 'light',
|
||||||
getModalState: (state: StoreState) => (guid: string) => state.modals.filter(m => m.guid === guid)[0],
|
getModalState: (state: StoreState) => (guid: string) => state.modals.find(m => m.guid === guid),
|
||||||
getSettings: (state: StoreState) => () => state.settings,
|
getSettings: (state: StoreState) => () => state.settings,
|
||||||
getStatus: (state: StoreState) => () => state.status,
|
getStatus: (state: StoreState) => () => state.status,
|
||||||
getTorrent: (state: StoreState) => (hash: string) => state.torrents.filter(el => el.hash === hash)[0],
|
getTorrent: (state: StoreState) => (hash: string) => state.torrents.find(el => el.hash === hash),
|
||||||
getWebuiSettings: (state: StoreState) => () => state.webuiSettings,
|
getWebuiSettings: (state: StoreState) => () => state.webuiSettings,
|
||||||
getAvailableTags: (state: StoreState) => () => state.tags,
|
getAvailableTags: (state: StoreState) => () => state.tags,
|
||||||
getCategories: (state: StoreState) => () => state.categories,
|
getCategories: (state: StoreState) => () => state.categories,
|
||||||
|
@ -20,11 +20,11 @@ export default {
|
||||||
getTorrents: (state: StoreState) => () => state.torrents,
|
getTorrents: (state: StoreState) => () => state.torrents,
|
||||||
getTrackers: (state: StoreState) => () => state.trackers,
|
getTrackers: (state: StoreState) => () => state.trackers,
|
||||||
getAuthenticated: (state: StoreState) => () => state.authenticated,
|
getAuthenticated: (state: StoreState) => () => state.authenticated,
|
||||||
getTorrentCountString: (state: StoreState) => () => {
|
getTorrentCountString: (state: StoreState, getters: any) => () => {
|
||||||
if (state.selected_torrents.length) {
|
if (state.selected_torrents.length) {
|
||||||
let selectedSize = state.selected_torrents
|
let selectedSize = state.selected_torrents
|
||||||
.map(hash => state.torrents.filter(el => el.hash === hash)[0])
|
.map(hash => getters.getTorrent(hash))
|
||||||
.map(torrent => torrent.size)
|
.map(torrent => torrent.size | 0)
|
||||||
.reduce((partialSum, newVal) => partialSum + newVal)
|
.reduce((partialSum, newVal) => partialSum + newVal)
|
||||||
|
|
||||||
return i18n
|
return i18n
|
||||||
|
|
Loading…
Add table
Reference in a new issue