mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-24 11:06:56 +00:00
enable user device access
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user