Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

custom library nodes: allow optional <path> tag in filter nodes #1602

Closed
wants to merge 2 commits into
from
Jump to file or symbol
Failed to load files and symbols.
+12 −0
Split
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<node order="11" type="filter" visible="Library.HasContent(TVShows)">
<label>20387</label>
+ <path>videodb://5/</path>
<icon>DefaultRecentlyAddedEpisodes.png</icon>
<content>episodes</content>
<order direction="descending">dateadded</order>
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<node order="10" type="filter" visible="Library.HasContent(Movies)">
<label>20386</label>
+ <path>videodb://4/</path>
<icon>DefaultRecentlyAddedMovies.png</icon>
<content>movies</content>
<order direction="descending">dateadded</order>
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<node order="12" type="filter" visible="Library.HasContent(MusicVideos)">
<label>20390</label>
+ <path>videodb://6/</path>
<icon>DefaultRecentlyAddedMusicVideos.png</icon>
<content>musicvideos</content>
<order direction="descending">dateadded</order>
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<node order="11" type="filter" visible="Library.HasContent(TVShows)">
<label>20387</label>
+ <path>videodb://5/</path>
<icon>DefaultRecentlyAddedEpisodes.png</icon>
<content>episodes</content>
<order direction="descending">dateadded</order>
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<node order="10" type="filter" visible="Library.HasContent(Movies)">
<label>20386</label>
+ <path>videodb://4/</path>
<icon>DefaultRecentlyAddedMovies.png</icon>
<content>movies</content>
<order direction="descending">dateadded</order>
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<node order="12" type="filter" visible="Library.HasContent(MusicVideos)">
<label>20390</label>
+ <path>videodb://6/</path>
<icon>DefaultRecentlyAddedMusicVideos.png</icon>
<content>musicvideos</content>
<order direction="descending">dateadded</order>
@@ -75,6 +75,12 @@ bool CLibraryDirectory::GetDirectory(const CStdString& strPath, CFileItemList &i
CSmartPlaylistDirectory::GetDirectory(playlist, items))
{
items.SetProperty("library.filter", "true");
+
+ CStdString path;
+ XMLUtils::GetPath(node, "path", path);
+ if (!path.empty())
+ items.SetPath(path);
+
return true;
}
}