Add option to bypass Chromaprint
This commit is contained in:
parent
bcacfc8517
commit
d8ebcfe772
@ -149,13 +149,22 @@ public class ChapterAnalyzer : IMediaFileAnalyzer
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check for possibility of overlapping keywords
|
||||||
|
var overlap = Regex.IsMatch(
|
||||||
|
next.Name,
|
||||||
|
expression,
|
||||||
|
RegexOptions.None,
|
||||||
|
TimeSpan.FromSeconds(1));
|
||||||
|
|
||||||
|
if (overlap)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
matchingChapter = new(episode.EpisodeId, currentRange);
|
matchingChapter = new(episode.EpisodeId, currentRange);
|
||||||
_logger.LogTrace("{Base}: okay", baseMessage);
|
_logger.LogTrace("{Base}: okay", baseMessage);
|
||||||
if (i > 0)
|
|
||||||
{
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return matchingChapter;
|
return matchingChapter;
|
||||||
}
|
}
|
||||||
|
@ -17,11 +17,6 @@ public class PluginConfiguration : BasePluginConfiguration
|
|||||||
|
|
||||||
// ===== Analysis settings =====
|
// ===== Analysis settings =====
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets a value indicating whether the episode's fingerprint should be cached to the filesystem.
|
|
||||||
/// </summary>
|
|
||||||
public bool CacheFingerprints { get; set; } = true;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the max degree of parallelism used when analyzing episodes.
|
/// Gets or sets the max degree of parallelism used when analyzing episodes.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -37,6 +32,16 @@ public class PluginConfiguration : BasePluginConfiguration
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool AnalyzeSeasonZero { get; set; } = false;
|
public bool AnalyzeSeasonZero { get; set; } = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets a value indicating whether the episode's fingerprint should be cached to the filesystem.
|
||||||
|
/// </summary>
|
||||||
|
public bool CacheFingerprints { get; set; } = true;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets a value indicating whether analysis will use Chromaprint to determine fingerprints.
|
||||||
|
/// </summary>
|
||||||
|
public bool UseChromaprint { get; set; } = true;
|
||||||
|
|
||||||
// ===== EDL handling =====
|
// ===== EDL handling =====
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -213,6 +213,20 @@
|
|||||||
<summary>Process Configuration</summary>
|
<summary>Process Configuration</summary>
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
|
<div class="checkboxContainer checkboxContainer-withDescription">
|
||||||
|
<label class="emby-checkbox-label">
|
||||||
|
<input id="UseChromaprint" type="checkbox" is="emby-checkbox" />
|
||||||
|
<span>Chromaprint analysis</span>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<div class="fieldDescription">
|
||||||
|
If checked, analysis will use Chromaprint to compare episode audio and identify intros.
|
||||||
|
<br />
|
||||||
|
<strong>WARNING: Disabling this option may result in incomplete or innaccurate analysis!</strong>
|
||||||
|
<br />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="checkboxContainer checkboxContainer-withDescription">
|
<div class="checkboxContainer checkboxContainer-withDescription">
|
||||||
<label class="emby-checkbox-label">
|
<label class="emby-checkbox-label">
|
||||||
<input id="CacheFingerprints" type="checkbox" is="emby-checkbox" />
|
<input id="CacheFingerprints" type="checkbox" is="emby-checkbox" />
|
||||||
@ -568,6 +582,7 @@
|
|||||||
var booleanConfigurationFields = [
|
var booleanConfigurationFields = [
|
||||||
"AnalyzeSeasonZero",
|
"AnalyzeSeasonZero",
|
||||||
"RegenerateEdlFiles",
|
"RegenerateEdlFiles",
|
||||||
|
"UseChromaprint",
|
||||||
"CacheFingerprints",
|
"CacheFingerprints",
|
||||||
"AutoSkip",
|
"AutoSkip",
|
||||||
"SkipFirstEpisode",
|
"SkipFirstEpisode",
|
||||||
|
@ -54,7 +54,7 @@ public class BaseItemAnalyzerTask
|
|||||||
CancellationToken cancellationToken)
|
CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
// Assert that ffmpeg with chromaprint is installed
|
// Assert that ffmpeg with chromaprint is installed
|
||||||
if (!FFmpegWrapper.CheckFFmpegVersion())
|
if (Plugin.Instance!.Configuration.UseChromaprint && !FFmpegWrapper.CheckFFmpegVersion())
|
||||||
{
|
{
|
||||||
throw new FingerprintException(
|
throw new FingerprintException(
|
||||||
"ffmpeg with chromaprint is not installed on this system - episodes will not be analyzed. If Jellyfin is running natively, install jellyfin-ffmpeg5. If Jellyfin is running in a container, upgrade it to the latest version of 10.8.0.");
|
"ffmpeg with chromaprint is not installed on this system - episodes will not be analyzed. If Jellyfin is running natively, install jellyfin-ffmpeg5. If Jellyfin is running in a container, upgrade it to the latest version of 10.8.0.");
|
||||||
@ -186,7 +186,10 @@ public class BaseItemAnalyzerTask
|
|||||||
var analyzers = new Collection<IMediaFileAnalyzer>();
|
var analyzers = new Collection<IMediaFileAnalyzer>();
|
||||||
|
|
||||||
analyzers.Add(new ChapterAnalyzer(_loggerFactory.CreateLogger<ChapterAnalyzer>()));
|
analyzers.Add(new ChapterAnalyzer(_loggerFactory.CreateLogger<ChapterAnalyzer>()));
|
||||||
|
if (Plugin.Instance!.Configuration.UseChromaprint)
|
||||||
|
{
|
||||||
analyzers.Add(new ChromaprintAnalyzer(_loggerFactory.CreateLogger<ChromaprintAnalyzer>()));
|
analyzers.Add(new ChromaprintAnalyzer(_loggerFactory.CreateLogger<ChromaprintAnalyzer>()));
|
||||||
|
}
|
||||||
|
|
||||||
if (this._analysisMode == AnalysisMode.Credits)
|
if (this._analysisMode == AnalysisMode.Credits)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user