[Issue]: Cleanup the trickplay DB table #5653

Closed
opened 2026-02-07 02:03:20 +03:00 by OVERLORD · 10 comments
Owner

Originally created by @enter-a-random-username on GitHub (May 2, 2024).

Please describe your bug

Changing setting, rename a file or anything else that qualify for a regeneration and the images will be deleted in file system, but the entries in the DB will remain. I run also cleanup task.
Scan media library handles the clean up of the images, it should also clean the DB or one of the Maintenance scheduled tasks

Reproduction Steps

  1. Generate a trickplay
  2. Change tiling or/and rename a file
  3. Run trickplay generation
  4. Verify with find metadata/library -name trickplay -type d | wc -l vs DB rows

Jellyfin Version

Unstable (master branch)

if other:

No response

Environment

- OS:
- Linux Kernel:
- Virtualization:
- Clients:
- Browser:
- FFmpeg Version:
- Playback Method:
- Hardware Acceleration:
- GPU Model:
- Plugins:
- Reverse Proxy:
- Base URL:
- Networking:
- Storage:

Jellyfin logs

It is not a exception or error, it leftovers/missing clean up

FFmpeg logs

No response

Please attach any browser or client logs here

No response

Please attach any screenshots here

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
Originally created by @enter-a-random-username on GitHub (May 2, 2024). ### Please describe your bug Changing setting, rename a file or anything else that qualify for a regeneration and the images will be deleted in file system, but the entries in the DB will remain. I run also cleanup task. `Scan media library` handles the clean up of the images, it should also clean the DB or one of the `Maintenance` scheduled tasks ### Reproduction Steps 1. Generate a trickplay 2. Change tiling or/and rename a file 3. Run trickplay generation 4. Verify with `find metadata/library -name trickplay -type d | wc -l ` vs DB rows ### Jellyfin Version Unstable (master branch) ### if other: _No response_ ### Environment ```markdown - OS: - Linux Kernel: - Virtualization: - Clients: - Browser: - FFmpeg Version: - Playback Method: - Hardware Acceleration: - GPU Model: - Plugins: - Reverse Proxy: - Base URL: - Networking: - Storage: ``` ### Jellyfin logs ```shell It is not a exception or error, it leftovers/missing clean up ``` ### FFmpeg logs _No response_ ### Please attach any browser or client logs here _No response_ ### Please attach any screenshots here _No response_ ### Code of Conduct - [X] I agree to follow this project's Code of Conduct
OVERLORD added the bugconfirmed labels 2026-02-07 02:03:20 +03:00
Author
Owner

@jellyfin-bot commented on GitHub (May 2, 2024):

Hi, it seems like your issue report has the following item(s) that need to be addressed:

  • You have not filled in the environment completely.

This is an automated message, currently under testing. Please file an issue here if you encounter any problems.

