diff --git a/Emby.Dlna/Profiles/DefaultProfile.cs b/Emby.Dlna/Profiles/DefaultProfile.cs
index f05a4869a7..e99b22f2d0 100644
--- a/Emby.Dlna/Profiles/DefaultProfile.cs
+++ b/Emby.Dlna/Profiles/DefaultProfile.cs
@@ -30,8 +30,8 @@ namespace Emby.Dlna.Profiles
MaxIconWidth = 48;
MaxIconHeight = 48;
- MaxStreamingBitrate = 24000000;
- MaxStaticBitrate = 24000000;
+ MaxStreamingBitrate = 30000000;
+ MaxStaticBitrate = 30000000;
MusicStreamingTranscodingBitrate = 192000;
EnableAlbumArtInDidl = false;
diff --git a/Emby.Dlna/Profiles/Xml/BubbleUPnp.xml b/Emby.Dlna/Profiles/Xml/BubbleUPnp.xml
index 754be1af80..84bfa336a0 100644
--- a/Emby.Dlna/Profiles/Xml/BubbleUPnp.xml
+++ b/Emby.Dlna/Profiles/Xml/BubbleUPnp.xml
@@ -22,8 +22,8 @@
480
48
48
- 24000000
- 24000000
+ 30000000
+ 30000000
192000
DMS-1.50
@@ -40,9 +40,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Default.xml b/Emby.Dlna/Profiles/Xml/Default.xml
index b0b0d7ac11..6d39ac1da1 100644
--- a/Emby.Dlna/Profiles/Xml/Default.xml
+++ b/Emby.Dlna/Profiles/Xml/Default.xml
@@ -16,8 +16,8 @@
480
48
48
- 24000000
- 24000000
+ 30000000
+ 30000000
192000
DMS-1.50
@@ -33,9 +33,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Denon AVR.xml b/Emby.Dlna/Profiles/Xml/Denon AVR.xml
index 00b56c03d5..9c6af71ed9 100644
--- a/Emby.Dlna/Profiles/Xml/Denon AVR.xml
+++ b/Emby.Dlna/Profiles/Xml/Denon AVR.xml
@@ -21,8 +21,8 @@
480
48
48
- 24000000
- 24000000
+ 30000000
+ 30000000
192000
DMS-1.50
@@ -37,9 +37,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/DirecTV HD-DVR.xml b/Emby.Dlna/Profiles/Xml/DirecTV HD-DVR.xml
index 2021dae922..bb0fd0bb23 100644
--- a/Emby.Dlna/Profiles/Xml/DirecTV HD-DVR.xml
+++ b/Emby.Dlna/Profiles/Xml/DirecTV HD-DVR.xml
@@ -22,8 +22,8 @@
480
48
48
- 24000000
- 24000000
+ 30000000
+ 30000000
192000
DMS-1.50
@@ -39,8 +39,8 @@
-
-
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Dish Hopper-Joey.xml b/Emby.Dlna/Profiles/Xml/Dish Hopper-Joey.xml
index 556a3d673d..fc84965105 100644
--- a/Emby.Dlna/Profiles/Xml/Dish Hopper-Joey.xml
+++ b/Emby.Dlna/Profiles/Xml/Dish Hopper-Joey.xml
@@ -23,8 +23,8 @@
480
48
48
- 24000000
- 24000000
+ 30000000
+ 30000000
192000
DMS-1.50
@@ -41,9 +41,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Kodi.xml b/Emby.Dlna/Profiles/Xml/Kodi.xml
index a78984b097..286417d968 100644
--- a/Emby.Dlna/Profiles/Xml/Kodi.xml
+++ b/Emby.Dlna/Profiles/Xml/Kodi.xml
@@ -23,7 +23,7 @@
48
48
100000000
- 24000000
+ 30000000
1280000
DMS-1.50
@@ -40,9 +40,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/LG Smart TV.xml b/Emby.Dlna/Profiles/Xml/LG Smart TV.xml
index 2963e5f383..e48af3842c 100644
--- a/Emby.Dlna/Profiles/Xml/LG Smart TV.xml
+++ b/Emby.Dlna/Profiles/Xml/LG Smart TV.xml
@@ -22,8 +22,8 @@
480
48
48
- 24000000
- 24000000
+ 30000000
+ 30000000
192000
DMS-1.50
@@ -42,9 +42,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Linksys DMA2100.xml b/Emby.Dlna/Profiles/Xml/Linksys DMA2100.xml
index c9ea6daff3..7f15181544 100644
--- a/Emby.Dlna/Profiles/Xml/Linksys DMA2100.xml
+++ b/Emby.Dlna/Profiles/Xml/Linksys DMA2100.xml
@@ -20,8 +20,8 @@
480
48
48
- 24000000
- 24000000
+ 30000000
+ 30000000
192000
DMS-1.50
@@ -37,9 +37,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/MediaMonkey.xml b/Emby.Dlna/Profiles/Xml/MediaMonkey.xml
index 9b726ad4cf..3d5b398969 100644
--- a/Emby.Dlna/Profiles/Xml/MediaMonkey.xml
+++ b/Emby.Dlna/Profiles/Xml/MediaMonkey.xml
@@ -22,8 +22,8 @@
480
48
48
- 24000000
- 24000000
+ 30000000
+ 30000000
192000
DMS-1.50
@@ -43,9 +43,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Panasonic Viera.xml b/Emby.Dlna/Profiles/Xml/Panasonic Viera.xml
index b520b2b53a..689f2813c9 100644
--- a/Emby.Dlna/Profiles/Xml/Panasonic Viera.xml
+++ b/Emby.Dlna/Profiles/Xml/Panasonic Viera.xml
@@ -23,8 +23,8 @@
480
48
48
- 24000000
- 24000000
+ 30000000
+ 30000000
192000
DMS-1.50
@@ -50,9 +50,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Popcorn Hour.xml b/Emby.Dlna/Profiles/Xml/Popcorn Hour.xml
index 9fa49e94a5..4da6fa3fa5 100644
--- a/Emby.Dlna/Profiles/Xml/Popcorn Hour.xml
+++ b/Emby.Dlna/Profiles/Xml/Popcorn Hour.xml
@@ -16,8 +16,8 @@
480
48
48
- 24000000
- 24000000
+ 30000000
+ 30000000
192000
DMS-1.50
@@ -38,9 +38,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Samsung Smart TV.xml b/Emby.Dlna/Profiles/Xml/Samsung Smart TV.xml
index a3acea8296..fbdc7bc4fc 100644
--- a/Emby.Dlna/Profiles/Xml/Samsung Smart TV.xml
+++ b/Emby.Dlna/Profiles/Xml/Samsung Smart TV.xml
@@ -22,8 +22,8 @@
480
48
48
- 24000000
- 24000000
+ 30000000
+ 30000000
192000
DMS-1.50
@@ -50,9 +50,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Sharp Smart TV.xml b/Emby.Dlna/Profiles/Xml/Sharp Smart TV.xml
index e367a8c153..2ca6ff605a 100644
--- a/Emby.Dlna/Profiles/Xml/Sharp Smart TV.xml
+++ b/Emby.Dlna/Profiles/Xml/Sharp Smart TV.xml
@@ -22,8 +22,8 @@
480
48
48
- 24000000
- 24000000
+ 30000000
+ 30000000
192000
DMS-1.50
@@ -42,9 +42,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml b/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml
index 19a8ed5f9f..d3735a9ed4 100644
--- a/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml
+++ b/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml
@@ -26,8 +26,8 @@
480
48
48
- 24000000
- 24000000
+ 30000000
+ 30000000
192000
DMS-1.50
@@ -52,9 +52,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2014.xml b/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2014.xml
index 2fb9cf5838..c5c62cb737 100644
--- a/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2014.xml
+++ b/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2014.xml
@@ -26,8 +26,8 @@
480
48
48
- 24000000
- 24000000
+ 30000000
+ 30000000
192000
DMS-1.50
@@ -52,9 +52,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2015.xml b/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2015.xml
index 956977643a..fd0ff91a02 100644
--- a/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2015.xml
+++ b/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2015.xml
@@ -24,8 +24,8 @@
480
48
48
- 24000000
- 24000000
+ 30000000
+ 30000000
192000
DMS-1.50
@@ -50,9 +50,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2016.xml b/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2016.xml
index ddb8f21008..66c942bfe3 100644
--- a/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2016.xml
+++ b/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2016.xml
@@ -24,8 +24,8 @@
480
48
48
- 24000000
- 24000000
+ 30000000
+ 30000000
192000
DMS-1.50
@@ -50,9 +50,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player.xml b/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player.xml
index ee113ef630..7113a45830 100644
--- a/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player.xml
+++ b/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player.xml
@@ -24,8 +24,8 @@
480
48
48
- 24000000
- 24000000
+ 30000000
+ 30000000
192000
DMS-1.50
@@ -47,9 +47,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Sony Bravia (2010).xml b/Emby.Dlna/Profiles/Xml/Sony Bravia (2010).xml
index 4b7feded91..e5fe83f0f3 100644
--- a/Emby.Dlna/Profiles/Xml/Sony Bravia (2010).xml
+++ b/Emby.Dlna/Profiles/Xml/Sony Bravia (2010).xml
@@ -23,8 +23,8 @@
480
48
48
- 24000000
- 24000000
+ 30000000
+ 30000000
192000
DMS-1.50
@@ -45,9 +45,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Sony Bravia (2011).xml b/Emby.Dlna/Profiles/Xml/Sony Bravia (2011).xml
index 3b234ac36e..8bbaefed9a 100644
--- a/Emby.Dlna/Profiles/Xml/Sony Bravia (2011).xml
+++ b/Emby.Dlna/Profiles/Xml/Sony Bravia (2011).xml
@@ -23,8 +23,8 @@
480
48
48
- 24000000
- 24000000
+ 30000000
+ 30000000
192000
DMS-1.50
@@ -48,9 +48,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Sony Bravia (2012).xml b/Emby.Dlna/Profiles/Xml/Sony Bravia (2012).xml
index 4748b8d2ad..4e51116a02 100644
--- a/Emby.Dlna/Profiles/Xml/Sony Bravia (2012).xml
+++ b/Emby.Dlna/Profiles/Xml/Sony Bravia (2012).xml
@@ -23,8 +23,8 @@
480
48
48
- 24000000
- 24000000
+ 30000000
+ 30000000
192000
DMS-1.50
@@ -50,9 +50,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Sony Bravia (2013).xml b/Emby.Dlna/Profiles/Xml/Sony Bravia (2013).xml
index d0ec30a26f..002b31a27e 100644
--- a/Emby.Dlna/Profiles/Xml/Sony Bravia (2013).xml
+++ b/Emby.Dlna/Profiles/Xml/Sony Bravia (2013).xml
@@ -23,8 +23,8 @@
480
48
48
- 24000000
- 24000000
+ 30000000
+ 30000000
192000
DMS-1.50
@@ -55,9 +55,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Sony Bravia (2014).xml b/Emby.Dlna/Profiles/Xml/Sony Bravia (2014).xml
index ba83490b4b..2067a1d45b 100644
--- a/Emby.Dlna/Profiles/Xml/Sony Bravia (2014).xml
+++ b/Emby.Dlna/Profiles/Xml/Sony Bravia (2014).xml
@@ -23,8 +23,8 @@
480
48
48
- 24000000
- 24000000
+ 30000000
+ 30000000
192000
DMS-1.50
@@ -55,9 +55,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Sony PlayStation 3.xml b/Emby.Dlna/Profiles/Xml/Sony PlayStation 3.xml
index ff2e282f8a..bea72c4104 100644
--- a/Emby.Dlna/Profiles/Xml/Sony PlayStation 3.xml
+++ b/Emby.Dlna/Profiles/Xml/Sony PlayStation 3.xml
@@ -23,8 +23,8 @@
480
48
48
- 24000000
- 24000000
+ 30000000
+ 30000000
192000
DMS-1.50
@@ -45,9 +45,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Sony PlayStation 4.xml b/Emby.Dlna/Profiles/Xml/Sony PlayStation 4.xml
index 22131a502c..128e0cf1fc 100644
--- a/Emby.Dlna/Profiles/Xml/Sony PlayStation 4.xml
+++ b/Emby.Dlna/Profiles/Xml/Sony PlayStation 4.xml
@@ -23,8 +23,8 @@
480
48
48
- 24000000
- 24000000
+ 30000000
+ 30000000
192000
DMS-1.50
@@ -45,9 +45,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Vlc.xml b/Emby.Dlna/Profiles/Xml/Vlc.xml
index f1d9c1f2d1..cd35f3f91a 100644
--- a/Emby.Dlna/Profiles/Xml/Vlc.xml
+++ b/Emby.Dlna/Profiles/Xml/Vlc.xml
@@ -22,8 +22,8 @@
480
48
48
- 24000000
- 24000000
+ 30000000
+ 30000000
192000
DMS-1.50
@@ -40,9 +40,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/WDTV Live.xml b/Emby.Dlna/Profiles/Xml/WDTV Live.xml
index 605a17df40..acb9727034 100644
--- a/Emby.Dlna/Profiles/Xml/WDTV Live.xml
+++ b/Emby.Dlna/Profiles/Xml/WDTV Live.xml
@@ -23,8 +23,8 @@
480
48
48
- 24000000
- 24000000
+ 30000000
+ 30000000
192000
DMS-1.50
@@ -51,9 +51,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Xbox 360.xml b/Emby.Dlna/Profiles/Xml/Xbox 360.xml
index a470fa4cbc..e46c52f4c8 100644
--- a/Emby.Dlna/Profiles/Xml/Xbox 360.xml
+++ b/Emby.Dlna/Profiles/Xml/Xbox 360.xml
@@ -24,8 +24,8 @@
480
48
48
- 24000000
- 24000000
+ 30000000
+ 30000000
192000
DMS-1.50
@@ -46,9 +46,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Xbox One.xml b/Emby.Dlna/Profiles/Xml/Xbox One.xml
index 6289847ca4..cffc386b1c 100644
--- a/Emby.Dlna/Profiles/Xml/Xbox One.xml
+++ b/Emby.Dlna/Profiles/Xml/Xbox One.xml
@@ -23,8 +23,8 @@
480
48
48
- 24000000
- 24000000
+ 30000000
+ 30000000
192000
DMS-1.50
@@ -46,9 +46,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/foobar2000.xml b/Emby.Dlna/Profiles/Xml/foobar2000.xml
index 779e59310e..192ba5a300 100644
--- a/Emby.Dlna/Profiles/Xml/foobar2000.xml
+++ b/Emby.Dlna/Profiles/Xml/foobar2000.xml
@@ -22,8 +22,8 @@
480
48
48
- 24000000
- 24000000
+ 30000000
+ 30000000
192000
DMS-1.50
@@ -43,9 +43,9 @@
-
-
-
+
+
+
diff --git a/Emby.Drawing/ImageProcessor.cs b/Emby.Drawing/ImageProcessor.cs
index 5b04ceea25..f19e3e037f 100644
--- a/Emby.Drawing/ImageProcessor.cs
+++ b/Emby.Drawing/ImageProcessor.cs
@@ -57,7 +57,6 @@ namespace Emby.Drawing
private readonly IJsonSerializer _jsonSerializer;
private readonly IServerApplicationPaths _appPaths;
private readonly IImageEncoder _imageEncoder;
- private readonly SemaphoreSlim _imageProcessingSemaphore;
private readonly Func _libraryManager;
public ImageProcessor(ILogger logger,
@@ -102,8 +101,6 @@ namespace Emby.Drawing
}
_cachedImagedSizes = new ConcurrentDictionary(sizeDictionary);
- _logger.Info("ImageProcessor started with {0} max concurrent image processes", maxConcurrentImageProcesses);
- _imageProcessingSemaphore = new SemaphoreSlim(maxConcurrentImageProcesses, maxConcurrentImageProcesses);
}
public string[] SupportedInputFormats
@@ -238,8 +235,6 @@ namespace Emby.Drawing
var outputFormat = GetOutputFormat(options.SupportedOutputFormats[0]);
var cacheFilePath = GetCacheFilePath(originalImagePath, newSize, quality, dateModified, outputFormat, options.AddPlayedIndicator, options.PercentPlayed, options.UnplayedCount, options.Blur, options.BackgroundColor, options.ForegroundLayer);
- //var imageProcessingLockTaken = false;
-
try
{
CheckDisposed();
@@ -253,10 +248,6 @@ namespace Emby.Drawing
var tmpPath = Path.ChangeExtension(Path.Combine(_appPaths.TempDirectory, Guid.NewGuid().ToString("N")), Path.GetExtension(cacheFilePath));
_fileSystem.CreateDirectory(Path.GetDirectoryName(tmpPath));
- //await _imageProcessingSemaphore.WaitAsync().ConfigureAwait(false);
-
- //imageProcessingLockTaken = true;
-
_imageEncoder.EncodeImage(originalImagePath, tmpPath, AutoOrient(options.Item), newWidth, newHeight, quality, options, outputFormat);
CopyFile(tmpPath, cacheFilePath);
@@ -273,13 +264,6 @@ namespace Emby.Drawing
// Just spit out the original file if all the options are default
return new Tuple(originalImagePath, MimeTypes.GetMimeType(originalImagePath), dateModified);
}
- //finally
- //{
- // if (imageProcessingLockTaken)
- // {
- // _imageProcessingSemaphore.Release();
- // }
- //}
}
private void CopyFile(string src, string destination)
@@ -786,24 +770,15 @@ namespace Emby.Drawing
var tmpPath = Path.Combine(_appPaths.TempDirectory, Path.ChangeExtension(Guid.NewGuid().ToString(), Path.GetExtension(enhancedImagePath)));
_fileSystem.CreateDirectory(Path.GetDirectoryName(tmpPath));
- await _imageProcessingSemaphore.WaitAsync().ConfigureAwait(false);
+ await ExecuteImageEnhancers(supportedEnhancers, originalImagePath, tmpPath, item, imageType, imageIndex).ConfigureAwait(false);
try
{
- await ExecuteImageEnhancers(supportedEnhancers, originalImagePath, tmpPath, item, imageType, imageIndex).ConfigureAwait(false);
-
- try
- {
- _fileSystem.CopyFile(tmpPath, enhancedImagePath, true);
- }
- catch
- {
-
- }
+ _fileSystem.CopyFile(tmpPath, enhancedImagePath, true);
}
- finally
+ catch
{
- _imageProcessingSemaphore.Release();
+
}
return tmpPath;
diff --git a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
index 97f2c57eb0..af826f231b 100644
--- a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
+++ b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
@@ -49,16 +49,6 @@ namespace MediaBrowser.MediaEncoding.Encoder
///
private readonly SemaphoreSlim _thumbnailResourcePool = new SemaphoreSlim(1, 1);
- ///
- /// The video image resource pool
- ///
- private readonly SemaphoreSlim _videoImageResourcePool = new SemaphoreSlim(1, 1);
-
- ///
- /// The audio image resource pool
- ///
- private readonly SemaphoreSlim _audioImageResourcePool = new SemaphoreSlim(2, 2);
-
///
/// The FF probe resource pool
///
@@ -724,8 +714,6 @@ namespace MediaBrowser.MediaEncoding.Encoder
private async Task ExtractImage(string[] inputFiles, string container, int? imageStreamIndex, MediaProtocol protocol, bool isAudio,
Video3DFormat? threedFormat, TimeSpan? offset, CancellationToken cancellationToken)
{
- var resourcePool = isAudio ? _audioImageResourcePool : _videoImageResourcePool;
-
var inputArgument = GetInputArgument(inputFiles, protocol);
if (isAudio)
@@ -740,7 +728,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
{
try
{
- return await ExtractImageInternal(inputArgument, container, imageStreamIndex, protocol, threedFormat, offset, true, resourcePool, cancellationToken).ConfigureAwait(false);
+ return await ExtractImageInternal(inputArgument, container, imageStreamIndex, protocol, threedFormat, offset, true, cancellationToken).ConfigureAwait(false);
}
catch (ArgumentException)
{
@@ -752,10 +740,10 @@ namespace MediaBrowser.MediaEncoding.Encoder
}
}
- return await ExtractImageInternal(inputArgument, container, imageStreamIndex, protocol, threedFormat, offset, false, resourcePool, cancellationToken).ConfigureAwait(false);
+ return await ExtractImageInternal(inputArgument, container, imageStreamIndex, protocol, threedFormat, offset, false, cancellationToken).ConfigureAwait(false);
}
- private async Task ExtractImageInternal(string inputPath, string container, int? imageStreamIndex, MediaProtocol protocol, Video3DFormat? threedFormat, TimeSpan? offset, bool useIFrame, SemaphoreSlim resourcePool, CancellationToken cancellationToken)
+ private async Task ExtractImageInternal(string inputPath, string container, int? imageStreamIndex, MediaProtocol protocol, Video3DFormat? threedFormat, TimeSpan? offset, bool useIFrame, CancellationToken cancellationToken)
{
if (string.IsNullOrEmpty(inputPath))
{
@@ -835,31 +823,21 @@ namespace MediaBrowser.MediaEncoding.Encoder
using (var processWrapper = new ProcessWrapper(process, this, _logger))
{
- await resourcePool.WaitAsync(cancellationToken).ConfigureAwait(false);
-
bool ranToCompletion;
- try
+ StartProcess(processWrapper);
+
+ var timeoutMs = ConfigurationManager.Configuration.ImageExtractionTimeoutMs;
+ if (timeoutMs <= 0)
{
- StartProcess(processWrapper);
-
- var timeoutMs = ConfigurationManager.Configuration.ImageExtractionTimeoutMs;
- if (timeoutMs <= 0)
- {
- timeoutMs = DefaultImageExtractionTimeoutMs;
- }
-
- ranToCompletion = process.WaitForExit(timeoutMs);
-
- if (!ranToCompletion)
- {
- StopProcess(processWrapper, 1000);
- }
-
+ timeoutMs = DefaultImageExtractionTimeoutMs;
}
- finally
+
+ ranToCompletion = process.WaitForExit(timeoutMs);
+
+ if (!ranToCompletion)
{
- resourcePool.Release();
+ StopProcess(processWrapper, 1000);
}
var exitCode = ranToCompletion ? processWrapper.ExitCode ?? 0 : -1;
@@ -1118,7 +1096,6 @@ namespace MediaBrowser.MediaEncoding.Encoder
{
if (dispose)
{
- _videoImageResourcePool.Dispose();
StopProcesses();
}
}
diff --git a/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs b/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs
index ffff0f27d5..a464b045bf 100644
--- a/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs
+++ b/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs
@@ -349,7 +349,7 @@ namespace MediaBrowser.Model.Dlna
{
return MediaFormatProfile.LPCM16_48_MONO;
}
- if (frequency.Value == 48000 && channels.Value == 1)
+ if (frequency.Value == 48000 && channels.Value == 2)
{
return MediaFormatProfile.LPCM16_48_STEREO;
}
diff --git a/MediaBrowser.Providers/Omdb/OmdbProvider.cs b/MediaBrowser.Providers/Omdb/OmdbProvider.cs
index 148bfc8a8d..2c368c97b2 100644
--- a/MediaBrowser.Providers/Omdb/OmdbProvider.cs
+++ b/MediaBrowser.Providers/Omdb/OmdbProvider.cs
@@ -14,8 +14,6 @@ using System.Net;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
-using MediaBrowser.Common.IO;
-using MediaBrowser.Controller.IO;
namespace MediaBrowser.Providers.Omdb
{
@@ -68,21 +66,11 @@ namespace MediaBrowser.Providers.Omdb
item.ProductionYear = year;
}
- // Seeing some bogus RT data on omdb for series, so filter it out here
- // RT doesn't even have tv series
- int tomatoMeter;
+ var tomatoScore = result.GetRottenTomatoScore();
- if (!string.IsNullOrEmpty(result.tomatoMeter)
- && int.TryParse(result.tomatoMeter, NumberStyles.Integer, _usCulture, out tomatoMeter)
- && tomatoMeter >= 0)
+ if (tomatoScore.HasValue)
{
- item.CriticRating = tomatoMeter;
- }
-
- if (!string.IsNullOrEmpty(result.tomatoConsensus)
- && !string.Equals(result.tomatoConsensus, "No consensus yet.", StringComparison.OrdinalIgnoreCase))
- {
- item.CriticRatingSummary = WebUtility.HtmlDecode(result.tomatoConsensus);
+ item.CriticRating = tomatoScore;
}
int voteCount;
@@ -169,21 +157,11 @@ namespace MediaBrowser.Providers.Omdb
item.ProductionYear = year;
}
- // Seeing some bogus RT data on omdb for series, so filter it out here
- // RT doesn't even have tv series
- int tomatoMeter;
+ var tomatoScore = result.GetRottenTomatoScore();
- if (!string.IsNullOrEmpty(result.tomatoMeter)
- && int.TryParse(result.tomatoMeter, NumberStyles.Integer, _usCulture, out tomatoMeter)
- && tomatoMeter >= 0)
+ if (tomatoScore.HasValue)
{
- item.CriticRating = tomatoMeter;
- }
-
- if (!string.IsNullOrEmpty(result.tomatoConsensus)
- && !string.Equals(result.tomatoConsensus, "No consensus yet.", StringComparison.OrdinalIgnoreCase))
- {
- item.CriticRatingSummary = WebUtility.HtmlDecode(result.tomatoConsensus);
+ item.CriticRating = tomatoScore;
}
int voteCount;
@@ -486,39 +464,51 @@ namespace MediaBrowser.Providers.Omdb
public string Year { get; set; }
public string Rated { get; set; }
public string Released { get; set; }
- public int Episode { get; set; }
public string Runtime { get; set; }
public string Genre { get; set; }
public string Director { get; set; }
public string Writer { get; set; }
public string Actors { get; set; }
public string Plot { get; set; }
+ public string Language { get; set; }
+ public string Country { get; set; }
+ public string Awards { get; set; }
public string Poster { get; set; }
+ public List Ratings { get; set; }
+ public string Metascore { get; set; }
public string imdbRating { get; set; }
public string imdbVotes { get; set; }
public string imdbID { get; set; }
public string Type { get; set; }
- public string tomatoMeter { get; set; }
- public string tomatoImage { get; set; }
- public string tomatoRating { get; set; }
- public string tomatoReviews { get; set; }
- public string tomatoFresh { get; set; }
- public string tomatoRotten { get; set; }
- public string tomatoConsensus { get; set; }
- public string tomatoUserMeter { get; set; }
- public string tomatoUserRating { get; set; }
- public string tomatoUserReviews { get; set; }
public string DVD { get; set; }
public string BoxOffice { get; set; }
public string Production { get; set; }
public string Website { get; set; }
public string Response { get; set; }
+ public int Episode { get; set; }
- public string Language { get; set; }
- public string Country { get; set; }
- public string Awards { get; set; }
- public string Metascore { get; set; }
+ public float? GetRottenTomatoScore()
+ {
+ if (Ratings != null)
+ {
+ var rating = Ratings.FirstOrDefault(i => string.Equals(i.Source, "Rotten Tomatoes", StringComparison.OrdinalIgnoreCase));
+ if (rating != null && rating.Value != null)
+ {
+ var value = rating.Value.TrimEnd('%');
+ float score;
+ if (float.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out score))
+ {
+ return score;
+ }
+ }
+ }
+ return null;
+ }
+ }
+ public class OmdbRating
+ {
+ public string Source { get; set; }
+ public string Value { get; set; }
}
-
}
}
diff --git a/MediaBrowser.XbmcMetadata/Providers/BaseNfoProvider.cs b/MediaBrowser.XbmcMetadata/Providers/BaseNfoProvider.cs
index 7e37d61df4..e5931cf25a 100644
--- a/MediaBrowser.XbmcMetadata/Providers/BaseNfoProvider.cs
+++ b/MediaBrowser.XbmcMetadata/Providers/BaseNfoProvider.cs
@@ -78,9 +78,4 @@ namespace MediaBrowser.XbmcMetadata.Providers
}
}
}
-
- static class XmlProviderUtils
- {
- internal static readonly SemaphoreSlim XmlParsingResourcePool = new SemaphoreSlim(4, 4);
- }
}
diff --git a/SharedVersion.cs b/SharedVersion.cs
index 824730e421..68c72b079f 100644
--- a/SharedVersion.cs
+++ b/SharedVersion.cs
@@ -1,3 +1,3 @@
using System.Reflection;
-[assembly: AssemblyVersion("3.2.12.3")]
+[assembly: AssemblyVersion("3.2.12.4")]