Add reading torrent list from file cache, add ffprobe check, bring back proxy in config

This commit is contained in:
Ben Adrian Sarmiento
2024-06-17 17:16:24 +02:00
parent bf9adfb764
commit f33c2411e0
6 changed files with 89 additions and 22 deletions

View File

@@ -1,14 +1,7 @@
package realdebrid
func indexFromEnd(subIndex int, pageNumber int, pageSize int, totalElements int) int {
// Adjust pageNumber for 1-based index
adjustedPageNumber := pageNumber - 1
// Calculate the overall index in the array
overallIndex := (adjustedPageNumber * pageSize) + subIndex
// Calculate the index from the end
indexFromEnd := totalElements - 1 - overallIndex
return indexFromEnd
return totalElements - 1 - overallIndex
}