diff --git a/server/torr/apihelper.go b/server/torr/apihelper.go
index 83dcffe..76e4ca6 100644
--- a/server/torr/apihelper.go
+++ b/server/torr/apihelper.go
@@ -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()
}
}()
diff --git a/server/torr/dbwrapper.go b/server/torr/dbwrapper.go
index 663a580..60e525f 100644
--- a/server/torr/dbwrapper.go
+++ b/server/torr/dbwrapper.go
@@ -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
}
}
diff --git a/web/src/components/DialogTorrentDetailsContent/widgets/index.jsx b/web/src/components/DialogTorrentDetailsContent/widgets/index.jsx
index e50629a..637d340 100644
--- a/web/src/components/DialogTorrentDetailsContent/widgets/index.jsx
+++ b/web/src/components/DialogTorrentDetailsContent/widgets/index.jsx
@@ -132,13 +132,17 @@ export const CategoryWidget = ({ data }) => {
const { t } = useTranslation()
const { iconBGColor, valueBGColor } = useGetWidgetColors('category')
- return (
-
- )
+ if (data) {
+ return (
+
+ )
+ }
+
+ return null
}