@jellyfin-bot commented on GitHub (May 2, 2024): Hi, it seems like your issue report has the following item(s) that need to be addressed: - You have not filled in the environment completely. This is an automated message, currently under testing. Please file an issue [here](https://github.com/jellyfin/jellyfin-triage-scripts/issues) if you encounter any problems.
Author
Owner

@jellyfin-bot commented on GitHub (Aug 30, 2024):

This issue has gone 120 days without an update and will be closed within 21 days if there is no new activity. To prevent this issue from being closed, please confirm the issue has not already been fixed by providing updated examples or logs.

If you have any questions you can use one of several ways to contact us.

@jellyfin-bot commented on GitHub (Aug 30, 2024): This issue has gone 120 days without an update and will be closed within 21 days if there is no new activity. To prevent this issue from being closed, please confirm the issue has not already been fixed by providing updated examples or logs. If you have any questions you can use one of several ways to [contact us](https://jellyfin.org/contact).
Author
Owner

@enter-a-random-username commented on GitHub (Aug 30, 2024):

Still an issue

@enter-a-random-username commented on GitHub (Aug 30, 2024): Still an issue
Author
Owner

@jellyfin-bot commented on GitHub (Dec 29, 2024):

This issue has gone 120 days without an update and will be closed within 21 days if there is no new activity. To prevent this issue from being closed, please confirm the issue has not already been fixed by providing updated examples or logs.

If you have any questions you can use one of several ways to contact us.

@jellyfin-bot commented on GitHub (Dec 29, 2024): This issue has gone 120 days without an update and will be closed within 21 days if there is no new activity. To prevent this issue from being closed, please confirm the issue has not already been fixed by providing updated examples or logs. If you have any questions you can use one of several ways to [contact us](https://jellyfin.org/contact).
Author
Owner

@enter-a-random-username commented on GitHub (Dec 30, 2024):

This is not stale and refered in other issues to be aded to a cleanup task

@enter-a-random-username commented on GitHub (Dec 30, 2024): This is not stale and refered in other issues to be aded to a cleanup task
Author
Owner

@enter-a-random-username commented on GitHub (May 6, 2025):

Even with EFCore and also with migration nothing got cleaned.

  • find /var/lib/jellyfin/data/trickplay/ -name '0.jpg' | wc -l = 450 records
  • SELECT COUNT(*) FROM TrickplayInfos = 650 yeah different resolutions
  • SELECT COUNT(*) FROM TrickplayInfos GROUP BY ItemId = 620 - Removed duplicates from old resolutions/intervals or so
  • SELECT COUNT(*) FROM TrickplayInfos WHERE Intervaal ... AND width GROUP BY ItemId = 618 - Current settings → No big difference - properly some low res files.

That means I got Trickplay records from delete/renamed media or?

@enter-a-random-username commented on GitHub (May 6, 2025): Even with EFCore and also with migration nothing got cleaned. - `find /var/lib/jellyfin/data/trickplay/ -name '0.jpg' | wc -l ` = 450 records - `SELECT COUNT(*) FROM TrickplayInfos` = 650 yeah different resolutions - `SELECT COUNT(*) FROM TrickplayInfos GROUP BY ItemId` = 620 - Removed duplicates from old resolutions/intervals or so - `SELECT COUNT(*) FROM TrickplayInfos WHERE Intervaal ... AND width GROUP BY ItemId` = 618 - Current settings → No big difference - properly some low res files. - That means I got Trickplay records from delete/renamed media or?
Author
Owner

@Shadowghost commented on GitHub (May 6, 2025):

Not cleaning up different solutions is intentional afaik, but we should cleanup the entries if the file changes (I think I only implemented deleting the trickplay files, will take a look)

@Shadowghost commented on GitHub (May 6, 2025): Not cleaning up different solutions is intentional afaik, but we should cleanup the entries if the file changes (I think I only implemented deleting the trickplay files, will take a look)
Author
Owner

@enter-a-random-username commented on GitHub (Jun 10, 2025):

I think the current state is a massive improvement. I would love to see cleanup for removed folder like test of 1280x720 or so. The folder is gone after generating new image, I cleaned the old folders. Finding a good size for your devices takes a few tries.

I will close the issue. I can clean up the remaining entries by myself.

@enter-a-random-username commented on GitHub (Jun 10, 2025): I think the current state is a massive improvement. I would love to see cleanup for removed folder like test of 1280x720 or so. The folder is gone after generating new image, I cleaned the old folders. Finding a good size for your devices takes a few tries. I will close the issue. I can clean up the remaining entries by myself.
Author
Owner

@kodifan commented on GitHub (Sep 10, 2025):

I’m facing a similar issue. I initially created trickplay images at a 320 resolution. Later, I changed the setting to 640, but no matter what I do, I can’t get it to work.

I’ve tried refreshing the library, re-adding it, and regenerating trickplay images multiple times. I even deleted the all trickplay folders that contained the 320-resolution images.

Now, I don’t have any trickplay images at all—just a gray 320 box instead of actual images.

It seems the problem is that the 320-resolution entries are still stored in the database.

@kodifan commented on GitHub (Sep 10, 2025): I’m facing a similar issue. I initially created trickplay images at a 320 resolution. Later, I changed the setting to 640, but no matter what I do, I can’t get it to work. I’ve tried refreshing the library, re-adding it, and regenerating trickplay images multiple times. I even deleted the all trickplay folders that contained the 320-resolution images. Now, I don’t have any trickplay images at all—just a gray 320 box instead of actual images. It seems the problem is that the 320-resolution entries are still stored in the database.
Author
Owner

@kodifan commented on GitHub (Sep 10, 2025):

ok i managed to delete those 320 entries in database and everything works now - but it is diffidently a bug i trickplay management process.

@kodifan commented on GitHub (Sep 10, 2025): ok i managed to delete those 320 entries in database and everything works now - but it is diffidently a bug i trickplay management process.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#5653