mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-23 23:20:51 +01:00
[PR #14565] Improve RecordFromMediaSource resilience. #13855
Labels
No labels
area:database
awaiting-feedback
backend
blocked
breaking change: web api
bug
build
ci
confirmed
discussion needed
dotnet future
downstream
duplicate
EFjellyfin.db
enhancement
feature
future
github-actions
good first issue
hdr
help wanted
invalid
investigation
librarydb
live-tv
lyrics
media playback
music
needs testing
nuget
performance
platform
pull-request
question
regression
release critical
requires-web
roadmap
security
security
stale
support
syncplay
ui & ux
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: starred/jellyfin#13855
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/jellyfin/jellyfin/pull/14565
Author: @FerronN
Created: 8/2/2025
Status: 🔄 Open
Base:
release-10.10.z← Head:ft-dvr-resilience📝 Commits (2)
84115e8Improve RecordFromMediaSource resilience.ae679b5Fix ABI compliance for StreamHelper.cs📊 Changes
3 files changed (+81 additions, -23 deletions)
View changed files
📝
MediaBrowser.Model/IO/IODefaults.cs(+5 -0)📝
src/Jellyfin.LiveTv/IO/DirectRecorder.cs(+46 -19)📝
src/Jellyfin.LiveTv/IO/StreamHelper.cs(+30 -4)📄 Description
Hi,
I recently added LiveTV functionality to my Jellyfin installation. When recording programs, I noticed that my recordings were much shorter then then they should be. For example, if I the recording should be 1,5 hours, it only recorded 1 to 30 minutes, but I couldn't find any errors. Probably because the streams I watch aren't as stable as you want to be. Although you don't notice this when watching live (buffering in the Android TV client).
I noticed that the current code doesn't have any error handling if the stream for whatever reasons stops before the durationToken cancellation is requested. So, I updated the code to handle this. For me this works perfectly now.
I think the recording should always try to reconnect as long as the linkedCancellationToken cancellation hasn't been requested.
Please let me know if you have feedback on my implementation.
Changes
RecordFromMediaSourceinEncodedRecorder.cs.CopyToAsyncInternalinStreamHelper.cs.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.