Clean up dead code, consolidate duplication, fix redundancies
Remove 9 dead methods, 6 unused constants, and redundant ReaderWriterLockSlim from MetadataCache. Consolidate repeated patterns into HasChapters, IsPlayable, and ToLowerString helpers. Extract shared API methods in SRFApiClient. Move variant manifest rewriting from controller to StreamProxyService. Make Auto quality distinct from HD. Update README architecture section.
This commit is contained in:
@@ -70,7 +70,7 @@ public class SRFMediaProvider : IMediaSourceProvider
|
||||
|
||||
var mediaComposition = await _compositionFetcher.GetMediaCompositionAsync(urn, cancellationToken, cacheDuration).ConfigureAwait(false);
|
||||
|
||||
if (mediaComposition?.ChapterList == null || mediaComposition.ChapterList.Count == 0)
|
||||
if (mediaComposition?.HasChapters != true)
|
||||
{
|
||||
_logger.LogWarning("No chapters found for URN: {Urn}", urn);
|
||||
return sources;
|
||||
@@ -116,7 +116,7 @@ public class SRFMediaProvider : IMediaSourceProvider
|
||||
// Force fresh fetch with short cache duration
|
||||
var freshMediaComposition = await _compositionFetcher.GetMediaCompositionAsync(urn, cancellationToken, 1).ConfigureAwait(false);
|
||||
|
||||
if (freshMediaComposition?.ChapterList != null && freshMediaComposition.ChapterList.Count > 0)
|
||||
if (freshMediaComposition?.HasChapters == true)
|
||||
{
|
||||
var freshChapter = freshMediaComposition.ChapterList[0];
|
||||
mediaSource = await _mediaSourceFactory.CreateMediaSourceAsync(
|
||||
|
||||
Reference in New Issue
Block a user