Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #1785 from Montellese/custom_nodes_location

custom library node cleanup
  • Loading branch information...
commit b7c3ce0f0409c13662b653b0e6234da7aa152405 2 parents 5ff18cb + 5ad6f11
@Montellese Montellese authored
View
2  xbmc/filesystem/LibraryDirectory.cpp
@@ -172,7 +172,7 @@ bool CLibraryDirectory::Exists(const char* strPath)
CStdString CLibraryDirectory::GetNode(const CStdString &path)
{
CURL url(path);
- CStdString libDir = URIUtils::AddFileToFolder(g_settings.GetDatabaseFolder(), url.GetHostName() + "/");
+ CStdString libDir = URIUtils::AddFileToFolder(g_settings.GetLibraryFolder(), url.GetHostName() + "/");
if (!CDirectory::Exists(libDir))
libDir = URIUtils::AddFileToFolder("special://xbmc/system/library/", url.GetHostName() + "/");
View
12 xbmc/settings/Settings.cpp
@@ -1746,6 +1746,17 @@ CStdString CSettings::GetBookmarksThumbFolder() const
return folder;
}
+CStdString CSettings::GetLibraryFolder() const
+{
+ CStdString folder;
+ if (GetCurrentProfile().hasDatabases())
+ URIUtils::AddFileToFolder(GetProfileUserDataFolder(), "library", folder);
+ else
+ URIUtils::AddFileToFolder(GetUserDataFolder(), "library", folder);
+
+ return folder;
+}
+
CStdString CSettings::GetSourcesFile() const
{
CStdString folder;
@@ -1844,6 +1855,7 @@ void CSettings::CreateProfileFolders()
}
CDirectory::Create("special://profile/addon_data");
CDirectory::Create("special://profile/keymaps");
+ CDirectory::Create(GetLibraryFolder());
}
static CProfile emptyProfile;
View
1  xbmc/settings/Settings.h
@@ -342,6 +342,7 @@ class CSettings
CStdString GetThumbnailsFolder() const;
CStdString GetVideoThumbFolder() const;
CStdString GetBookmarksThumbFolder() const;
+ CStdString GetLibraryFolder() const;
CStdString GetSourcesFile() const;
CStdString GetSettingsFile() const;
Please sign in to comment.
Something went wrong with that request. Please try again.