aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Library/TVUtils.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-04-28 10:18:17 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-04-28 10:18:17 -0400
commit08e4f959a215911e98c5f90c36e407e7fd2b4ed6 (patch)
treeecba7ba960379aa173d4c70a2ec2365507e0f48f /MediaBrowser.Controller/Library/TVUtils.cs
parentf22c379a138fbf1f81be9ed4665c851f0d7b2382 (diff)
fixes #207 - Music Content Showing as TV Content (songs as episodes)
Diffstat (limited to 'MediaBrowser.Controller/Library/TVUtils.cs')
-rw-r--r--MediaBrowser.Controller/Library/TVUtils.cs10
1 files changed, 6 insertions, 4 deletions
diff --git a/MediaBrowser.Controller/Library/TVUtils.cs b/MediaBrowser.Controller/Library/TVUtils.cs
index 9181fe9e8..43aef88f1 100644
--- a/MediaBrowser.Controller/Library/TVUtils.cs
+++ b/MediaBrowser.Controller/Library/TVUtils.cs
@@ -144,9 +144,9 @@ namespace MediaBrowser.Controller.Library
/// </summary>
/// <param name="path">The path.</param>
/// <returns><c>true</c> if [is season folder] [the specified path]; otherwise, <c>false</c>.</returns>
- public static bool IsSeasonFolder(string path)
+ private static bool IsSeasonFolder(string path)
{
- return GetSeasonNumberFromPath(path) != null;
+ return GetSeasonNumberFromPath(path) != null && !new DirectoryInfo(path).EnumerateFiles().Any(i => EntityResolutionHelper.IsAudioFile(i.FullName));
}
/// <summary>
@@ -162,12 +162,14 @@ namespace MediaBrowser.Controller.Library
foreach (var child in fileSystemChildren)
{
- if (child.Attributes.HasFlag(FileAttributes.Hidden) || child.Attributes.HasFlag(FileAttributes.System))
+ var attributes = child.Attributes;
+
+ if (attributes.HasFlag(FileAttributes.Hidden) || attributes.HasFlag(FileAttributes.System))
{
continue;
}
- if (child.Attributes.HasFlag(FileAttributes.Directory))
+ if (attributes.HasFlag(FileAttributes.Directory))
{
if (IsSeasonFolder(child.FullName))
{