improve scan progress and fix a few bugs

This commit is contained in:
dkanada
2020-02-01 22:44:27 +09:00
parent ab2349ff3c
commit afe9ed977b
6 changed files with 30 additions and 33 deletions

View File

@@ -126,12 +126,6 @@ namespace MediaBrowser.Controller.Session
[JsonIgnore]
public ISessionController[] SessionControllers { get; set; }
/// <summary>
/// Gets or sets the application icon URL.
/// </summary>
/// <value>The application icon URL.</value>
public string AppIconUrl { get; set; }
/// <summary>
/// Gets or sets the supported commands.
/// </summary>
@@ -259,7 +253,7 @@ namespace MediaBrowser.Controller.Session
foreach (var additionalUser in AdditionalUsers)
{
if (userId.Equals(userId))
if (additionalUser.UserId.Equals(userId))
{
return true;
}
@@ -321,7 +315,7 @@ namespace MediaBrowser.Controller.Session
var newPositionTicks = positionTicks + ProgressIncrement;
var item = progressInfo.Item;
long? runtimeTicks = item == null ? null : item.RunTimeTicks;
long? runtimeTicks = item?.RunTimeTicks;
// Don't report beyond the runtime
if (runtimeTicks.HasValue && newPositionTicks >= runtimeTicks.Value)