aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-04-08 00:17:18 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-04-08 00:17:18 -0400
commit2c6a9892f2082c6a288ba01033f3fd7d517fa92e (patch)
tree3a3e4bcbbcb20fc4c6fc326cc6452bb0957de938 /MediaBrowser.Api
parent63aea3d90836765ceb38f0b9b130970af9b132d9 (diff)
update translations
Diffstat (limited to 'MediaBrowser.Api')
-rw-r--r--MediaBrowser.Api/Playback/BaseStreamingService.cs11
-rw-r--r--MediaBrowser.Api/Playback/Progressive/VideoService.cs2
-rw-r--r--MediaBrowser.Api/VideosService.cs8
3 files changed, 12 insertions, 9 deletions
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs
index 612f731918..9787a7cd04 100644
--- a/MediaBrowser.Api/Playback/BaseStreamingService.cs
+++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs
@@ -319,7 +319,7 @@ namespace MediaBrowser.Api.Playback
{
var param = string.Empty;
- var isVc1 = state.VideoStream != null &&
+ var isVc1 = state.VideoStream != null &&
string.Equals(state.VideoStream.Codec, "vc1", StringComparison.OrdinalIgnoreCase);
var qualitySetting = GetQualitySetting();
@@ -438,9 +438,12 @@ namespace MediaBrowser.Api.Playback
var channels = GetNumAudioChannelsParam(state.Request, state.AudioStream);
// Boost volume to 200% when downsampling from 6ch to 2ch
- if (channels.HasValue && channels.Value <= 2 && state.AudioStream.Channels.HasValue && state.AudioStream.Channels.Value > 5)
+ if (channels.HasValue && channels.Value <= 2)
{
- volParam = ",volume=2.000000";
+ if (state.AudioStream != null && state.AudioStream.Channels.HasValue && state.AudioStream.Channels.Value > 5)
+ {
+ volParam = ",volume=2.000000";
+ }
}
if (state.Request.AudioSampleRate.HasValue)
@@ -1625,7 +1628,7 @@ namespace MediaBrowser.Api.Playback
return SupportsAutomaticVideoStreamCopy;
}
-
+
protected virtual bool SupportsAutomaticVideoStreamCopy
{
get
diff --git a/MediaBrowser.Api/Playback/Progressive/VideoService.cs b/MediaBrowser.Api/Playback/Progressive/VideoService.cs
index 855c036911..0d09854670 100644
--- a/MediaBrowser.Api/Playback/Progressive/VideoService.cs
+++ b/MediaBrowser.Api/Playback/Progressive/VideoService.cs
@@ -186,7 +186,7 @@ namespace MediaBrowser.Api.Playback.Progressive
private string GetAudioArguments(StreamState state)
{
// If the video doesn't have an audio stream, return a default.
- if (state.AudioStream == null)
+ if (state.AudioStream == null && state.HasMediaStreams)
{
return string.Empty;
}
diff --git a/MediaBrowser.Api/VideosService.cs b/MediaBrowser.Api/VideosService.cs
index 94432871c6..940c82540c 100644
--- a/MediaBrowser.Api/VideosService.cs
+++ b/MediaBrowser.Api/VideosService.cs
@@ -110,11 +110,11 @@ namespace MediaBrowser.Api
{
link.PrimaryVersionId = null;
- await link.UpdateToRepository(ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false);
+ await link.UpdateToRepository(ItemUpdateType.MetadataDownload, CancellationToken.None).ConfigureAwait(false);
}
video.LinkedAlternateVersions.Clear();
- await video.UpdateToRepository(ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false);
+ await video.UpdateToRepository(ItemUpdateType.MetadataDownload, CancellationToken.None).ConfigureAwait(false);
}
public void Post(MergeVersions request)
@@ -182,7 +182,7 @@ namespace MediaBrowser.Api
{
item.PrimaryVersionId = primaryVersion.Id;
- await item.UpdateToRepository(ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false);
+ await item.UpdateToRepository(ItemUpdateType.MetadataDownload, CancellationToken.None).ConfigureAwait(false);
primaryVersion.LinkedAlternateVersions.Add(new LinkedChild
{
@@ -191,7 +191,7 @@ namespace MediaBrowser.Api
});
}
- await primaryVersion.UpdateToRepository(ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false);
+ await primaryVersion.UpdateToRepository(ItemUpdateType.MetadataDownload, CancellationToken.None).ConfigureAwait(false);
}
}
}