Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[filesystem] add videodb://inprogresstvshows #8261

Merged
merged 2 commits into from Jan 10, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions Kodi.xcodeproj/project.pbxproj
Expand Up @@ -622,6 +622,8 @@
8883CEA70DD81807004E8B72 /* DVDSubtitleParserSSA.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8883CEA30DD81807004E8B72 /* DVDSubtitleParserSSA.cpp */; };
8883CEA80DD81807004E8B72 /* DVDSubtitlesLibass.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8883CEA50DD81807004E8B72 /* DVDSubtitlesLibass.cpp */; };
889B4D8E0E0EF86C00FAD25E /* RSSDirectory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 889B4D8C0E0EF86C00FAD25E /* RSSDirectory.cpp */; };
9A7368511C401F5F00CA169F /* DirectoryNodeInProgressTvShows.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A73684F1C401F5F00CA169F /* DirectoryNodeInProgressTvShows.cpp */; };
9A7368521C401F5F00CA169F /* DirectoryNodeInProgressTvShows.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A73684F1C401F5F00CA169F /* DirectoryNodeInProgressTvShows.cpp */; };
AE32174218313ADF0003FAFC /* XSLTUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AE4E87A517354C4A00D15206 /* XSLTUtils.cpp */; };
AE4E87A717354C4A00D15206 /* XSLTUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AE4E87A517354C4A00D15206 /* XSLTUtils.cpp */; };
AE84CB5A15A5B8A600A3810E /* TagLibVFSStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AE84CB5915A5B8A600A3810E /* TagLibVFSStream.cpp */; };
Expand Down Expand Up @@ -3278,6 +3280,8 @@
889B4D8D0E0EF86C00FAD25E /* RSSDirectory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RSSDirectory.h; sourceTree = "<group>"; };
88ECB6580DE013C4003396A7 /* DiskArbitration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DiskArbitration.framework; path = /System/Library/Frameworks/DiskArbitration.framework; sourceTree = "<absolute>"; };
8DD76F7E0486A8DE00D96B5E /* Kodi */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = Kodi; sourceTree = BUILT_PRODUCTS_DIR; };
9A73684F1C401F5F00CA169F /* DirectoryNodeInProgressTvShows.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DirectoryNodeInProgressTvShows.cpp; sourceTree = "<group>"; };
9A7368501C401F5F00CA169F /* DirectoryNodeInProgressTvShows.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DirectoryNodeInProgressTvShows.h; sourceTree = "<group>"; };
AE4E87A517354C4A00D15206 /* XSLTUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XSLTUtils.cpp; sourceTree = "<group>"; };
AE4E87A617354C4A00D15206 /* XSLTUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XSLTUtils.h; sourceTree = "<group>"; };
AE84CB5915A5B8A600A3810E /* TagLibVFSStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TagLibVFSStream.cpp; sourceTree = "<group>"; };
Expand Down Expand Up @@ -8078,6 +8082,8 @@
E38E177F0D25F9FA00618676 /* DirectoryNodeTitleMusicVideos.h */,
E38E17800D25F9FA00618676 /* DirectoryNodeTitleTvShows.cpp */,
E38E17810D25F9FA00618676 /* DirectoryNodeTitleTvShows.h */,
9A73684F1C401F5F00CA169F /* DirectoryNodeInProgressTvShows.cpp */,
9A7368501C401F5F00CA169F /* DirectoryNodeInProgressTvShows.h */,
E38E17820D25F9FA00618676 /* DirectoryNodeTvShowsOverview.cpp */,
E38E17830D25F9FA00618676 /* DirectoryNodeTvShowsOverview.h */,
E38E17880D25F9FA00618676 /* QueryParams.cpp */,
Expand Down Expand Up @@ -9389,6 +9395,7 @@
E38E22700D25F9FE00618676 /* LinuxResourceCounter.cpp in Sources */,
E38E22710D25F9FE00618676 /* LinuxTimezone.cpp in Sources */,
E38E22750D25F9FE00618676 /* XFileUtils.cpp in Sources */,
9A7368511C401F5F00CA169F /* DirectoryNodeInProgressTvShows.cpp in Sources */,
E38E22760D25F9FE00618676 /* XHandle.cpp in Sources */,
395C29E31A98A15700EBC7AD /* HTTPPythonHandler.cpp in Sources */,
E38E22770D25F9FE00618676 /* XMemUtils.cpp in Sources */,
Expand Down Expand Up @@ -10777,6 +10784,7 @@
E49913C8174E5F7500741B6D /* PeripheralBusUSB.cpp in Sources */,
E49913C9174E5F7500741B6D /* PeripheralBus.cpp in Sources */,
E49913CA174E5F8100741B6D /* Peripheral.cpp in Sources */,
9A7368521C401F5F00CA169F /* DirectoryNodeInProgressTvShows.cpp in Sources */,
E49913CB174E5F8100741B6D /* PeripheralBluetooth.cpp in Sources */,
E49913CC174E5F8100741B6D /* PeripheralCecAdapter.cpp in Sources */,
E49913CD174E5F8100741B6D /* PeripheralDisk.cpp in Sources */,
Expand Down
2 changes: 2 additions & 0 deletions project/VS2010Express/XBMC.vcxproj
Expand Up @@ -430,6 +430,7 @@
<ClCompile Include="..\..\xbmc\filesystem\UPnPFile.cpp" />
<ClCompile Include="..\..\xbmc\filesystem\VideoDatabaseDirectory.cpp" />
<ClCompile Include="..\..\xbmc\filesystem\VideoDatabaseDirectory\DirectoryNodeGrouped.cpp" />
<ClCompile Include="..\..\xbmc\filesystem\VideoDatabaseDirectory\DirectoryNodeInProgressTvShows.cpp" />
<ClCompile Include="..\..\xbmc\filesystem\win32\Win32Directory.cpp" />
<ClCompile Include="..\..\xbmc\filesystem\win32\Win32SMBDirectory.cpp" />
<ClCompile Include="..\..\xbmc\filesystem\win32\Win32File.cpp" />
Expand Down Expand Up @@ -991,6 +992,7 @@
<ClInclude Include="..\..\xbmc\filesystem\ResourceDirectory.h" />
<ClInclude Include="..\..\xbmc\filesystem\ResourceFile.h" />
<ClInclude Include="..\..\xbmc\filesystem\VideoDatabaseDirectory\DirectoryNodeGrouped.h" />
<ClInclude Include="..\..\xbmc\filesystem\VideoDatabaseDirectory\DirectoryNodeInProgressTvShows.h" />
<ClInclude Include="..\..\xbmc\filesystem\win32\Win32Directory.h" />
<ClInclude Include="..\..\xbmc\filesystem\win32\Win32SMBDirectory.h" />
<ClInclude Include="..\..\xbmc\filesystem\win32\Win32File.h" />
Expand Down
8 changes: 7 additions & 1 deletion project/VS2010Express/XBMC.vcxproj.filters
Expand Up @@ -3240,6 +3240,9 @@
<ClCompile Include="..\..\xbmc\pvr\windows\GUIWindowPVRTimersBase.cpp">
<Filter>pvr\windows</Filter>
</ClCompile>
<ClCompile Include="..\..\xbmc\filesystem\VideoDatabaseDirectory\DirectoryNodeInProgressTvShows.cpp">
<Filter>filesystem\VideoDatabaseDirectory</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\xbmc\win32\pch.h">
Expand Down Expand Up @@ -6270,6 +6273,9 @@
<ClInclude Include="..\..\xbmc\pvr\windows\GUIWindowPVRTimersBase.h">
<Filter>pvr\windows</Filter>
</ClInclude>
<ClInclude Include="..\..\xbmc\filesystem\VideoDatabaseDirectory\DirectoryNodeInProgressTvShows.h">
<Filter>filesystem\VideoDatabaseDirectory</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\xbmc\win32\XBMC_PC.rc">
Expand Down Expand Up @@ -6356,4 +6362,4 @@
<Filter>shaders</Filter>
</FxCompile>
</ItemGroup>
</Project>
</Project>
5 changes: 2 additions & 3 deletions system/library/video/inprogressshows.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<node order="4" type="filter" visible="Library.HasContent(TVShows)">
<node order="4" type="folder" visible="Library.HasContent(TVShows)">
<label>626</label>
<icon>DefaultInProgressShows.png</icon>
<content>tvshows</content>
<rule field="inprogress" operator="true" />
<path>videodb://inprogresstvshows/</path>
</node>
5 changes: 2 additions & 3 deletions system/library/video_flat/inprogressshows.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<node order="4" type="filter" visible="Library.HasContent(TVShows)">
<node order="4" type="folder" visible="Library.HasContent(TVShows)">
<label>626</label>
<icon>DefaultInProgressShows.png</icon>
<content>tvshows</content>
<rule field="inprogress" operator="true" />
<path>videodb://inprogresstvshows/</path>
</node>
10 changes: 7 additions & 3 deletions xbmc/filesystem/VideoDatabaseDirectory.cpp
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2005-2013 Team XBMC
* http://xbmc.org
* Copyright (C) 2016 Team Kodi
* http://kodi.tv
*
* 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
Expand All @@ -13,7 +13,7 @@
* 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, see
* along with Kodi; see the file COPYING. If not, see
* <http://www.gnu.org/licenses/>.
*
*/
Expand Down Expand Up @@ -219,6 +219,8 @@ bool CVideoDatabaseDirectory::GetLabel(const std::string& strDirectory, std::str
strLabel = g_localizeStrings.Get(33054); break;
case NODE_TYPE_EPISODES: // Episodes
strLabel = g_localizeStrings.Get(20360); break;
case NODE_TYPE_INPROGRESS_TVSHOWS: // InProgress TvShows
strLabel = g_localizeStrings.Get(626); break;
default:
return false;
}
Expand Down Expand Up @@ -280,6 +282,8 @@ std::string CVideoDatabaseDirectory::GetIcon(const std::string &strDirectory)
return "DefaultRecentlyAddedEpisodes.png";
case NODE_TYPE_RECENTLY_ADDED_MUSICVIDEOS: // Recently Added Episodes
return "DefaultRecentlyAddedMusicVideos.png";
case NODE_TYPE_INPROGRESS_TVSHOWS: // InProgress TvShows
return "DefaultInProgressTvShows.png";
case NODE_TYPE_STUDIO: // Studios
return "DefaultStudios.png";
case NODE_TYPE_MUSICVIDEOS_OVERVIEW: // Music Videos
Expand Down
9 changes: 6 additions & 3 deletions xbmc/filesystem/VideoDatabaseDirectory/DirectoryNode.cpp
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2005-2013 Team XBMC
* http://xbmc.org
* Copyright (C) 2016 Team Kodi
* http://kodi.tv
*
* 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
Expand All @@ -13,7 +13,7 @@
* 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, see
* along with Kodi; see the file COPYING. If not, see
* <http://www.gnu.org/licenses/>.
*
*/
Expand All @@ -30,6 +30,7 @@
#include "DirectoryNodeTvShowsOverview.h"
#include "DirectoryNodeSeasons.h"
#include "DirectoryNodeEpisodes.h"
#include "DirectoryNodeInProgressTvShows.h"
#include "DirectoryNodeRecentlyAddedMovies.h"
#include "DirectoryNodeRecentlyAddedEpisodes.h"
#include "DirectoryNodeMusicVideosOverview.h"
Expand Down Expand Up @@ -141,6 +142,8 @@ CDirectoryNode* CDirectoryNode::CreateNode(NODE_TYPE Type, const std::string& st
return new CDirectoryNodeMusicVideosOverview(strName,pParent);
case NODE_TYPE_RECENTLY_ADDED_MUSICVIDEOS:
return new CDirectoryNodeRecentlyAddedMusicVideos(strName,pParent);
case NODE_TYPE_INPROGRESS_TVSHOWS:
return new CDirectoryNodeInProgressTvShows(strName,pParent);
case NODE_TYPE_TITLE_MUSICVIDEOS:
return new CDirectoryNodeTitleMusicVideos(strName,pParent);
default:
Expand Down
9 changes: 5 additions & 4 deletions xbmc/filesystem/VideoDatabaseDirectory/DirectoryNode.h
@@ -1,7 +1,7 @@
#pragma once
/*
* Copyright (C) 2005-2013 Team XBMC
* http://xbmc.org
* Copyright (C) 2016 Team Kodi
* http://kodi.tv
*
* 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
Expand All @@ -14,7 +14,7 @@
* 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, see
* along with Kodi; see the file COPYING. If not, see
* <http://www.gnu.org/licenses/>.
*
*/
Expand Down Expand Up @@ -54,7 +54,8 @@ namespace XFILE
NODE_TYPE_MUSICVIDEOS_ALBUM,
NODE_TYPE_SETS,
NODE_TYPE_COUNTRY,
NODE_TYPE_TAGS
NODE_TYPE_TAGS,
NODE_TYPE_INPROGRESS_TVSHOWS
} NODE_TYPE;

