add additional view settings

This commit is contained in:
Luke Pulverenti
2014-07-01 00:06:28 -04:00
parent f77209cf77
commit 43943657b7
13 changed files with 114 additions and 40 deletions

View File

@@ -1,6 +1,4 @@
using System;
using System.Linq;
using MediaBrowser.Model.Extensions;
using MediaBrowser.Model.Extensions;
namespace MediaBrowser.Model.Configuration
{
@@ -90,7 +88,7 @@ namespace MediaBrowser.Model.Configuration
NotificationOption opt = GetOptions(notificationType);
return opt == null ||
!opt.DisabledServices.Contains(service, StringComparer.OrdinalIgnoreCase);
!ListHelper.ContainsIgnoreCase(opt.DisabledServices, service);
}
public bool IsEnabledToMonitorUser(string type, string userId)
@@ -98,7 +96,7 @@ namespace MediaBrowser.Model.Configuration
NotificationOption opt = GetOptions(type);
return opt != null && opt.Enabled &&
!opt.DisabledMonitorUsers.Contains(userId, StringComparer.OrdinalIgnoreCase);
!ListHelper.ContainsIgnoreCase(opt.DisabledMonitorUsers, userId);
}
public bool IsEnabledToSendToUser(string type, string userId, UserConfiguration userConfig)
@@ -117,7 +115,7 @@ namespace MediaBrowser.Model.Configuration
return true;
}
return opt.SendToUsers.Contains(userId, StringComparer.OrdinalIgnoreCase);
return ListHelper.ContainsIgnoreCase(opt.SendToUsers, userId);
}
return false;

View File

@@ -72,6 +72,7 @@ namespace MediaBrowser.Model.Configuration
public UnratedItem[] BlockUnratedItems { get; set; }
public SubtitlePlaybackMode SubtitleMode { get; set; }
public bool DisplayCollectionsView { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="UserConfiguration" /> class.
@@ -92,6 +93,8 @@ namespace MediaBrowser.Model.Configuration
BlockUnratedItems = new UnratedItem[] { };
ExcludeFoldersFromGrouping = new string[] { };
DisplayCollectionsView = true;
}
}
}