mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 13:36:09 +05:00
fix last viewed
This commit is contained in:
@@ -114,10 +114,10 @@ func searchLastPlayed(tor *state.TorrentStatus) int {
|
|||||||
|
|
||||||
for i, stat := range tor.FileStats {
|
for i, stat := range tor.FileStats {
|
||||||
if stat.Id == lastViewedIndex {
|
if stat.Id == lastViewedIndex {
|
||||||
if i+1 >= len(tor.FileStats) {
|
if i >= len(tor.FileStats) {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
return i + 1
|
return i
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user