aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Providers
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-06-30 13:40:46 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-06-30 13:40:46 -0400
commit8ae316a2f3333106921e7bc587bc990a8899c613 (patch)
treebe4e6947b504ffdcc64bcafd63a476b125f05e36 /MediaBrowser.Providers
parentf526a07edd13866644dbbee05a6caec85c3e10e1 (diff)
fixes #859 - Support adaptive bitrate streaming
Diffstat (limited to 'MediaBrowser.Providers')
-rw-r--r--MediaBrowser.Providers/MediaInfo/AudioImageProvider.cs28
-rw-r--r--MediaBrowser.Providers/MediaInfo/FFProbeAudioInfo.cs2
2 files changed, 3 insertions, 27 deletions
diff --git a/MediaBrowser.Providers/MediaInfo/AudioImageProvider.cs b/MediaBrowser.Providers/MediaInfo/AudioImageProvider.cs
index b2ca97f55..9188a2281 100644
--- a/MediaBrowser.Providers/MediaInfo/AudioImageProvider.cs
+++ b/MediaBrowser.Providers/MediaInfo/AudioImageProvider.cs
@@ -6,7 +6,6 @@ using MediaBrowser.Controller.Entities.Audio;
using MediaBrowser.Controller.MediaEncoding;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Entities;
-using MediaBrowser.Model.IO;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
@@ -24,40 +23,17 @@ namespace MediaBrowser.Providers.MediaInfo
{
private readonly ConcurrentDictionary<string, SemaphoreSlim> _locks = new ConcurrentDictionary<string, SemaphoreSlim>();
- private readonly IIsoManager _isoManager;
private readonly IMediaEncoder _mediaEncoder;
private readonly IServerConfigurationManager _config;
private readonly IFileSystem _fileSystem;
- public AudioImageProvider(IIsoManager isoManager, IMediaEncoder mediaEncoder, IServerConfigurationManager config, IFileSystem fileSystem)
+ public AudioImageProvider(IMediaEncoder mediaEncoder, IServerConfigurationManager config, IFileSystem fileSystem)
{
- _isoManager = isoManager;
_mediaEncoder = mediaEncoder;
_config = config;
_fileSystem = fileSystem;
}
- /// <summary>
- /// The null mount task result
- /// </summary>
- protected readonly Task<IIsoMount> NullMountTaskResult = Task.FromResult<IIsoMount>(null);
-
- /// <summary>
- /// Mounts the iso if needed.
- /// </summary>
- /// <param name="item">The item.</param>
- /// <param name="cancellationToken">The cancellation token.</param>
- /// <returns>Task{IIsoMount}.</returns>
- protected Task<IIsoMount> MountIsoIfNeeded(Video item, CancellationToken cancellationToken)
- {
- if (item.VideoType == VideoType.Iso)
- {
- return _isoManager.Mount(item.Path, cancellationToken);
- }
-
- return NullMountTaskResult;
- }
-
public IEnumerable<ImageType> GetSupportedImages(IHasImages item)
{
return new List<ImageType> { ImageType.Primary };
@@ -156,7 +132,7 @@ namespace MediaBrowser.Providers.MediaInfo
public bool Supports(IHasImages item)
{
- return item.LocationType == LocationType.FileSystem && item is Audio;
+ return item is Audio;
}
public bool HasChanged(IHasMetadata item, IDirectoryService directoryService, DateTime date)
diff --git a/MediaBrowser.Providers/MediaInfo/FFProbeAudioInfo.cs b/MediaBrowser.Providers/MediaInfo/FFProbeAudioInfo.cs
index 0f2ed1642..a856d5dba 100644
--- a/MediaBrowser.Providers/MediaInfo/FFProbeAudioInfo.cs
+++ b/MediaBrowser.Providers/MediaInfo/FFProbeAudioInfo.cs
@@ -98,7 +98,7 @@ namespace MediaBrowser.Providers.MediaInfo
audio.FormatName = mediaInfo.Format;
audio.TotalBitrate = mediaInfo.TotalBitrate;
- audio.HasEmbeddedImage = mediaStreams.Any(i => i.Type == MediaStreamType.Video);
+ audio.HasEmbeddedImage = mediaStreams.Any(i => i.Type == MediaStreamType.EmbeddedImage);
if (data.streams != null)
{