aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Api')
-rw-r--r--MediaBrowser.Api/Playback/BaseStreamingService.cs15
-rw-r--r--MediaBrowser.Api/Reports/ReportsService.cs6
-rw-r--r--MediaBrowser.Api/UserLibrary/ItemsService.cs6
3 files changed, 18 insertions, 9 deletions
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs
index 9278de3be3..45f1a64c9b 100644
--- a/MediaBrowser.Api/Playback/BaseStreamingService.cs
+++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs
@@ -288,9 +288,9 @@ namespace MediaBrowser.Api.Playback
{
if (string.Equals(ApiEntryPoint.Instance.GetEncodingOptions().HardwareAccelerationType, "qsv", StringComparison.OrdinalIgnoreCase))
{
-
- return "h264_qsv";
-
+
+ return "h264_qsv";
+
}
return "libx264";
@@ -1804,6 +1804,15 @@ namespace MediaBrowser.Api.Playback
}
}
+ if (string.Equals("h264", videoStream.Codec, StringComparison.OrdinalIgnoreCase))
+ {
+ if (videoStream.IsAVC.HasValue && !videoStream.IsAVC.Value)
+ {
+ Logger.Debug("Cannot stream copy video. Stream is marked as not AVC");
+ return false;
+ }
+ }
+
// Source and target codecs must match
if (!string.Equals(request.VideoCodec, videoStream.Codec, StringComparison.OrdinalIgnoreCase))
{
diff --git a/MediaBrowser.Api/Reports/ReportsService.cs b/MediaBrowser.Api/Reports/ReportsService.cs
index c3af09cd56..cb16158268 100644
--- a/MediaBrowser.Api/Reports/ReportsService.cs
+++ b/MediaBrowser.Api/Reports/ReportsService.cs
@@ -326,15 +326,15 @@ namespace MediaBrowser.Api.Reports
}
// Min official rating
- if (!string.IsNullOrEmpty(request.MinOfficialRating))
+ if (!string.IsNullOrWhiteSpace(request.MinOfficialRating))
{
query.MinParentalRating = _localization.GetRatingLevel(request.MinOfficialRating);
}
// Max official rating
- if (!string.IsNullOrEmpty(request.MaxOfficialRating))
+ if (!string.IsNullOrWhiteSpace(request.MaxOfficialRating))
{
- query.MaxParentalRating = _localization.GetRatingLevel(request.MinOfficialRating);
+ query.MaxParentalRating = _localization.GetRatingLevel(request.MaxOfficialRating);
}
// Artists
diff --git a/MediaBrowser.Api/UserLibrary/ItemsService.cs b/MediaBrowser.Api/UserLibrary/ItemsService.cs
index cfdc40bb2d..7d2029cabe 100644
--- a/MediaBrowser.Api/UserLibrary/ItemsService.cs
+++ b/MediaBrowser.Api/UserLibrary/ItemsService.cs
@@ -308,15 +308,15 @@ namespace MediaBrowser.Api.UserLibrary
}
// Min official rating
- if (!string.IsNullOrEmpty(request.MinOfficialRating))
+ if (!string.IsNullOrWhiteSpace(request.MinOfficialRating))
{
query.MinParentalRating = _localization.GetRatingLevel(request.MinOfficialRating);
}
// Max official rating
- if (!string.IsNullOrEmpty(request.MaxOfficialRating))
+ if (!string.IsNullOrWhiteSpace(request.MaxOfficialRating))
{
- query.MaxParentalRating = _localization.GetRatingLevel(request.MinOfficialRating);
+ query.MaxParentalRating = _localization.GetRatingLevel(request.MaxOfficialRating);
}
// Artists