diff options
| author | Luke <luke.pulverenti@gmail.com> | 2016-02-12 20:57:41 -0500 |
|---|---|---|
| committer | Luke <luke.pulverenti@gmail.com> | 2016-02-12 20:57:41 -0500 |
| commit | 548f4ae87e17eefa080ab74fb7a7009eab8a2f16 (patch) | |
| tree | 32a818d1fffb12018df098d9a570298285dc4102 /MediaBrowser.Server.Implementations/FileOrganization | |
| parent | 98fbb0867457204da054dda14f2294ea59f30f8b (diff) | |
| parent | 4f5a659111b1e3953ea8618d1b8d16a2c7e3f081 (diff) | |
Merge pull request #1448 from MediaBrowser/dev
Dev
Diffstat (limited to 'MediaBrowser.Server.Implementations/FileOrganization')
| -rw-r--r-- | MediaBrowser.Server.Implementations/FileOrganization/EpisodeFileOrganizer.cs | 9 | ||||
| -rw-r--r-- | MediaBrowser.Server.Implementations/FileOrganization/FileOrganizationService.cs | 10 |
2 files changed, 8 insertions, 11 deletions
diff --git a/MediaBrowser.Server.Implementations/FileOrganization/EpisodeFileOrganizer.cs b/MediaBrowser.Server.Implementations/FileOrganization/EpisodeFileOrganizer.cs index 6509b016a..9d43dabcd 100644 --- a/MediaBrowser.Server.Implementations/FileOrganization/EpisodeFileOrganizer.cs +++ b/MediaBrowser.Server.Implementations/FileOrganization/EpisodeFileOrganizer.cs @@ -301,15 +301,14 @@ namespace MediaBrowser.Server.Implementations.FileOrganization private void SaveSmartMatchString(string matchString, Series series, AutoOrganizeOptions options) { - var seriesIdString = series.Id.ToString("N"); - SmartMatchInfo info = options.SmartMatchInfos.FirstOrDefault(i => string.Equals(i.Id, seriesIdString)); + SmartMatchInfo info = options.SmartMatchInfos.FirstOrDefault(i => string.Equals(i.ItemName, series.Name, StringComparison.OrdinalIgnoreCase)); if (info == null) { info = new SmartMatchInfo(); - info.Id = series.Id.ToString("N"); + info.ItemName = series.Name; info.OrganizerType = FileOrganizerType.Episode; - info.Name = series.Name; + info.DisplayName = series.Name; var list = options.SmartMatchInfos.ToList(); list.Add(info); options.SmartMatchInfos = list.ToArray(); @@ -499,7 +498,7 @@ namespace MediaBrowser.Server.Implementations.FileOrganization series = _libraryManager.RootFolder .GetRecursiveChildren(i => i is Series) .Cast<Series>() - .FirstOrDefault(i => string.Equals(i.Id.ToString("N"), info.Id)); + .FirstOrDefault(i => string.Equals(i.Name, info.ItemName, StringComparison.OrdinalIgnoreCase)); } } diff --git a/MediaBrowser.Server.Implementations/FileOrganization/FileOrganizationService.cs b/MediaBrowser.Server.Implementations/FileOrganization/FileOrganizationService.cs index ce388bd8e..cf1387b0e 100644 --- a/MediaBrowser.Server.Implementations/FileOrganization/FileOrganizationService.cs +++ b/MediaBrowser.Server.Implementations/FileOrganization/FileOrganizationService.cs @@ -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 (!Guid.TryParse(IdString, out Id)) + if (string.IsNullOrEmpty(itemName)) { - throw new ArgumentNullException("Id"); + throw new ArgumentNullException("itemName"); } if (string.IsNullOrEmpty(matchString)) @@ -165,7 +163,7 @@ namespace MediaBrowser.Server.Implementations.FileOrganization 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)) { |
