enable user device access

This commit is contained in:
Luke Pulverenti
2014-12-29 15:18:48 -05:00
parent 800a16a213
commit 8a9f16ff6a
26 changed files with 223 additions and 100 deletions

View File

@@ -73,10 +73,18 @@ namespace MediaBrowser.Model.Net
{".m4v", "video/x-m4v"}
};
private static readonly Dictionary<string, string> ExtensionLookup =
MimeTypeLookup
.GroupBy(i => i.Value)
.ToDictionary(x => x.Key, x => x.First().Key, StringComparer.OrdinalIgnoreCase);
private static readonly Dictionary<string, string> ExtensionLookup = CreateExtensionLookup();
private static Dictionary<string, string> CreateExtensionLookup()
{
var dict = MimeTypeLookup
.GroupBy(i => i.Value)
.ToDictionary(x => x.Key, x => x.First().Key, StringComparer.OrdinalIgnoreCase);
dict["image/jpg"] = ".jpg";
return dict;
}
/// <summary>
/// Gets the type of the MIME.

View File

@@ -49,6 +49,9 @@ namespace MediaBrowser.Model.Users
/// <value><c>true</c> if [enable synchronize]; otherwise, <c>false</c>.</value>
public bool EnableSync { get; set; }
public string[] EnabledDevices { get; set; }
public bool EnableAllDevices { get; set; }
public UserPolicy()
{
EnableLiveTvManagement = true;
@@ -64,6 +67,9 @@ namespace MediaBrowser.Model.Users
EnableUserPreferenceAccess = true;
AccessSchedules = new AccessSchedule[] { };
EnabledDevices = new string[] { };
EnableAllDevices = true;
}
}
}