aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-08-29 17:00:27 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-08-29 17:00:27 -0400
commit982a30394018a9262aae0fafc56c736635ba27ed (patch)
tree41e942f3df0b6cbae9a677bb3edbb4d43af40e9a /MediaBrowser.Controller
parent528292e496ef1cb6e226937f09774e57996d03db (diff)
added IsMuted to playback progress
Diffstat (limited to 'MediaBrowser.Controller')
-rw-r--r--MediaBrowser.Controller/Dto/SessionInfoDtoBuilder.cs1
-rw-r--r--MediaBrowser.Controller/Entities/BaseItem.cs2
-rw-r--r--MediaBrowser.Controller/Entities/Trailer.cs13
-rw-r--r--MediaBrowser.Controller/Session/ISessionManager.cs2
-rw-r--r--MediaBrowser.Controller/Session/SessionInfo.cs8
5 files changed, 23 insertions, 3 deletions
diff --git a/MediaBrowser.Controller/Dto/SessionInfoDtoBuilder.cs b/MediaBrowser.Controller/Dto/SessionInfoDtoBuilder.cs
index bd8eb41e3..01baa7356 100644
--- a/MediaBrowser.Controller/Dto/SessionInfoDtoBuilder.cs
+++ b/MediaBrowser.Controller/Dto/SessionInfoDtoBuilder.cs
@@ -25,6 +25,7 @@ namespace MediaBrowser.Controller.Dto
NowPlayingPositionTicks = session.NowPlayingPositionTicks,
SupportsRemoteControl = session.SupportsRemoteControl,
IsPaused = session.IsPaused,
+ IsMuted = session.IsMuted,
NowViewingContext = session.NowViewingContext,
NowViewingItemId = session.NowViewingItemId,
NowViewingItemName = session.NowViewingItemName,
diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs
index a75dc47e1..3c8c2411e 100644
--- a/MediaBrowser.Controller/Entities/BaseItem.cs
+++ b/MediaBrowser.Controller/Entities/BaseItem.cs
@@ -1211,7 +1211,7 @@ namespace MediaBrowser.Controller.Entities
else
{
// Check for dupes based on the combination of Name and Type
- if (!People.Any(p => p.Name.Equals(person.Name, StringComparison.OrdinalIgnoreCase) && p.Type.Equals(person.Type, StringComparison.OrdinalIgnoreCase)))
+ if (!People.Any(p => string.Equals(p.Name, person.Name, StringComparison.OrdinalIgnoreCase) && string.Equals(p.Type, person.Type, StringComparison.OrdinalIgnoreCase)))
{
People.Add(person);
}
diff --git a/MediaBrowser.Controller/Entities/Trailer.cs b/MediaBrowser.Controller/Entities/Trailer.cs
index ed20d05b0..044de3d6b 100644
--- a/MediaBrowser.Controller/Entities/Trailer.cs
+++ b/MediaBrowser.Controller/Entities/Trailer.cs
@@ -1,4 +1,5 @@
using System.Runtime.Serialization;
+using MediaBrowser.Model.Entities;
namespace MediaBrowser.Controller.Entities
{
@@ -47,5 +48,17 @@ namespace MediaBrowser.Controller.Entities
{
get { return !IsLocalTrailer; }
}
+
+ public override string GetUserDataKey()
+ {
+ var key = this.GetProviderId(MetadataProviders.Tmdb) ?? this.GetProviderId(MetadataProviders.Tvdb) ?? this.GetProviderId(MetadataProviders.Imdb) ?? this.GetProviderId(MetadataProviders.Tvcom);
+
+ if (!string.IsNullOrWhiteSpace(key))
+ {
+ return key + "-trailer";
+ }
+
+ return base.GetUserDataKey();
+ }
}
}
diff --git a/MediaBrowser.Controller/Session/ISessionManager.cs b/MediaBrowser.Controller/Session/ISessionManager.cs
index 2af2bbec9..1976c653a 100644
--- a/MediaBrowser.Controller/Session/ISessionManager.cs
+++ b/MediaBrowser.Controller/Session/ISessionManager.cs
@@ -62,7 +62,7 @@ namespace MediaBrowser.Controller.Session
/// <param name="sessionId">The session id.</param>
/// <returns>Task.</returns>
/// <exception cref="System.ArgumentNullException"></exception>
- Task OnPlaybackProgress(BaseItem item, long? positionTicks, bool isPaused, Guid sessionId);
+ Task OnPlaybackProgress(BaseItem item, long? positionTicks, bool isPaused, bool isMuted, Guid sessionId);
/// <summary>
/// Used to report that playback has ended for an item
diff --git a/MediaBrowser.Controller/Session/SessionInfo.cs b/MediaBrowser.Controller/Session/SessionInfo.cs
index 177573de6..6c0f1a085 100644
--- a/MediaBrowser.Controller/Session/SessionInfo.cs
+++ b/MediaBrowser.Controller/Session/SessionInfo.cs
@@ -87,9 +87,15 @@ namespace MediaBrowser.Controller.Session
/// Gets or sets a value indicating whether this instance is paused.
/// </summary>
/// <value><c>true</c> if this instance is paused; otherwise, <c>false</c>.</value>
- public bool? IsPaused { get; set; }
+ public bool IsPaused { get; set; }
/// <summary>
+ /// Gets or sets a value indicating whether this instance is muted.
+ /// </summary>
+ /// <value><c>true</c> if this instance is muted; otherwise, <c>false</c>.</value>
+ public bool IsMuted { get; set; }
+
+ /// <summary>
/// Gets or sets the device id.
/// </summary>
/// <value>The device id.</value>