Add a wrapper for media segments
pending approval from Jellyfin
This commit is contained in:
parent
88ca573144
commit
a90175dd66
@ -275,10 +275,10 @@ public class ChromaprintAnalyzer : IMediaFileAnalyzer
|
||||
{
|
||||
var modifiedPoint = (uint)(originalPoint + i);
|
||||
|
||||
if (rhsIndex.TryGetValue(modifiedPoint, out var value))
|
||||
if (rhsIndex.TryGetValue(modifiedPoint, out var rhsModifiedPoint))
|
||||
{
|
||||
var lhsFirst = (int)lhsIndex[originalPoint];
|
||||
var rhsFirst = (int)value;
|
||||
var rhsFirst = (int)rhsModifiedPoint;
|
||||
indexShifts.Add(rhsFirst - lhsFirst);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,36 @@
|
||||
namespace ConfusedPolarBear.Plugin.IntroSkipper;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
/// <summary>
|
||||
/// Chapter name analyzer.
|
||||
/// </summary>
|
||||
public class SegmentAnalyzer : IMediaFileAnalyzer
|
||||
{
|
||||
private ILogger<SegmentAnalyzer> _logger;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SegmentAnalyzer"/> class.
|
||||
/// </summary>
|
||||
/// <param name="logger">Logger.</param>
|
||||
public SegmentAnalyzer(ILogger<SegmentAnalyzer> logger)
|
||||
{
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public ReadOnlyCollection<QueuedEpisode> AnalyzeMediaFiles(
|
||||
ReadOnlyCollection<QueuedEpisode> analysisQueue,
|
||||
AnalysisMode mode,
|
||||
CancellationToken cancellationToken)
|
||||
{
|
||||
return analysisQueue;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user