diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-12-18 23:20:07 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-12-18 23:20:07 -0500 |
| commit | e55ab989d2077d70568965198139793ca7c116b4 (patch) | |
| tree | c7596f011b4e0e31029a3d2c27dcbd6d366facaf /MediaBrowser.Controller/Entities | |
| parent | e3484bdcc204ae39e0bfdf08e758012a048d539c (diff) | |
add more sync buttons
Diffstat (limited to 'MediaBrowser.Controller/Entities')
| -rw-r--r-- | MediaBrowser.Controller/Entities/BaseItem.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Entities/Movies/Movie.cs | 9 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Entities/TV/Episode.cs | 49 |
3 files changed, 13 insertions, 47 deletions
diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index ed950b1c5e..1d57c46e69 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -45,6 +45,8 @@ namespace MediaBrowser.Controller.Entities /// </summary> public static readonly string[] SupportedImageExtensions = { ".png", ".jpg", ".jpeg", ".tbn" }; + public static readonly List<string> SupportedImageExtensionsList = SupportedImageExtensions.ToList(); + /// <summary> /// The trailer folder name /// </summary> diff --git a/MediaBrowser.Controller/Entities/Movies/Movie.cs b/MediaBrowser.Controller/Entities/Movies/Movie.cs index e749d89e4f..30bf0fefc5 100644 --- a/MediaBrowser.Controller/Entities/Movies/Movie.cs +++ b/MediaBrowser.Controller/Entities/Movies/Movie.cs @@ -153,7 +153,14 @@ namespace MediaBrowser.Controller.Entities.Movies public MovieInfo GetLookupInfo() { - return GetItemLookupInfo<MovieInfo>(); + var info = GetItemLookupInfo<MovieInfo>(); + + if (!IsInMixedFolder) + { + info.Name = System.IO.Path.GetFileName(ContainingFolderPath); + } + + return info; } public override bool BeforeMetadataRefresh() diff --git a/MediaBrowser.Controller/Entities/TV/Episode.cs b/MediaBrowser.Controller/Entities/TV/Episode.cs index cc0fc6812c..e270bbdf30 100644 --- a/MediaBrowser.Controller/Entities/TV/Episode.cs +++ b/MediaBrowser.Controller/Entities/TV/Episode.cs @@ -1,5 +1,4 @@ -using MediaBrowser.Controller.Library; -using MediaBrowser.Controller.Providers; +using MediaBrowser.Controller.Providers; using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Entities; using System; @@ -301,51 +300,9 @@ namespace MediaBrowser.Controller.Entities.TV { var hasChanges = base.BeforeMetadataRefresh(); - var locationType = LocationType; - if (locationType == LocationType.FileSystem || locationType == LocationType.Offline) + if (LibraryManager.FillMissingEpisodeNumbersFromPath(this)) { - if (!IndexNumber.HasValue && !string.IsNullOrEmpty(Path)) - { - IndexNumber = LibraryManager.GetEpisodeNumberFromFile(Path, true); - - // If a change was made record it - if (IndexNumber.HasValue) - { - hasChanges = true; - } - } - - if (!IndexNumberEnd.HasValue && !string.IsNullOrEmpty(Path)) - { - IndexNumberEnd = LibraryManager.GetEndingEpisodeNumberFromFile(Path); - - // If a change was made record it - if (IndexNumberEnd.HasValue) - { - hasChanges = true; - } - } - } - - if (!ParentIndexNumber.HasValue) - { - var season = Season; - - if (season != null) - { - ParentIndexNumber = season.IndexNumber; - } - - if (!ParentIndexNumber.HasValue && !string.IsNullOrEmpty(Path)) - { - ParentIndexNumber = LibraryManager.GetSeasonNumberFromEpisodeFile(Path); - } - - // If a change was made record it - if (ParentIndexNumber.HasValue) - { - hasChanges = true; - } + hasChanges = true; } return hasChanges; |
