fix: show torrent comment #292

This commit is contained in:
Daan Wijns 2021-08-29 09:33:51 +02:00
parent c8ffce59b1
commit 4c3c2d36d7
2 changed files with 5 additions and 4 deletions

View file

@ -142,12 +142,12 @@
{{ createdBy }} {{ createdBy }}
</td> </td>
</tr> </tr>
<tr v-if="torrent.comment"> <tr v-if="comment">
<td :class="commonStyle"> <td :class="commonStyle">
Comments Comments
</td> </td>
<td> <td>
{{ torrent.comment }} {{ comment }}
</td> </td>
</tr> </tr>
@ -232,7 +232,8 @@ export default {
data() { data() {
return { return {
commonStyle: 'caption', commonStyle: 'caption',
createdBy: null createdBy: null,
comment: null
} }
}, },
computed: { computed: {
@ -248,6 +249,7 @@ export default {
async getTorrentProperties() { async getTorrentProperties() {
const props = await qbit.getTorrentProperties(this.hash) const props = await qbit.getTorrentProperties(this.hash)
this.createdBy = props.created_by || null this.createdBy = props.created_by || null
this.comment = props.comment || null
} }
} }
} }

View file

@ -22,7 +22,6 @@ export default class Torrent {
this.tags = data.tags.length > 0 ? data.tags.split(', ').map(t => t.trim()) : null this.tags = data.tags.length > 0 ? data.tags.split(', ').map(t => t.trim()) : null
this.category = data.category this.category = data.category
this.tracker = data.tracker this.tracker = data.tracker
this.comment = data.comment
this.f_l_piece_prio = data.f_l_piece_prio this.f_l_piece_prio = data.f_l_piece_prio
this.seq_dl = data.seq_dl this.seq_dl = data.seq_dl
this.auto_tmm = data.auto_tmm this.auto_tmm = data.auto_tmm