* fix(jellyfin): use the same deviceId for admins
This PR will make Jellyseerr use the same deviceId for the admin user everytime he logins to
Jellyfin/Emby. The previous behavior with different deviceId was creating new entries on the media
at every request.
* fix: remove useless check
* fix(avatar): fix avatar cache busting by using avatarVersion
Previously, avatar caching did not update the avatar when the remote image changed. This commit adds
logic to check if the avatar was modified remotely by comparing aremote last-modified timestamp with
a locally stored version (avatarVersion). If a change is detected, the cache is cleared, a new image
is fetched, and avatarVersionis updated. Otherwise, the cached image is retained.
* chore(db): add db migrations
* refactor: refactor imagehelpers util to where its used
* refactor: remove remnants from previous cache busting versions
Refactoring avatarproxy to retrieve avatars from the Jellyfin API instead of the public endpoint
broke Emby avatars that doesn't have this API method.
fix#1101
* fix: cache Jellyfin/Emby avatars from API
Previously, avatars were cached using image links from Jellyfin/Emby. Now, avatar images are
obtained directly from the API to avoid some configuration bugs.
* fix: update avatar on new login
* fix: rewrite avatarproxy and CachedImage
Avatar proxy was allowing every request to be proxied, no matter the original ressource's origin or
filetype. This PR fixes it be allowing only relevant resources to be cached, i.e. Jellyfin/Emby
images and TMDB images.
fix#1012, #1013
* fix: resolve CodeQL error
* fix: resolve CodeQL error
* fix: resolve review comments
* fix: resolve review comment
* fix: resolve CodeQL error
* fix: update imageproxy path
* refactor: proxy and cache user avatar images
* fix: extract keys
* fix: set avatar image URL
* fix: show the correct avatar in the list of available users in advanced request
* fix(s): set correct src URL for cached image
* fix: remove unexpired unused image when a user changes their avatar
* fix: requested changes
* refactor: use 'mime' package to detmerine file extension
* style: grammar
* refactor: checks if the default avatar is cached to avoid creating duplicates for different users
* fix: fix vulnerability
* fix: fix incomplete URL substring sanitization
* refactor: only cache avatar with http url protocol
* fix: remove log and correctly set the if statement for the cached image component
* fix: avatar images not showing on issues page
* style: formatting
---------
Co-authored-by: JoaquinOlivero <joaquin.olivero@hotmail.com>