aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2017-04-29 02:23:26 -0400
committerGitHub <noreply@github.com>2017-04-29 02:23:26 -0400
commitbdfbc854f7db7200b30401027d31a45add23c93f (patch)
tree4651bb0b726c25ae7bbf2cfce1bea132068866b3 /MediaBrowser.Controller
parent25b25afbb837adcb0af723f63ad54f9be8fe7de7 (diff)
parent6b17dd9db457fc1064b6d2b63389de8da624620a (diff)
Merge pull request #2601 from MediaBrowser/dev
Dev
Diffstat (limited to 'MediaBrowser.Controller')
-rw-r--r--MediaBrowser.Controller/Entities/Audio/Audio.cs3
-rw-r--r--MediaBrowser.Controller/Entities/BaseItem.cs12
-rw-r--r--MediaBrowser.Controller/Entities/InternalItemsQuery.cs1
-rw-r--r--MediaBrowser.Controller/Entities/Video.cs53
-rw-r--r--MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs3
5 files changed, 29 insertions, 43 deletions
diff --git a/MediaBrowser.Controller/Entities/Audio/Audio.cs b/MediaBrowser.Controller/Entities/Audio/Audio.cs
index 59b5a38692..92d8d95bcf 100644
--- a/MediaBrowser.Controller/Entities/Audio/Audio.cs
+++ b/MediaBrowser.Controller/Entities/Audio/Audio.cs
@@ -9,7 +9,6 @@ using System.Globalization;
using System.Linq;
using System.Threading;
using MediaBrowser.Common.Extensions;
-using MediaBrowser.Controller.Channels;
using MediaBrowser.Model.Serialization;
namespace MediaBrowser.Controller.Entities.Audio
@@ -24,8 +23,6 @@ namespace MediaBrowser.Controller.Entities.Audio
IHasLookupInfo<SongInfo>,
IHasMediaSources
{
- public List<ChannelMediaInfo> ChannelMediaSources { get; set; }
-
/// <summary>
/// Gets or sets the artist.
/// </summary>
diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs
index c8ea4c506f..31b0783b2b 100644
--- a/MediaBrowser.Controller/Entities/BaseItem.cs
+++ b/MediaBrowser.Controller/Entities/BaseItem.cs
@@ -835,13 +835,6 @@ namespace MediaBrowser.Controller.Entities
public float? CriticRating { get; set; }
/// <summary>
- /// Gets or sets the critic rating summary.
- /// </summary>
- /// <value>The critic rating summary.</value>
- [IgnoreDataMember]
- public string CriticRatingSummary { get; set; }
-
- /// <summary>
/// Gets or sets the official rating description.
/// </summary>
/// <value>The official rating description.</value>
@@ -2298,11 +2291,6 @@ namespace MediaBrowser.Controller.Entities
ownedItem.CustomRating = item.CustomRating;
newOptions.ForceSave = true;
}
- if (!string.Equals(item.CriticRatingSummary, ownedItem.CriticRatingSummary, StringComparison.Ordinal))
- {
- ownedItem.CriticRatingSummary = item.CriticRatingSummary;
- newOptions.ForceSave = true;
- }
if (!string.Equals(item.OfficialRatingDescription, ownedItem.OfficialRatingDescription, StringComparison.Ordinal))
{
ownedItem.OfficialRatingDescription = item.OfficialRatingDescription;
diff --git a/MediaBrowser.Controller/Entities/InternalItemsQuery.cs b/MediaBrowser.Controller/Entities/InternalItemsQuery.cs
index ea4d60a446..fb7748e134 100644
--- a/MediaBrowser.Controller/Entities/InternalItemsQuery.cs
+++ b/MediaBrowser.Controller/Entities/InternalItemsQuery.cs
@@ -187,7 +187,6 @@ namespace MediaBrowser.Controller.Entities
case ItemFields.OriginalTitle:
case ItemFields.Tags:
case ItemFields.DateLastMediaAdded:
- case ItemFields.CriticRatingSummary:
return fields.Count == 0 || fields.Contains(name);
default:
return true;
diff --git a/MediaBrowser.Controller/Entities/Video.cs b/MediaBrowser.Controller/Entities/Video.cs
index 0618fc489e..98f325bdc7 100644
--- a/MediaBrowser.Controller/Entities/Video.cs
+++ b/MediaBrowser.Controller/Entities/Video.cs
@@ -33,7 +33,6 @@ namespace MediaBrowser.Controller.Entities
public List<string> AdditionalParts { get; set; }
public List<string> LocalAlternateVersions { get; set; }
public List<LinkedChild> LinkedAlternateVersions { get; set; }
- public List<ChannelMediaInfo> ChannelMediaSources { get; set; }
[IgnoreDataMember]
public override bool SupportsPlayedStatus
@@ -158,7 +157,6 @@ namespace MediaBrowser.Controller.Entities
PlayableStreamFileNames = new List<string>();
AdditionalParts = new List<string>();
LocalAlternateVersions = new List<string>();
- Tags = new List<string>();
SubtitleFiles = new List<string>();
LinkedAlternateVersions = new List<LinkedChild>();
}
@@ -591,41 +589,46 @@ namespace MediaBrowser.Controller.Entities
.ToList();
}
- private static MediaSourceInfo GetVersionInfo(bool enablePathSubstitution, Video i, MediaSourceType type)
+ private static MediaSourceInfo GetVersionInfo(bool enablePathSubstitution, Video media, MediaSourceType type)
{
- var mediaStreams = MediaSourceManager.GetMediaStreams(i.Id)
+ if (media == null)
+ {
+ throw new ArgumentNullException("media");
+ }
+
+ var mediaStreams = MediaSourceManager.GetMediaStreams(media.Id)
.ToList();
- var locationType = i.LocationType;
+ var locationType = media.LocationType;
var info = new MediaSourceInfo
{
- Id = i.Id.ToString("N"),
- IsoType = i.IsoType,
+ Id = media.Id.ToString("N"),
+ IsoType = media.IsoType,
Protocol = locationType == LocationType.Remote ? MediaProtocol.Http : MediaProtocol.File,
MediaStreams = mediaStreams,
- Name = GetMediaSourceName(i, mediaStreams),
- Path = enablePathSubstitution ? GetMappedPath(i, i.Path, locationType) : i.Path,
- RunTimeTicks = i.RunTimeTicks,
- Video3DFormat = i.Video3DFormat,
- VideoType = i.VideoType,
- Container = i.Container,
- Size = i.Size,
- Timestamp = i.Timestamp,
+ Name = GetMediaSourceName(media, mediaStreams),
+ Path = enablePathSubstitution ? GetMappedPath(media, media.Path, locationType) : media.Path,
+ RunTimeTicks = media.RunTimeTicks,
+ Video3DFormat = media.Video3DFormat,
+ VideoType = media.VideoType,
+ Container = media.Container,
+ Size = media.Size,
+ Timestamp = media.Timestamp,
Type = type,
- PlayableStreamFileNames = i.PlayableStreamFileNames.ToList(),
- SupportsDirectStream = i.VideoType == VideoType.VideoFile,
- IsRemote = i.IsShortcut
+ PlayableStreamFileNames = media.PlayableStreamFileNames.ToList(),
+ SupportsDirectStream = media.VideoType == VideoType.VideoFile,
+ IsRemote = media.IsShortcut
};
if (info.Protocol == MediaProtocol.File)
{
- info.ETag = i.DateModified.Ticks.ToString(CultureInfo.InvariantCulture).GetMD5().ToString("N");
+ info.ETag = media.DateModified.Ticks.ToString(CultureInfo.InvariantCulture).GetMD5().ToString("N");
}
- if (i.IsShortcut)
+ if (media.IsShortcut)
{
- info.Path = i.ShortcutPath;
+ info.Path = media.ShortcutPath;
if (info.Path.StartsWith("Http", StringComparison.OrdinalIgnoreCase))
{
@@ -647,16 +650,16 @@ namespace MediaBrowser.Controller.Entities
if (string.IsNullOrEmpty(info.Container))
{
- if (i.VideoType == VideoType.VideoFile || i.VideoType == VideoType.Iso)
+ if (media.VideoType == VideoType.VideoFile || media.VideoType == VideoType.Iso)
{
- if (!string.IsNullOrWhiteSpace(i.Path) && locationType != LocationType.Remote && locationType != LocationType.Virtual)
+ if (!string.IsNullOrWhiteSpace(media.Path) && locationType != LocationType.Remote && locationType != LocationType.Virtual)
{
- info.Container = System.IO.Path.GetExtension(i.Path).TrimStart('.');
+ info.Container = System.IO.Path.GetExtension(media.Path).TrimStart('.');
}
}
}
- info.Bitrate = i.TotalBitrate;
+ info.Bitrate = media.TotalBitrate;
info.InferTotalBitrate();
return info;
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
index 3824813f11..8821b6f1f2 100644
--- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
+++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
@@ -2011,12 +2011,11 @@ namespace MediaBrowser.Controller.MediaEncoding
var vn = string.Empty;
var hasArt = !string.IsNullOrWhiteSpace(state.AlbumCoverPath);
- hasArt = false;
if (hasArt)
{
albumCoverInput = " -i \"" + state.AlbumCoverPath + "\"";
- mapArgs = " -map 0:a -map 1:v -c:v copy";
+ mapArgs = " -map 0:a -map 1:v -c:1:v copy";
metadata = " -metadata:s:v title=\"Album cover\" -metadata:s:v comment=\"Cover(Front)\"";
}
else