Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ The format is a modified version of [Keep a Changelog](https://keepachangelog.co
### Fixed
- Fix formatting of file size ([@Quickdev](https://github.com/quickdesh)) ([`958e245`](https://github.com/quickdesh/Animiru/commit/958e245))
- Don't overwrite episodes.json with anime details for localanime ([@Secozzi](https://github.com/Secozzi)) ([#96](https://github.com/quickdesh/Animiru/pull/96))
- Fix jellyfin enhanced tracker for newer versions of the extension ([@Secozzi](https://github.com/Secozzi)) ([#107](https://github.com/quickdesh/Animiru/pull/107))

### Other
- Merged from Aniyomi and Mihon ([@Secozzi](https://github.com/Secozzi)) ([#102](https://github.com/quickdesh/Animiru/pull/102))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class JellyfinApi(
}.apply { tracking_url = url }

when {
fragment.startsWith("seriesId") -> {
fragment.startsWith("season") -> {
getTrackFromSeries(track, httpUrl)
}
else -> track
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class JellyfinInterceptor : Interceptor {
}

private fun getId(suffix: Int): Long {
val key = "jellyfin" + (if (suffix == 1) "" else " ($suffix)") + "/all/$JELLYFIN_VERSION_ID"
val key = "jellyfin ($suffix)/all/$JELLYFIN_VERSION_ID"
val bytes = MessageDigest.getInstance("MD5").digest(key.toByteArray())
return (0..7).map { bytes[it].toLong() and 0xff shl 8 * (7 - it) }
.reduce(Long::or) and Long.MAX_VALUE
Expand All @@ -68,7 +68,7 @@ class JellyfinInterceptor : Interceptor {
}

companion object {
private const val JELLYFIN_VERSION_ID = 1
private const val JELLYFIN_VERSION_ID = 2
private const val MAX_JELLYFIN_SOURCES = 10
}
}
Expand Down