diff options
| author | Eric Reed <ebr@mediabrowser3.com> | 2013-12-04 15:07:56 -0500 |
|---|---|---|
| committer | Eric Reed <ebr@mediabrowser3.com> | 2013-12-04 15:07:56 -0500 |
| commit | 6819be81601f6a95a60ce2735474ae0015d19bff (patch) | |
| tree | 7e2743455e53d4a028fae789f2fc74a7c5ae87b9 /MediaBrowser.Server.Implementations/Library/Resolvers | |
| parent | 190be6311fbdf3a73f9c8e330f44edafe7764284 (diff) | |
| parent | cb882a4b48e9cf03cd363c54d93338ad62153e7e (diff) | |
Merge branch 'master' of https://github.com/MediaBrowser/MediaBrowser
Diffstat (limited to 'MediaBrowser.Server.Implementations/Library/Resolvers')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs | 15 | ||||
| -rw-r--r-- | MediaBrowser.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.cs | 9 |
2 files changed, 9 insertions, 15 deletions
diff --git a/MediaBrowser.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs b/MediaBrowser.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs index 0f87b9d33..03e29dd38 100644 --- a/MediaBrowser.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs +++ b/MediaBrowser.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs @@ -172,7 +172,7 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.Movies private void SetProviderIdFromPath(Video item) { //we need to only look at the name of this actual item (not parents) - var justName = Path.GetFileName(item.Path); + var justName = item.IsInMixedFolder ? Path.GetFileName(item.Path) : Path.GetFileName(Path.GetDirectoryName(item.Path)); var id = justName.GetAttributeValue("tmdbid"); @@ -345,26 +345,17 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.Movies /// <returns><c>true</c> if [is DVD directory] [the specified directory name]; otherwise, <c>false</c>.</returns> private bool IsDvdDirectory(string directoryName) { - return directoryName.Equals("video_ts", StringComparison.OrdinalIgnoreCase); + return string.Equals(directoryName, "video_ts", StringComparison.OrdinalIgnoreCase); } /// <summary> - /// Determines whether [is hd DVD directory] [the specified directory name]. - /// </summary> - /// <param name="directoryName">Name of the directory.</param> - /// <returns><c>true</c> if [is hd DVD directory] [the specified directory name]; otherwise, <c>false</c>.</returns> - private bool IsHdDvdDirectory(string directoryName) - { - return directoryName.Equals("hvdvd_ts", StringComparison.OrdinalIgnoreCase); - } - /// <summary> /// Determines whether [is blu ray directory] [the specified directory name]. /// </summary> /// <param name="directoryName">Name of the directory.</param> /// <returns><c>true</c> if [is blu ray directory] [the specified directory name]; otherwise, <c>false</c>.</returns> private bool IsBluRayDirectory(string directoryName) { - return directoryName.Equals("bdmv", StringComparison.OrdinalIgnoreCase); + return string.Equals(directoryName, "bdmv", StringComparison.OrdinalIgnoreCase); } } } diff --git a/MediaBrowser.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.cs b/MediaBrowser.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.cs index 0a6a72fc1..693594a20 100644 --- a/MediaBrowser.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.cs +++ b/MediaBrowser.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.cs @@ -20,7 +20,7 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.TV var season = args.Parent as Season; // If the parent is a Season or Series, then this is an Episode if the VideoResolver returns something - if (season != null) + if (season != null || args.Parent is Series) { Episode episode = null; @@ -51,8 +51,11 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.TV if (episode != null) { - episode.ParentIndexNumber = season.IndexNumber; - + if (season != null) + { + episode.ParentIndexNumber = season.IndexNumber; + } + if (episode.ParentIndexNumber == null) { episode.ParentIndexNumber = TVUtils.GetSeasonNumberFromEpisodeFile(args.Path); |
