Skip to content

Commit

Permalink
Merge pull request jellyfin#8775 from SenorSmartyPants/DVRMetadata
Browse files Browse the repository at this point in the history
  • Loading branch information
Bond-009 authored Jan 3, 2023
2 parents 223aaec + 8f4ac1c commit 43c3a46
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 12 deletions.
30 changes: 19 additions & 11 deletions Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1814,21 +1814,29 @@ private async Task SaveRecordingMetadata(TimerInfo timer, string recordingPath,
program.AddGenre("News");
}

if (timer.IsProgramSeries)
{
await SaveSeriesNfoAsync(timer, seriesPath).ConfigureAwait(false);
await SaveVideoNfoAsync(timer, recordingPath, program, false).ConfigureAwait(false);
}
else if (!timer.IsMovie || timer.IsSports || timer.IsNews)
var config = GetConfiguration();

if (config.SaveRecordingNFO)
{
await SaveVideoNfoAsync(timer, recordingPath, program, true).ConfigureAwait(false);
if (timer.IsProgramSeries)
{
await SaveSeriesNfoAsync(timer, seriesPath).ConfigureAwait(false);
await SaveVideoNfoAsync(timer, recordingPath, program, false).ConfigureAwait(false);
}
else if (!timer.IsMovie || timer.IsSports || timer.IsNews)
{
await SaveVideoNfoAsync(timer, recordingPath, program, true).ConfigureAwait(false);
}
else
{
await SaveVideoNfoAsync(timer, recordingPath, program, false).ConfigureAwait(false);
}
}
else

if (config.SaveRecordingImages)
{
await SaveVideoNfoAsync(timer, recordingPath, program, false).ConfigureAwait(false);
await SaveRecordingImages(recordingPath, program).ConfigureAwait(false);
}

await SaveRecordingImages(recordingPath, program).ConfigureAwait(false);
}
catch (Exception ex)
{
Expand Down
2 changes: 1 addition & 1 deletion MediaBrowser.Controller/Entities/TV/Episode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ public override bool BeforeMetadataRefresh(bool replaceAllMetadata)

if (!IsLocked)
{
if (SourceType == SourceType.Library)
if (SourceType == SourceType.Library || SourceType == SourceType.LiveTV)
{
try
{
Expand Down
4 changes: 4 additions & 0 deletions MediaBrowser.Model/LiveTv/LiveTvOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,9 @@ public LiveTvOptions()
public string RecordingPostProcessor { get; set; }

public string RecordingPostProcessorArguments { get; set; }

public bool SaveRecordingNFO { get; set; } = true;

public bool SaveRecordingImages { get; set; } = true;
}
}

0 comments on commit 43c3a46

Please sign in to comment.