One of the problems with Jellyfin is that older Live TV data is not deleted from the database even if all the guide sources and the TV tuner are removed from the configuration. The only way to ensure that the old metadata is gone, is by first stopping jellyfin:
systemctl stop jellyfin
and then editing the database manually to remove all Live TV data:
echo "DELETE FROM TypedBaseItems WHERE TYPE LIKE 'MediaBrowser.Controller.LiveTv.%;'" | sqlite3 /var/lib/jellyfin/data/library.db
After that, jellyfin can be restarted again, and all the Live TV channels and metadata should be gone:
systemctl start jellyfin
Due to containerization, applications running within an enclosed space will not notice the overall resource consumption such that freeing memory and expunging it might never take place. For that reason, Jellyfin seems to accumulate a lot of RAM within a Docker container that would otherwise be normal for its operation. Reported consumption can reach up to 3GiB even though most of that can be freed. The problem seems to affect glibc-linked programs under Docker and the solution is to set an environment variable named MALLOC_TRIM_THRESHOLD_
(last underscore is not a typo) to its lowest default value which is bytes.
A library can be rescanned by using the Jellyfin API and sending an HTTP POST request. Here is an example request using curl:
curl \ -v \ -X POST \ -H "X-MediaBrowser-Token: JELLYFIN_TOKEN" \ -H "Content-Type: application/json" \ -d '{"Updates": [{"Path":"JELLYFIN_LIBRARY_PATH","UpdateType":"scan"}]}' \ "https://jellyfin.tld/library/media/updated"
where:
JELLYFIN_TOKEN
is a token that can be generated from Jellyfin by accessing the menu Jellyfin
-> Dashboard
-> API Keys
,JELLYFIN_LIBRARY_PATH
represents either the path to a new file that was added or the full path of the whole library as configured with Jellyfin; this allows for partial scans by just scanning individual files or subpaths
Note that for checking whether the command went through, an HTTP status code of 204
represents success (rather than 200 OK
).