mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 13:36:09 +05:00
Final work to add torrents categories
This commit is contained in:
@@ -114,7 +114,7 @@ func GetTorrent(hashHex string) *Torrent {
|
||||
return tor
|
||||
}
|
||||
|
||||
func SetTorrent(hashHex, title, poster, data string) *Torrent {
|
||||
func SetTorrent(hashHex, title, poster, category string, data string) *Torrent {
|
||||
hash := metainfo.NewHashFromHex(hashHex)
|
||||
torr := bts.GetTorrent(hash)
|
||||
torrDb := GetTorrentDB(hash)
|
||||
@@ -133,12 +133,14 @@ func SetTorrent(hashHex, title, poster, data string) *Torrent {
|
||||
}
|
||||
torr.Title = title
|
||||
torr.Poster = poster
|
||||
torr.Category = category
|
||||
torr.Data = data
|
||||
}
|
||||
|
||||
if torrDb != nil {
|
||||
torrDb.Title = title
|
||||
torrDb.Poster = poster
|
||||
torrDb.Category = category
|
||||
torrDb.Data = data
|
||||
AddTorrentDB(torrDb)
|
||||
}
|
||||
|
||||
@@ -75,6 +75,7 @@ func ListTorrentsDB() map[metainfo.Hash]*Torrent {
|
||||
torr.Poster = db.Poster
|
||||
torr.Timestamp = db.Timestamp
|
||||
torr.Size = db.Size
|
||||
torr.Category = db.Category
|
||||
torr.Data = db.Data
|
||||
torr.Stat = state.TorrentInDB
|
||||
ret[torr.TorrentSpec.InfoHash] = torr
|
||||
|
||||
Reference in New Issue
Block a user