Merge pull request #1448 from MediaBrowser/dev

Dev
This commit is contained in:
Luke 2016-02-12 20:57:41 -05:00
commit 548f4ae87e
6 changed files with 15 additions and 18 deletions

View File

@ -3,11 +3,11 @@ namespace MediaBrowser.Common.Implementations.Security
{ {
public class MbAdmin public class MbAdmin
{ {
public const string HttpUrl = "https://www.mb3admin.com/admin/"; public const string HttpUrl = "http://www.mb3admin.com/admin/";
/// <summary> /// <summary>
/// Leaving as http for now until we get it squared away /// Leaving as http for now until we get it squared away
/// </summary> /// </summary>
public const string HttpsUrl = "https://www.mb3admin.com/admin/"; public const string HttpsUrl = "http://www.mb3admin.com/admin/";
} }
} }

View File

@ -21,7 +21,7 @@ namespace MediaBrowser.Common.Implementations.Security
public class PluginSecurityManager : ISecurityManager public class PluginSecurityManager : ISecurityManager
{ {
private const string MBValidateUrl = MbAdmin.HttpsUrl + "service/registration/validate"; private const string MBValidateUrl = MbAdmin.HttpsUrl + "service/registration/validate";
private const string AppstoreRegUrl = /*MbAdmin.HttpsUrl*/ "https://mb3admin.com/admin/service/appstore/register"; private const string AppstoreRegUrl = /*MbAdmin.HttpsUrl*/ "http://mb3admin.com/admin/service/appstore/register";
/// <summary> /// <summary>
/// The _is MB supporter /// The _is MB supporter

View File

@ -78,8 +78,8 @@ namespace MediaBrowser.Controller.FileOrganization
/// <summary> /// <summary>
/// Deletes a smart match entry. /// Deletes a smart match entry.
/// </summary> /// </summary>
/// <param name="Id">Item Id.</param> /// <param name="ItemName">Item name.</param>
/// <param name="matchString">The match string to delete.</param> /// <param name="matchString">The match string to delete.</param>
void DeleteSmartMatchEntry(string Id, string matchString); void DeleteSmartMatchEntry(string ItemName, string matchString);
} }
} }

View File

@ -3,8 +3,8 @@ namespace MediaBrowser.Model.FileOrganization
{ {
public class SmartMatchInfo public class SmartMatchInfo
{ {
public string Id { get; set; } public string ItemName { get; set; }
public string Name { get; set; } public string DisplayName { get; set; }
public FileOrganizerType OrganizerType { get; set; } public FileOrganizerType OrganizerType { get; set; }
public string[] MatchStrings { get; set; } public string[] MatchStrings { get; set; }

View File

@ -301,15 +301,14 @@ namespace MediaBrowser.Server.Implementations.FileOrganization
private void SaveSmartMatchString(string matchString, Series series, AutoOrganizeOptions options) private void SaveSmartMatchString(string matchString, Series series, AutoOrganizeOptions options)
{ {
var seriesIdString = series.Id.ToString("N"); SmartMatchInfo info = options.SmartMatchInfos.FirstOrDefault(i => string.Equals(i.ItemName, series.Name, StringComparison.OrdinalIgnoreCase));
SmartMatchInfo info = options.SmartMatchInfos.FirstOrDefault(i => string.Equals(i.Id, seriesIdString));
if (info == null) if (info == null)
{ {
info = new SmartMatchInfo(); info = new SmartMatchInfo();
info.Id = series.Id.ToString("N"); info.ItemName = series.Name;
info.OrganizerType = FileOrganizerType.Episode; info.OrganizerType = FileOrganizerType.Episode;
info.Name = series.Name; info.DisplayName = series.Name;
var list = options.SmartMatchInfos.ToList(); var list = options.SmartMatchInfos.ToList();
list.Add(info); list.Add(info);
options.SmartMatchInfos = list.ToArray(); options.SmartMatchInfos = list.ToArray();
@ -499,7 +498,7 @@ namespace MediaBrowser.Server.Implementations.FileOrganization
series = _libraryManager.RootFolder series = _libraryManager.RootFolder
.GetRecursiveChildren(i => i is Series) .GetRecursiveChildren(i => i is Series)
.Cast<Series>() .Cast<Series>()
.FirstOrDefault(i => string.Equals(i.Id.ToString("N"), info.Id)); .FirstOrDefault(i => string.Equals(i.Name, info.ItemName, StringComparison.OrdinalIgnoreCase));
} }
} }

View File

@ -149,13 +149,11 @@ namespace MediaBrowser.Server.Implementations.FileOrganization
}; };
} }
public void DeleteSmartMatchEntry(string IdString, string matchString) public void DeleteSmartMatchEntry(string itemName, string matchString)
{ {
Guid Id; if (string.IsNullOrEmpty(itemName))
if (!Guid.TryParse(IdString, out Id))
{ {
throw new ArgumentNullException("Id"); throw new ArgumentNullException("itemName");
} }
if (string.IsNullOrEmpty(matchString)) if (string.IsNullOrEmpty(matchString))
@ -165,7 +163,7 @@ namespace MediaBrowser.Server.Implementations.FileOrganization
var options = GetAutoOrganizeptions(); var options = GetAutoOrganizeptions();
SmartMatchInfo info = options.SmartMatchInfos.FirstOrDefault(i => string.Equals(i.Id, IdString)); SmartMatchInfo info = options.SmartMatchInfos.FirstOrDefault(i => string.Equals(i.ItemName, itemName));
if (info != null && info.MatchStrings.Contains(matchString)) if (info != null && info.MatchStrings.Contains(matchString))
{ {