-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
84 changed files
with
4,122 additions
and
773 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
namespace NfoMetadata.Configuration | ||
{ | ||
using MediaBrowser.Common.Configuration; | ||
|
||
public static class ConfigurationExtensions | ||
{ | ||
public static XbmcMetadataOptions GetNfoConfiguration(this IConfigurationManager manager) | ||
{ | ||
return manager.GetConfiguration<XbmcMetadataOptions>(ConfigurationFactory.ConfigurationKey); | ||
} | ||
|
||
public static void SaveNfoConfiguration(this IConfigurationManager manager, XbmcMetadataOptions xmlOptions) | ||
{ | ||
manager.SaveConfiguration(ConfigurationFactory.ConfigurationKey, xmlOptions); | ||
} | ||
|
||
public static void CopyTo(this XbmcMetadataOptions xmlOptions, NfoMetadataOptions options) | ||
{ | ||
options.EnablePathSubstitution = xmlOptions.EnablePathSubstitution; | ||
options.ReleaseDateFormat = xmlOptions.ReleaseDateFormat; | ||
options.UserId = xmlOptions.UserId; | ||
options.SaveImagePathsInNfo = xmlOptions.SaveImagePathsInNfo; | ||
} | ||
|
||
public static void CopyTo(this NfoMetadataOptions options, XbmcMetadataOptions xmlOptions) | ||
{ | ||
xmlOptions.EnablePathSubstitution = options.EnablePathSubstitution; | ||
xmlOptions.ReleaseDateFormat = options.ReleaseDateFormat; | ||
xmlOptions.UserId = options.UserId; | ||
xmlOptions.SaveImagePathsInNfo = options.SaveImagePathsInNfo; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
namespace NfoMetadata.Configuration | ||
{ | ||
using System.Collections.Generic; | ||
|
||
using MediaBrowser.Common.Configuration; | ||
|
||
public class ConfigurationFactory : IConfigurationFactory | ||
{ | ||
public const string ConfigurationKey = @"xbmcmetadata"; | ||
|
||
public IEnumerable<ConfigurationStore> GetConfigurations() | ||
{ | ||
return new[] | ||
{ | ||
new ConfigurationStore | ||
{ | ||
ConfigurationType = typeof(XbmcMetadataOptions), | ||
Key = ConfigurationKey | ||
} | ||
}; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
namespace NfoMetadata.Configuration | ||
{ | ||
using System.Collections.Generic; | ||
using System.ComponentModel; | ||
|
||
using Emby.Web.GenericEdit; | ||
using Emby.Web.GenericEdit.Common; | ||
|
||
using MediaBrowser.Model.Attributes; | ||
using MediaBrowser.Model.LocalizationAttributes; | ||
using NfoMetadata.Properties; | ||
|
||
public class NfoMetadataOptions : EditableOptionsBase | ||
{ | ||
public NfoMetadataOptions() | ||
{ | ||
this.DateFormatList = new List<EditorSelectOption> | ||
{ new EditorSelectOption("yyyy-MM-dd", "yyyy-MM-dd") }; | ||
|
||
this.UserList = new List<EditorSelectOption> | ||
{ new EditorSelectOption("", "") }; | ||
} | ||
|
||
/// <summary>Gets the editor title.</summary> | ||
/// <value>The editor title.</value> | ||
public override string EditorTitle => "Nfo Metadata Settings"; | ||
|
||
/// <summary>Gets the editor description.</summary> | ||
/// <value>The editor description.</value> | ||
public override string EditorDescription => Resources.HeaderKodiMetadataHelp; | ||
|
||
[Browsable(false)] | ||
public List<EditorSelectOption> DateFormatList { get; set; } | ||
|
||
[Browsable(false)] | ||
public List<EditorSelectOption> UserList { get; set; } | ||
|
||
[LocalizedDisplayName("LabelKodiMetadataUser", typeof(Resources))] | ||
[LocalizedDescription("LabelKodiMetadataUserHelp", typeof(Resources))] | ||
[SelectItemsSource(nameof(UserList))] | ||
public string UserId { get; set; } | ||
|
||
[LocalizedDisplayName("LabelKodiMetadataDateFormat", typeof(Resources))] | ||
[LocalizedDescription("LabelKodiMetadataDateFormatHelp", typeof(Resources))] | ||
[SelectItemsSource(nameof(DateFormatList))] | ||
public string ReleaseDateFormat { get; set; } = @"yyyy-MM-dd"; | ||
|
||
[LocalizedDisplayName("LabelKodiMetadataSaveImagePaths", typeof(Resources))] | ||
[LocalizedDescription("LabelKodiMetadataSaveImagePathsHelp", typeof(Resources))] | ||
public bool SaveImagePathsInNfo { get; set; } | ||
|
||
[LocalizedDisplayName("LabelKodiMetadataEnablePathSubstitution", typeof(Resources))] | ||
[LocalizedDescription("LabelKodiMetadataEnablePathSubstitutionHelp", typeof(Resources))] | ||
public bool EnablePathSubstitution { get; set; } = true; | ||
|
||
[LocalizedDisplayName("LabelKodiMetadataEnableExtraThumbs", typeof(Resources))] | ||
[LocalizedDescription("LabelKodiMetadataEnableExtraThumbsHelp", typeof(Resources))] | ||
public bool EnableExtraThumbs { get; set; } = true; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.