mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-03 22:38:30 +01:00
dlna fixes
This commit is contained in:
@@ -12,7 +12,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
DisplayMediaType = "CollectionFolder";
|
||||
}
|
||||
|
||||
public string CollectionType
|
||||
public virtual string CollectionType
|
||||
{
|
||||
get { return Model.Entities.CollectionType.BoxSets; }
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ using MediaBrowser.Controller.Providers;
|
||||
using MediaBrowser.Model.Configuration;
|
||||
using MediaBrowser.Model.Serialization;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Threading;
|
||||
@@ -221,23 +220,12 @@ namespace MediaBrowser.Controller.Entities
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Saves the current configuration to the file system
|
||||
/// </summary>
|
||||
public void SaveConfiguration()
|
||||
{
|
||||
var xmlPath = ConfigurationFilePath;
|
||||
Directory.CreateDirectory(System.IO.Path.GetDirectoryName(xmlPath));
|
||||
XmlSerializer.SerializeToFile(Configuration, xmlPath);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates the configuration.
|
||||
/// </summary>
|
||||
/// <param name="config">The config.</param>
|
||||
/// <param name="serializer">The serializer.</param>
|
||||
/// <exception cref="System.ArgumentNullException">config</exception>
|
||||
public void UpdateConfiguration(UserConfiguration config, IXmlSerializer serializer)
|
||||
public void UpdateConfiguration(UserConfiguration config)
|
||||
{
|
||||
if (config == null)
|
||||
{
|
||||
@@ -245,7 +233,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
}
|
||||
|
||||
Configuration = config;
|
||||
SaveConfiguration();
|
||||
UserManager.UpdateConfiguration(this, Configuration);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Model.Configuration;
|
||||
using MediaBrowser.Model.Events;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -29,6 +30,14 @@ namespace MediaBrowser.Controller.Library
|
||||
event EventHandler<GenericEventArgs<User>> UserDeleted;
|
||||
|
||||
event EventHandler<GenericEventArgs<User>> UserCreated;
|
||||
event EventHandler<GenericEventArgs<User>> UserConfigurationUpdated;
|
||||
|
||||
/// <summary>
|
||||
/// Updates the configuration.
|
||||
/// </summary>
|
||||
/// <param name="user">The user.</param>
|
||||
/// <param name="newConfiguration">The new configuration.</param>
|
||||
void UpdateConfiguration(User user, UserConfiguration newConfiguration);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a User by Id
|
||||
|
||||
Reference in New Issue
Block a user