mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 13:36:09 +05:00
Bug fix + UI improvment
- Fixes Bug when loading torrent category from cache - UI: Do not display category if not provided
This commit is contained in:
@@ -108,6 +108,7 @@ func GetTorrent(hashHex string) *Torrent {
|
||||
tr.Data = tor.Data
|
||||
tr.Size = tor.Size
|
||||
tr.Timestamp = tor.Timestamp
|
||||
tr.Category = tor.Category
|
||||
tr.GotInfo()
|
||||
}
|
||||
}()
|
||||
|
||||
@@ -55,6 +55,7 @@ func GetTorrentDB(hash metainfo.Hash) *Torrent {
|
||||
torr.Size = db.Size
|
||||
torr.Data = db.Data
|
||||
torr.Stat = state.TorrentInDB
|
||||
torr.Category = db.Category
|
||||
return torr
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,6 +132,7 @@ export const CategoryWidget = ({ data }) => {
|
||||
const { t } = useTranslation()
|
||||
const { iconBGColor, valueBGColor } = useGetWidgetColors('category')
|
||||
|
||||
if (data) {
|
||||
return (
|
||||
<StatisticsField
|
||||
title={t('Category')}
|
||||
@@ -141,4 +142,7 @@ export const CategoryWidget = ({ data }) => {
|
||||
icon={CategoryIcon}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user