mirror of
https://github.com/VueTorrent/VueTorrent.git
synced 2024-11-25 02:45:48 +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>
|
||||
</template>
|
||||
<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 v-slot:item.actions="{ item }">
|
||||
<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),
|
||||
isDarkMode: (state: StoreState) => () => state.webuiSettings.darkTheme,
|
||||
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,
|
||||
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,
|
||||
getAvailableTags: (state: StoreState) => () => state.tags,
|
||||
getCategories: (state: StoreState) => () => state.categories,
|
||||
|
@ -20,11 +20,11 @@ export default {
|
|||
getTorrents: (state: StoreState) => () => state.torrents,
|
||||
getTrackers: (state: StoreState) => () => state.trackers,
|
||||
getAuthenticated: (state: StoreState) => () => state.authenticated,
|
||||
getTorrentCountString: (state: StoreState) => () => {
|
||||
getTorrentCountString: (state: StoreState, getters: any) => () => {
|
||||
if (state.selected_torrents.length) {
|
||||
let selectedSize = state.selected_torrents
|
||||
.map(hash => state.torrents.filter(el => el.hash === hash)[0])
|
||||
.map(torrent => torrent.size)
|
||||
.map(hash => getters.getTorrent(hash))
|
||||
.map(torrent => torrent.size | 0)
|
||||
.reduce((partialSum, newVal) => partialSum + newVal)
|
||||
|
||||
return i18n
|
||||
|
|
Loading…
Reference in a new issue