Collections: Store reliable total duration #3777

Open
opened 2025-12-21 22:44:49 +01:00 by backuprepo · 3 comments
Owner

Originally created by @doc-code-hub on GitHub (Apr 25, 2022).

Introduction

Viewing the total duration of a content on the detail page can be very useful as information, for organizing or predicting the end.

Likewise, I think it could be convenient and useful to be able to view the total duration of a collection (eg to plan a marathon).

Image from my PR
image

Suggested Enancement

Basically I would like the total RunTimeTicks of the collection to be saved, recursively obtained from all the children.

This way clients would be able to show them immediately in user-readable format.


I had tried to achieve this purpose client-side ( on jellyfin-web #3552 ), however it remains impossible to have a reliable total duration with all types of content ( e.g. with collection inside collection), moreover the information was deduced by the children, who were retrieved at a later time, introducing a delay.

It has been pointed out to me (by @thornbill), and I agree, that it would be much better if this information were computed and stored server-side.

  • It would be much more comfortable
  • It would make the information available immediately
  • It would allow to always have a total effective duration, regardless of the type of content inside (also solving the problem of collection within collection or series).

In this regard, I am trying to propose an implementation on the related PR and i'm open to suggestions (on the PR please :) )

My Implementation in short

  • Add UpdateRunTimeTicksToItems method in BoxSet
  • Handle update of RunTimeTicks when adding/removing items from the collection
  • Add a Task to update the RunTimeTicks for the collections (to handle eventual file remove and RunTimeTicks update)
Originally created by @doc-code-hub on GitHub (Apr 25, 2022). ## Introduction **Viewing** the **total duration** of a content on the detail page **can be very useful** as information, for organizing or predicting the end. Likewise, I think it could be convenient and useful to be able to view the total duration of a _**collection**_ (eg to plan a marathon). _Image from my PR_ ![image](https://user-images.githubusercontent.com/61033694/165180974-19a8f3b5-791d-4d34-bf21-7e0d9e706f86.png) ## Suggested Enancement Basically I would like the total RunTimeTicks of the collection to be saved, recursively obtained from all the children. This way clients would be able to show them immediately in user-readable format. --- _I had tried to achieve this purpose client-side_ ( on jellyfin-web [#3552](https://github.com/jellyfin/jellyfin-web/pull/3552) ), _however it remains **impossible** to have a reliable total duration with all types of content ( e.g. with collection inside collection), moreover the information was deduced by the children, who were retrieved at a later time, introducing a delay._ #### It has been pointed out to me (by @thornbill), and I agree, that it would be much better if this information were computed and stored server-side. - It would be much more comfortable - It would make the information available immediately - It would allow to always have a total effective duration, regardless of the type of content inside (also solving the problem of collection within collection or series). _In this regard, I am trying to propose an implementation on the related [PR](https://github.com/jellyfin/jellyfin/pull/7661) and i'm open to suggestions (on the [PR](https://github.com/jellyfin/jellyfin/pull/7661) please_ :) _)_ ### [My Implementation](https://github.com/jellyfin/jellyfin/pull/7661) in short - Add UpdateRunTimeTicksToItems method in BoxSet - Handle update of RunTimeTicks when adding/removing items from the collection - Add a Task to update the RunTimeTicks for the collections _(to handle eventual file remove and RunTimeTicks update)_
backuprepo added the
enhancement
confirmed
labels 2025-12-21 22:44:49 +01:00
Author
Owner

@jellyfin-bot commented on GitHub (Aug 24, 2022):

This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.

If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or master branch, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.

This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.

@jellyfin-bot commented on GitHub (Aug 24, 2022): This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments. If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or master branch, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label. This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on [Matrix or Social Media](https://docs.jellyfin.org/general/getting-help.html).
Author
Owner

@thornbill commented on GitHub (Aug 24, 2022):

Still relevant 🙂

@thornbill commented on GitHub (Aug 24, 2022): Still relevant 🙂
Author
Owner

@jellyfin-bot commented on GitHub (Mar 22, 2023):

This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.

If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or master branch, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.

This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.

@jellyfin-bot commented on GitHub (Mar 22, 2023): This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments. If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or master branch, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label. This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on [Matrix or Social Media](https://docs.jellyfin.org/general/getting-help.html).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: starred/jellyfin#3777
No description provided.