Permalink
Browse files

Merge pull request #1108 from Montellese/movie_tagging

add a tagging system for movies
  • Loading branch information...
2 parents ba554f1 + a0323f2 commit f1285469fb5c6551db29c60928f7f3517eff8d3e @Montellese Montellese committed Jul 8, 2012
Showing with 636 additions and 22 deletions.
  1. +6 −0 XBMC-ATV2.xcodeproj/project.pbxproj
  2. +6 −0 XBMC-IOS.xcodeproj/project.pbxproj
  3. +6 −0 XBMC.xcodeproj/project.pbxproj
  4. +25 −1 language/English/strings.po
  5. +2 −0 project/VS2010Express/XBMC.vcxproj
  6. +6 −0 project/VS2010Express/XBMC.vcxproj.filters
  7. +5 −0 system/library/video/movies/tags.xml
  8. +2 −0 xbmc/dialogs/GUIDialogContextMenu.h
  9. +8 −0 xbmc/dialogs/GUIDialogSmartPlaylistRule.cpp
  10. +8 −0 xbmc/filesystem/VideoDatabaseDirectory.cpp
  11. +3 −0 xbmc/filesystem/VideoDatabaseDirectory/DirectoryNode.cpp
  12. +2 −1 xbmc/filesystem/VideoDatabaseDirectory/DirectoryNode.h
  13. +1 −0 xbmc/filesystem/VideoDatabaseDirectory/DirectoryNodeMoviesOverview.cpp
  14. +60 −0 xbmc/filesystem/VideoDatabaseDirectory/DirectoryNodeTags.cpp
  15. +41 −0 xbmc/filesystem/VideoDatabaseDirectory/DirectoryNodeTags.h
  16. +1 −1 xbmc/filesystem/VideoDatabaseDirectory/DirectoryNodeTitleMovies.cpp
  17. +1 −0 xbmc/filesystem/VideoDatabaseDirectory/Makefile
  18. +4 −0 xbmc/filesystem/VideoDatabaseDirectory/QueryParams.cpp
  19. +2 −0 xbmc/filesystem/VideoDatabaseDirectory/QueryParams.h
  20. +5 −1 xbmc/playlists/SmartPlayList.cpp
  21. +2 −1 xbmc/utils/DatabaseUtils.h
  22. +12 −0 xbmc/video/GUIViewStateVideo.cpp
  23. +173 −5 xbmc/video/VideoDatabase.cpp
  24. +11 −3 xbmc/video/VideoDatabase.h
  25. +6 −0 xbmc/video/VideoInfoTag.cpp
  26. +1 −0 xbmc/video/VideoInfoTag.h
  27. +3 −2 xbmc/video/windows/GUIWindowVideoBase.cpp
  28. +230 −6 xbmc/video/windows/GUIWindowVideoNav.cpp
  29. +3 −0 xbmc/video/windows/GUIWindowVideoNav.h
  30. +1 −1 xbmc/windows/GUIMediaWindow.cpp
