aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-04-09 08:31:18 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-04-09 08:31:18 -0400
commit29818f8cbf1df2e5d2f67eff29b5b2e6568e4a37 (patch)
treebb18dc0c4c6af0ebf5c317c80f326f0cf8df99db
parentdbf9ac1233d1edf75325f6d09561d899c21ad663 (diff)
fixes Dvd Chapter Thumbs (#126)
-rw-r--r--MediaBrowser.Controller/MediaInfo/FFMpegManager.cs2
-rw-r--r--MediaBrowser.Server.Implementations/MediaEncoder/MediaEncoder.cs8
2 files changed, 6 insertions, 4 deletions
diff --git a/MediaBrowser.Controller/MediaInfo/FFMpegManager.cs b/MediaBrowser.Controller/MediaInfo/FFMpegManager.cs
index eb8f600f5..27713bbe6 100644
--- a/MediaBrowser.Controller/MediaInfo/FFMpegManager.cs
+++ b/MediaBrowser.Controller/MediaInfo/FFMpegManager.cs
@@ -176,7 +176,7 @@ namespace MediaBrowser.Controller.MediaInfo
if (extractImages)
{
// Disable for now on folder rips
- if (video.VideoType != VideoType.VideoFile)
+ if (video.VideoType != VideoType.VideoFile && video.VideoType != VideoType.Dvd)
{
continue;
}
diff --git a/MediaBrowser.Server.Implementations/MediaEncoder/MediaEncoder.cs b/MediaBrowser.Server.Implementations/MediaEncoder/MediaEncoder.cs
index fce88e3d8..ab039f9d2 100644
--- a/MediaBrowser.Server.Implementations/MediaEncoder/MediaEncoder.cs
+++ b/MediaBrowser.Server.Implementations/MediaEncoder/MediaEncoder.cs
@@ -698,13 +698,14 @@ namespace MediaBrowser.Server.Implementations.MediaEncoder
{
var resourcePool = type == InputType.AudioFile ? _audioImageResourcePool : _videoImageResourcePool;
- return ExtractImageInternal(GetInputArgument(inputFiles, type), offset, outputPath, resourcePool, cancellationToken);
+ return ExtractImageInternal(GetInputArgument(inputFiles, type), type, offset, outputPath, resourcePool, cancellationToken);
}
/// <summary>
/// Extracts the image.
/// </summary>
/// <param name="inputPath">The input path.</param>
+ /// <param name="type">The type.</param>
/// <param name="offset">The offset.</param>
/// <param name="outputPath">The output path.</param>
/// <param name="resourcePool">The resource pool.</param>
@@ -714,7 +715,7 @@ namespace MediaBrowser.Server.Implementations.MediaEncoder
/// or
/// outputPath</exception>
/// <exception cref="System.ApplicationException"></exception>
- private async Task ExtractImageInternal(string inputPath, TimeSpan? offset, string outputPath, SemaphoreSlim resourcePool, CancellationToken cancellationToken)
+ private async Task ExtractImageInternal(string inputPath, InputType type, TimeSpan? offset, string outputPath, SemaphoreSlim resourcePool, CancellationToken cancellationToken)
{
if (string.IsNullOrEmpty(inputPath))
{
@@ -727,7 +728,8 @@ namespace MediaBrowser.Server.Implementations.MediaEncoder
}
- var args = string.Format("-i {0} -threads 0 -v quiet -vframes 1 -filter:v select=\\'eq(pict_type\\,I)\\' -f image2 \"{1}\"", inputPath, outputPath);
+ var args = type != InputType.Dvd ? string.Format("-i {0} -threads 0 -v quiet -vframes 1 -filter:v select=\\'eq(pict_type\\,I)\\' -f image2 \"{1}\"", inputPath, outputPath) :
+ string.Format("-i {0} -threads 0 -v quiet -vframes 1 -f image2 \"{1}\"", inputPath, outputPath);
if (offset.HasValue)
{