node build fixed

This commit is contained in:
ra_ma
2025-09-20 14:08:38 +01:00
parent c6ebbe069d
commit 3d298fa434
1516 changed files with 535727 additions and 2 deletions

View File

@@ -0,0 +1,34 @@
package torrentstream
import (
"seanime/internal/database/db_bridge"
hibiketorrent "seanime/internal/extension/hibike/torrent"
"seanime/internal/util"
)
type BatchHistoryResponse struct {
Torrent *hibiketorrent.AnimeTorrent `json:"torrent"`
}
func (r *Repository) GetBatchHistory(mId int) (ret *BatchHistoryResponse) {
defer util.HandlePanicInModuleThen("torrentstream/GetBatchHistory", func() {
ret = &BatchHistoryResponse{}
})
torrent, err := db_bridge.GetTorrentstreamHistory(r.db, mId)
if err != nil {
return &BatchHistoryResponse{}
}
return &BatchHistoryResponse{
torrent,
}
}
func (r *Repository) AddBatchHistory(mId int, torrent *hibiketorrent.AnimeTorrent) {
go func() {
defer util.HandlePanicInModuleThen("torrentstream/AddBatchHistory", func() {})
_ = db_bridge.InsertTorrentstreamHistory(r.db, mId, torrent)
}()
}