@@ -21,6 +21,7 @@
32D6D47C1423A9D8003641AC /* JpegIO.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 32D6D47A1423A9D8003641AC /* JpegIO.cpp */; };
36A9445915821F8300727135 /* DatabaseUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 36A9445715821F8300727135 /* DatabaseUtils.cpp */; };
36A9445D15821FAC00727135 /* SortUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 36A9445B15821FAB00727135 /* SortUtils.cpp */; };
+ 36A9465315AA269B00727135 /* DirectoryNodeTags.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 36A9465115AA269B00727135 /* DirectoryNodeTags.cpp */; };
4D5D2E131301753F006ABC13 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4D5D2E121301753F006ABC13 /* CFNetwork.framework */; };
7C0A7ECD13A5DBF900AFC2BD /* AppParamParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C0A7ECB13A5DBF900AFC2BD /* AppParamParser.cpp */; };
7C0A7FC813A9E75400AFC2BD /* DirtyRegionSolvers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C0A7FC413A9E75400AFC2BD /* DirtyRegionSolvers.cpp */; };
@@ -1010,6 +1011,8 @@
36A9445A15821F9100727135 /* ISortable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ISortable.h; sourceTree = "<group>"; };
36A9445B15821FAB00727135 /* SortUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SortUtils.cpp; sourceTree = "<group>"; };
36A9445C15821FAB00727135 /* SortUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SortUtils.h; sourceTree = "<group>"; };
+ 36A9465115AA269B00727135 /* DirectoryNodeTags.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DirectoryNodeTags.cpp; sourceTree = "<group>"; };
+ 36A9465215AA269B00727135 /* DirectoryNodeTags.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DirectoryNodeTags.h; sourceTree = "<group>"; };
4D5D2E121301753F006ABC13 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; };
7C0A7ECB13A5DBF900AFC2BD /* AppParamParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AppParamParser.cpp; sourceTree = "<group>"; };
7C0A7ECC13A5DBF900AFC2BD /* AppParamParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppParamParser.h; sourceTree = "<group>"; };
@@ -4526,6 +4529,8 @@
F56C7481131EC152000AD0F6 /* DirectoryNodeSets.h */,
F56C7482131EC152000AD0F6 /* DirectoryNodeStudio.cpp */,
F56C7483131EC152000AD0F6 /* DirectoryNodeStudio.h */,
+ 36A9465115AA269B00727135 /* DirectoryNodeTags.cpp */,
+ 36A9465215AA269B00727135 /* DirectoryNodeTags.h */,
F56C7484131EC152000AD0F6 /* DirectoryNodeTitleMovies.cpp */,
F56C7485131EC152000AD0F6 /* DirectoryNodeTitleMovies.h */,
F56C7486131EC152000AD0F6 /* DirectoryNodeTitleMusicVideos.cpp */,
@@ -7221,6 +7226,7 @@
36A9445915821F8300727135 /* DatabaseUtils.cpp in Sources */,
36A9445D15821FAC00727135 /* SortUtils.cpp in Sources */,
DF08E84515829BA600058C77 /* Exception.cpp in Sources */,
+ 36A9465315AA269B00727135 /* DirectoryNodeTags.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -22,6 +22,7 @@
3291892B1423A9B700E878CD /* JpegIO.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 329189291423A9B700E878CD /* JpegIO.cpp */; };
36A9444E15821F2C00727135 /* DatabaseUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 36A9444C15821F2C00727135 /* DatabaseUtils.cpp */; };
36A9445215821F5300727135 /* SortUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 36A9445015821F5300727135 /* SortUtils.cpp */; };
+ 36A9465B15AA26BC00727135 /* DirectoryNodeTags.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 36A9465915AA26BC00727135 /* DirectoryNodeTags.cpp */; };
4D5D2E1E1301758F006ABC13 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4D5D2E1D1301758F006ABC13 /* CFNetwork.framework */; };
7C0A7EDE13A5DC2800AFC2BD /* AppParamParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C0A7EDC13A5DC2800AFC2BD /* AppParamParser.cpp */; };
7C0A7F9D13A9E70800AFC2BD /* GUIWindowDebugInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C0A7F9B13A9E70800AFC2BD /* GUIWindowDebugInfo.cpp */; };
@@ -1010,6 +1011,8 @@
36A9444F15821F3B00727135 /* ISortable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ISortable.h; sourceTree = "<group>"; };
36A9445015821F5300727135 /* SortUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SortUtils.cpp; sourceTree = "<group>"; };
36A9445115821F5300727135 /* SortUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SortUtils.h; sourceTree = "<group>"; };
+ 36A9465915AA26BC00727135 /* DirectoryNodeTags.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DirectoryNodeTags.cpp; sourceTree = "<group>"; };
+ 36A9465A15AA26BC00727135 /* DirectoryNodeTags.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DirectoryNodeTags.h; sourceTree = "<group>"; };
4D5D2E1D1301758F006ABC13 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; };
7C0A7EDC13A5DC2800AFC2BD /* AppParamParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AppParamParser.cpp; sourceTree = "<group>"; };
7C0A7EDD13A5DC2800AFC2BD /* AppParamParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppParamParser.h; sourceTree = "<group>"; };
@@ -4882,6 +4885,8 @@
F56C8464131F42E8000AD0F6 /* DirectoryNodeSets.h */,
F56C8465131F42E8000AD0F6 /* DirectoryNodeStudio.cpp */,
F56C8466131F42E8000AD0F6 /* DirectoryNodeStudio.h */,
+ 36A9465915AA26BC00727135 /* DirectoryNodeTags.cpp */,
+ 36A9465A15AA26BC00727135 /* DirectoryNodeTags.h */,
F56C8467131F42E8000AD0F6 /* DirectoryNodeTitleMovies.cpp */,
F56C8468131F42E8000AD0F6 /* DirectoryNodeTitleMovies.h */,
F56C8469131F42E8000AD0F6 /* DirectoryNodeTitleMusicVideos.cpp */,
@@ -7232,6 +7237,7 @@
36A9444E15821F2C00727135 /* DatabaseUtils.cpp in Sources */,
36A9445215821F5300727135 /* SortUtils.cpp in Sources */,
DFC3867E158296EC008AE277 /* Exception.cpp in Sources */,
+ 36A9465B15AA26BC00727135 /* DirectoryNodeTags.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -194,6 +194,7 @@
32C631281423A90F00F18420 /* JpegIO.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 32C631261423A90F00F18420 /* JpegIO.cpp */; };
36A9443D15821E2800727135 /* DatabaseUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 36A9443B15821E2800727135 /* DatabaseUtils.cpp */; };
36A9444115821E7C00727135 /* SortUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 36A9443F15821E7C00727135 /* SortUtils.cpp */; };
+ 36A9464C15AA25FD00727135 /* DirectoryNodeTags.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 36A9464A15AA25FD00727135 /* DirectoryNodeTags.cpp */; };
3802709A13D5A653009493DD /* SystemClock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3802709813D5A653009493DD /* SystemClock.cpp */; };
384718D81325BA04000486D6 /* XBDateTime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 384718D61325BA04000486D6 /* XBDateTime.cpp */; };
38F4E57013CCCB3B00664821 /* Implementation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 38F4E56C13CCCB3B00664821 /* Implementation.cpp */; };
@@ -1376,6 +1377,8 @@
36A9443E15821E5400727135 /* ISortable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ISortable.h; sourceTree = "<group>"; };
36A9443F15821E7C00727135 /* SortUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SortUtils.cpp; sourceTree = "<group>"; };
36A9444015821E7C00727135 /* SortUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SortUtils.h; sourceTree = "<group>"; };
+ 36A9464A15AA25FD00727135 /* DirectoryNodeTags.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DirectoryNodeTags.cpp; sourceTree = "<group>"; };
+ 36A9464B15AA25FD00727135 /* DirectoryNodeTags.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DirectoryNodeTags.h; sourceTree = "<group>"; };
3802709713D5A62D009493DD /* ThreadLocal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadLocal.h; sourceTree = "<group>"; };
3802709813D5A653009493DD /* SystemClock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SystemClock.cpp; sourceTree = "<group>"; };
3802709913D5A653009493DD /* SystemClock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SystemClock.h; sourceTree = "<group>"; };
@@ -5146,6 +5149,8 @@
7CCF7E711067643800992676 /* DirectoryNodeSets.h */,
E38E177A0D25F9FA00618676 /* DirectoryNodeStudio.cpp */,
E38E177B0D25F9FA00618676 /* DirectoryNodeStudio.h */,
+ 36A9464A15AA25FD00727135 /* DirectoryNodeTags.cpp */,
+ 36A9464B15AA25FD00727135 /* DirectoryNodeTags.h */,
E38E177C0D25F9FA00618676 /* DirectoryNodeTitleMovies.cpp */,
E38E177D0D25F9FA00618676 /* DirectoryNodeTitleMovies.h */,
E38E177E0D25F9FA00618676 /* DirectoryNodeTitleMusicVideos.cpp */,
@@ -7313,6 +7318,7 @@
36A9443D15821E2800727135 /* DatabaseUtils.cpp in Sources */,
36A9444115821E7C00727135 /* SortUtils.cpp in Sources */,
1DE0443515828F4B005DDB4D /* Exception.cpp in Sources */,
+ 36A9464C15AA25FD00727135 /* DirectoryNodeTags.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -7427,8 +7427,32 @@ msgctxt "#20458"
msgid "Group movies in sets"
msgstr ""
+msgctxt "#20459"
+msgid "Tags"
+msgstr ""
+
+msgctxt "#20460"
+msgid "Add %s"
+msgstr ""
+
+msgctxt "#20461"
+msgid "Remove %s"
+msgstr ""
+
+msgctxt "#20462"
+msgid "New tag..."
+msgstr ""
+
+msgctxt "#20463"
+msgid "A tag with the name '%s' already exists."
+msgstr ""
+
+msgctxt "#20464"
+msgid "Select %s"
+msgstr ""
+
#up to 21329 is reserved for the video db !! !
-#empty strings from id 20459 to 21329
+#empty strings from id 20465 to 21329
msgctxt "#21330"
msgid "Show hidden files and directories"
@@ -445,6 +445,7 @@
<ClCompile Include="..\..\xbmc\filesystem\UPnPFile.cpp" />
<ClCompile Include="..\..\xbmc\filesystem\VideoDatabaseDirectory.cpp" />
<ClCompile Include="..\..\xbmc\FileSystem\VideoDatabaseDirectory\DirectoryNodeCountry.cpp" />
+ <ClCompile Include="..\..\xbmc\filesystem\VideoDatabaseDirectory\DirectoryNodeTags.cpp" />
<ClCompile Include="..\..\xbmc\filesystem\windows\WINFileSMB.cpp" />
<ClCompile Include="..\..\xbmc\filesystem\windows\WINSMBDirectory.cpp" />
<ClCompile Include="..\..\xbmc\filesystem\VirtualDirectory.cpp" />
@@ -922,6 +923,7 @@
<ClInclude Include="..\..\xbmc\cores\dvdplayer\DVDCodecs\Audio\DVDAudioCodecPassthrough.h" />
<ClInclude Include="..\..\xbmc\cores\paplayer\PCMCodec.h" />
<ClInclude Include="..\..\xbmc\filesystem\ImageFile.h" />
+ <ClInclude Include="..\..\xbmc\filesystem\VideoDatabaseDirectory\DirectoryNodeTags.h" />
<ClInclude Include="..\..\xbmc\filesystem\windows\WINFileSMB.h" />
<ClInclude Include="..\..\xbmc\filesystem\windows\WINSMBDirectory.h" />
<ClInclude Include="..\..\xbmc\input\windows\WINJoystick.h" />
@@ -2586,6 +2586,9 @@
<ClCompile Include="..\..\xbmc\utils\DatabaseUtils.cpp">
<Filter>utils</Filter>
</ClCompile>
+ <ClCompile Include="..\..\xbmc\filesystem\VideoDatabaseDirectory\DirectoryNodeTags.cpp">
+ <Filter>filesystem\VideoDatabaseDirectory</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\xbmc\win32\pch.h">
@@ -5216,6 +5219,9 @@
<ClInclude Include="..\..\xbmc\utils\ISortable.h">
<Filter>utils</Filter>
</ClInclude>
+ <ClInclude Include="..\..\xbmc\filesystem\VideoDatabaseDirectory\DirectoryNodeTags.h">
+ <Filter>filesystem\VideoDatabaseDirectory</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\xbmc\win32\XBMC_PC.rc">
@@ -0,0 +1,5 @@
+<node order="7" type="folder" visible="Library.HasContent(MovieSets)">
+ <label>20459</label>
+ <path>videodb://1/9</path>
+ <icon>DefaultTags.png</icon>
+</node>
@@ -104,6 +104,8 @@ enum CONTEXT_BUTTON { CONTEXT_BUTTON_CANCELLED = 0,
CONTEXT_BUTTON_SET_MOVIESET_FANART,
CONTEXT_BUTTON_DELETE_PLUGIN,
CONTEXT_BUTTON_PLAY_AND_QUEUE,
+ CONTEXT_BUTTON_TAGS_ADD_ITEMS,
+ CONTEXT_BUTTON_TAGS_REMOVE_ITEMS,
CONTEXT_BUTTON_USER1,
CONTEXT_BUTTON_USER2,
CONTEXT_BUTTON_USER3,
@@ -240,6 +240,14 @@ void CGUIDialogSmartPlaylistRule::OnBrowse()
videodatabase.GetSetsNav("videodb://1/7/", items, VIDEODB_CONTENT_MOVIES);
iLabel = 20434;
}
+ else if (m_rule.m_field == FieldTag)
+ {
+ if (m_type == "movies")
+ videodatabase.GetTagsNav("videodb://1/9/", items, VIDEODB_CONTENT_MOVIES);
+ else
+ return;
+ iLabel = 20459;
+ }
else
{ // TODO: Add browseability in here.
assert(false);
@@ -160,6 +160,10 @@ bool CVideoDatabaseDirectory::GetLabel(const CStdString& strDirectory, CStdStrin
if (params.GetSetId() != -1)
strLabel += videodatabase.GetSetById(params.GetSetId());
+ // get tag
+ if (params.GetTagId() != -1)
+ strLabel += videodatabase.GetTagById(params.GetTagId());
+
// get year
if (params.GetYear() != -1)
{
@@ -190,6 +194,8 @@ bool CVideoDatabaseDirectory::GetLabel(const CStdString& strDirectory, CStdStrin
strLabel = g_localizeStrings.Get(20348); break;
case NODE_TYPE_SETS: // Sets
strLabel = g_localizeStrings.Get(20434); break;
+ case NODE_TYPE_TAGS: // Tags
+ strLabel = g_localizeStrings.Get(20459); break;
case NODE_TYPE_MOVIES_OVERVIEW: // Movies
strLabel = g_localizeStrings.Get(342); break;
case NODE_TYPE_TVSHOWS_OVERVIEW: // TV Shows
@@ -253,6 +259,8 @@ CStdString CVideoDatabaseDirectory::GetIcon(const CStdString &strDirectory)
return "DefaultCountry.png";
case NODE_TYPE_SETS: // Sets
return "DefaultSets.png";
+ case NODE_TYPE_TAGS: // Tags
+ return "DefaultTags.png";
case NODE_TYPE_YEAR: // Year
return "DefaultYear.png";
case NODE_TYPE_DIRECTOR: // Director
@@ -43,6 +43,7 @@
#include "DirectoryNodeRecentlyAddedMusicVideos.h"
#include "DirectoryNodeTitleMusicVideos.h"
#include "DirectoryNodeMusicVideoAlbum.h"
+#include "DirectoryNodeTags.h"
#include "video/VideoInfoTag.h"
#include "URL.h"
#include "settings/AdvancedSettings.h"
@@ -122,6 +123,8 @@ CDirectoryNode* CDirectoryNode::CreateNode(NODE_TYPE Type, const CStdString& str
return new CDirectoryNodeCountry(strName, pParent);
case NODE_TYPE_SETS:
return new CDirectoryNodeSets(strName, pParent);
+ case NODE_TYPE_TAGS:
+ return new CDirectoryNodeTags(strName, pParent);
case NODE_TYPE_YEAR:
return new CDirectoryNodeYear(strName, pParent);
case NODE_TYPE_ACTOR:
@@ -54,7 +54,8 @@ namespace XFILE
NODE_TYPE_TITLE_MUSICVIDEOS,
NODE_TYPE_MUSICVIDEOS_ALBUM,
NODE_TYPE_SETS,
- NODE_TYPE_COUNTRY
+ NODE_TYPE_COUNTRY,
+ NODE_TYPE_TAGS
} NODE_TYPE;
typedef struct {
@@ -36,6 +36,7 @@ Node MovieChildren[] = {
{ NODE_TYPE_STUDIO, 6, 20388 },
{ NODE_TYPE_SETS, 7, 20434 },
{ NODE_TYPE_COUNTRY, 8, 20451 },
+ { NODE_TYPE_TAGS, 9, 20459 }
};
CDirectoryNodeMoviesOverview::CDirectoryNodeMoviesOverview(const CStdString& strName, CDirectoryNode* pParent)
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2012 Team XBMC
+ * http://www.xbmc.org
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This Program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with XBMC; see the file COPYING. If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ */
+
+#include "DirectoryNodeTags.h"
+#include "QueryParams.h"
+#include "video/VideoDatabase.h"
+
+using namespace XFILE::VIDEODATABASEDIRECTORY;
+
+CDirectoryNodeTags::CDirectoryNodeTags(const CStdString& strName, CDirectoryNode* pParent)
+ : CDirectoryNode(NODE_TYPE_TAGS, strName, pParent)
+{
+
+}
+
+NODE_TYPE CDirectoryNodeTags::GetChildType() const
+{
+ return NODE_TYPE_TITLE_MOVIES;
+}
+
+CStdString CDirectoryNodeTags::GetLocalizedName() const
+{
+ CVideoDatabase db;
+ if (db.Open())
+ return db.GetTagById(GetID());
+ return "";
+}
+
+bool CDirectoryNodeTags::GetContent(CFileItemList& items) const
+{
+ CVideoDatabase videodatabase;
+ if (!videodatabase.Open())
+ return false;
+
+ CQueryParams params;
+ CollectQueryParams(params);
+
+ bool bSuccess = videodatabase.GetTagsNav(BuildPath(), items, params.GetContentType());
+ videodatabase.Close();
+
+ return bSuccess;
+}
@@ -0,0 +1,41 @@
+#pragma once
+/*
+ * Copyright (C) 2012 Team XBMC
+ * http://www.xbmc.org
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This Program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with XBMC; see the file COPYING. If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ */
+
+#include "DirectoryNode.h"
+
+namespace XFILE
+{
+ namespace VIDEODATABASEDIRECTORY
+ {
+ class CDirectoryNodeTags : public CDirectoryNode
+ {
+ public:
+ CDirectoryNodeTags(const CStdString& strName, CDirectoryNode* pParent);
+ protected:
+ virtual NODE_TYPE GetChildType() const;
+ virtual bool GetContent(CFileItemList& items) const;
+ virtual CStdString GetLocalizedName() const;
+ };
+ }
+}
+
+
@@ -41,7 +41,7 @@ bool CDirectoryNodeTitleMovies::GetContent(CFileItemList& items) const
CollectQueryParams(params);
CStdString strBaseDir=BuildPath();
- bool bSuccess=videodatabase.GetMoviesNav(strBaseDir, items, params.GetGenreId(), params.GetYear(), params.GetActorId(), params.GetDirectorId(), params.GetStudioId(), params.GetCountryId(), params.GetSetId());
+ bool bSuccess=videodatabase.GetMoviesNav(strBaseDir, items, params.GetGenreId(), params.GetYear(), params.GetActorId(), params.GetDirectorId(), params.GetStudioId(), params.GetCountryId(), params.GetSetId(), params.GetTagId());
videodatabase.Close();
Oops, something went wrong.

1 comment on commit f128546

On MySQL version 5.5.5 and above, the default storage engine defaults to InnoDB. Creating the tag table and index with storage engine InnoDB fails. Can you create the table with ENGINE = MYISAM?

Please sign in to comment.