added IsMuted to playback progress

This commit is contained in:
Luke Pulverenti
2013-08-29 17:00:27 -04:00
parent 528292e496
commit 982a303940
17 changed files with 63 additions and 26 deletions

View File

@@ -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,

View File

@@ -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);
}

View File

@@ -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();
}
}
}

View File

@@ -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

View File

@@ -87,8 +87,14 @@ 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>