Skip to content

Commit

Permalink
Fixed #23
Browse files Browse the repository at this point in the history
BaseFolderName was not passed correctly to GetTags
  • Loading branch information
midwan committed Feb 28, 2017
1 parent 8a44231 commit 58489eb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions MB_SubSonic/Subsonic.cs
Expand Up @@ -1068,6 +1068,7 @@ public static bool FileExists(string url)
{
var folderId = GetFolderId(url);
if (folderId == null) return null;
var baseFolderName = url.Substring(0, url.IndexOf(@"\", StringComparison.Ordinal));

var request = new RestRequest
{
Expand All @@ -1092,7 +1093,7 @@ public static bool FileExists(string url)
if (content?.child != null)
foreach (var childEntry in content.child)
if (childEntry.path == filePath)
return GetTags(childEntry, childEntry.path);
return GetTags(childEntry, baseFolderName);
}
else
{
Expand All @@ -1110,7 +1111,7 @@ public static bool FileExists(string url)
if (content?.child != null)
foreach (var childEntry in content.child)
if (childEntry.path == filePath)
return GetTags(childEntry, childEntry.path);
return GetTags(childEntry, baseFolderName);
}

return null;
Expand Down

0 comments on commit 58489eb

Please sign in to comment.