mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 13:36:09 +05:00
add remove views all
This commit is contained in:
@@ -43,11 +43,15 @@ func RemViewed(vv *Viewed) {
|
||||
var indeces map[int]struct{}
|
||||
err := json.Unmarshal(buf, &indeces)
|
||||
if err == nil {
|
||||
if vv.FileIndex != -1 {
|
||||
delete(indeces, vv.FileIndex)
|
||||
buf, err = json.Marshal(indeces)
|
||||
if err == nil {
|
||||
tdb.Set("Viewed", vv.Hash, buf)
|
||||
}
|
||||
} else {
|
||||
tdb.Rem("Viewed", vv.Hash)
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
log.TLogln("Error rem viewed:", err)
|
||||
|
||||
Reference in New Issue
Block a user