mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
fix crash on nil cache
This commit is contained in:
@@ -172,7 +172,9 @@ func (t *Torrent) progressEvent() {
|
|||||||
t.BytesReadUsefulData = st.BytesRead.Int64()
|
t.BytesReadUsefulData = st.BytesRead.Int64()
|
||||||
t.BytesWrittenData = st.BytesWritten.Int64()
|
t.BytesWrittenData = st.BytesWritten.Int64()
|
||||||
|
|
||||||
|
if t.cache != nil {
|
||||||
t.PreloadedBytes = t.cache.GetState().Filled
|
t.PreloadedBytes = t.cache.GetState().Filled
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
t.DownloadSpeed = 0
|
t.DownloadSpeed = 0
|
||||||
t.UploadSpeed = 0
|
t.UploadSpeed = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user