typedef struct {
Expand Down
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2005-2013 Team XBMC
* http://xbmc.org
* Copyright (C) 2016 Team Kodi
* http://kodi.tv
*
* 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
Expand All @@ -13,7 +13,7 @@
* 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, see
* along with Kodi; see the file COPYING. If not, see
* <http://www.gnu.org/licenses/>.
*
*/
Expand Down Expand Up @@ -119,6 +119,7 @@ std::string CDirectoryNodeGrouped::GetContentType(const CQueryParams &params) co
case NODE_TYPE_RECENTLY_ADDED_EPISODES:
case NODE_TYPE_RECENTLY_ADDED_MOVIES:
case NODE_TYPE_RECENTLY_ADDED_MUSICVIDEOS:
case NODE_TYPE_INPROGRESS_TVSHOWS:
case NODE_TYPE_ROOT:
case NODE_TYPE_SEASONS:
case NODE_TYPE_TITLE_MOVIES:
Expand Down
@@ -0,0 +1,56 @@
/*
* Copyright (C) 2016 Team Kodi
* http://kodi.tv
*
* 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 Kodi; see the file COPYING. If not, see
* <http://www.gnu.org/licenses/>.
*
*/

#include "DirectoryNodeInProgressTvShows.h"
#include "video/VideoDatabase.h"

using namespace XFILE::VIDEODATABASEDIRECTORY;

CDirectoryNodeInProgressTvShows::CDirectoryNodeInProgressTvShows(const std::string& strName, CDirectoryNode* pParent)
: CDirectoryNode(NODE_TYPE_INPROGRESS_TVSHOWS, strName, pParent)
{

}

NODE_TYPE CDirectoryNodeInProgressTvShows::GetChildType() const
{
return NODE_TYPE_SEASONS;
}

std::string CDirectoryNodeInProgressTvShows::GetLocalizedName() const
{
CVideoDatabase db;
if (db.Open())
return db.GetTvShowTitleById(GetID());
return "";
}

bool CDirectoryNodeInProgressTvShows::GetContent(CFileItemList& items) const
{
CVideoDatabase videodatabase;
if (!videodatabase.Open())
return false;

bool bSuccess=videodatabase.GetInProgressTvShowsNav(BuildPath(), items);

videodatabase.Close();

return bSuccess;
}
@@ -0,0 +1,40 @@
#pragma once
/*
* Copyright (C) 2016 Team Kodi
* http://kodi.tv
*
* 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 Kodi; see the file COPYING. If not, see
* <http://www.gnu.org/licenses/>.
*
*/

#include "DirectoryNode.h"

namespace XFILE
{
namespace VIDEODATABASEDIRECTORY
{
class CDirectoryNodeInProgressTvShows : public CDirectoryNode
{
public:
CDirectoryNodeInProgressTvShows(const std::string& strEntryName, CDirectoryNode* pParent);
protected:
virtual NODE_TYPE GetChildType() const;
virtual bool GetContent(CFileItemList& items) const;
virtual std::string GetLocalizedName() const;
};
}
}


10 changes: 7 additions & 3 deletions xbmc/filesystem/VideoDatabaseDirectory/DirectoryNodeOverview.cpp
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2005-2013 Team XBMC
* http://xbmc.org
* Copyright (C) 2016 Team Kodi
* http://kodi.tv
*
* 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
Expand All @@ -13,7 +13,7 @@
* 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, see
* along with Kodi; see the file COPYING. If not, see
* <http://www.gnu.org/licenses/>.
*
*/
Expand All @@ -36,6 +36,7 @@ Node OverviewChildren[] = {
{ NODE_TYPE_RECENTLY_ADDED_MOVIES, "recentlyaddedmovies", 20386 },
{ NODE_TYPE_RECENTLY_ADDED_EPISODES, "recentlyaddedepisodes", 20387 },
{ NODE_TYPE_RECENTLY_ADDED_MUSICVIDEOS, "recentlyaddedmusicvideos", 20390 },
{ NODE_TYPE_INPROGRESS_TVSHOWS, "inprogresstvshows", 626 },
};

CDirectoryNodeOverview::CDirectoryNodeOverview(const std::string& strName, CDirectoryNode* pParent)
Expand Down Expand Up @@ -94,7 +95,10 @@ bool CDirectoryNodeOverview::GetContent(CFileItemList& items) const
if (hasMovies)
vec.push_back(std::make_pair("recentlyaddedmovies", 20386)); // Recently Added Movies
if (hasTvShows)
{
vec.push_back(std::make_pair("recentlyaddedepisodes", 20387)); // Recently Added Episodes
vec.push_back(std::make_pair("inprogresstvshows", 626)); // InProgress TvShows
}
if (hasMusicVideos)
vec.push_back(std::make_pair("recentlyaddedmusicvideos", 20390)); // Recently Added Music Videos
}
Expand Down
1 change: 1 addition & 0 deletions xbmc/filesystem/VideoDatabaseDirectory/Makefile
@@ -1,6 +1,7 @@
SRCS=DirectoryNode.cpp \
DirectoryNodeEpisodes.cpp \
DirectoryNodeGrouped.cpp \
DirectoryNodeInProgressTvShows.cpp \
DirectoryNodeMoviesOverview.cpp \
DirectoryNodeMusicVideosOverview.cpp \
DirectoryNodeOverview.cpp \
Expand Down