aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--addons/resource.language.en_gb/resources/strings.po4
-rw-r--r--system/library/music/compilations.xml2
-rw-r--r--xbmc/filesystem/MusicDatabaseDirectory.cpp13
-rw-r--r--xbmc/filesystem/MusicDatabaseDirectory/CMakeLists.txt12
-rw-r--r--xbmc/filesystem/MusicDatabaseDirectory/DirectoryNode.cpp12
-rw-r--r--xbmc/filesystem/MusicDatabaseDirectory/DirectoryNode.h4
-rw-r--r--xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeAlbumCompilations.cpp55
-rw-r--r--xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeAlbumCompilations.h29
-rw-r--r--xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeAlbumCompilationsSongs.cpp37
-rw-r--r--xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeAlbumCompilationsSongs.h27
-rw-r--r--xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeGrouped.cpp2
-rw-r--r--xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeOverview.cpp2
-rw-r--r--xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeYearAlbum.cpp55
-rw-r--r--xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeYearAlbum.h29
-rw-r--r--xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeYearSong.cpp37
-rw-r--r--xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeYearSong.h27
-rw-r--r--xbmc/filesystem/MusicDatabaseDirectory/QueryParams.cpp4
-rw-r--r--xbmc/music/GUIViewStateMusic.cpp8
-rw-r--r--xbmc/music/MusicDatabase.cpp24
-rw-r--r--xbmc/music/MusicDatabase.h2
-rw-r--r--xbmc/music/MusicDbUrl.cpp15
-rw-r--r--xbmc/music/windows/GUIWindowMusicNav.cpp8
-rw-r--r--xbmc/music/windows/MusicFileItemListModifier.cpp2
-rw-r--r--xbmc/network/upnp/UPnPInternal.cpp4
24 files changed, 14 insertions, 400 deletions
diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po
index 1347dd015d..13f831e794 100644
--- a/addons/resource.language.en_gb/resources/strings.po
+++ b/addons/resource.language.en_gb/resources/strings.po
@@ -2392,6 +2392,8 @@ msgstr ""
#empty string with id 520
#: xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeOverview.cpp
+#. Node title for compilation albums, plural of #204
+#: system/library/music/compilations.xml
msgctxt "#521"
msgid "Compilations"
msgstr ""
@@ -8398,10 +8400,8 @@ msgstr ""
#: xbmc/filesystem/MusicDatabaseDirectory/DirectoryNode.cpp
#: xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeAlbum.cpp
-#: xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeCompilations.cpp
#: xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeRcentlyAdded.cpp
#: xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeRcentlyPlayed.cpp
-#: xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeYearAlbum.cpp
msgctxt "#15102"
msgid "* All albums"
msgstr ""
diff --git a/system/library/music/compilations.xml b/system/library/music/compilations.xml
index b1cb612c58..8e9879ac30 100644
--- a/system/library/music/compilations.xml
+++ b/system/library/music/compilations.xml
@@ -2,5 +2,5 @@
<node order="100" type="folder" visible="Library.HasContent(Compilations)">
<label>521</label>
<icon>DefaultMusicCompilations.png</icon>
- <path>musicdb://compilations/</path>
+ <path>musicdb://albums/?compilation=true</path>
</node>
diff --git a/xbmc/filesystem/MusicDatabaseDirectory.cpp b/xbmc/filesystem/MusicDatabaseDirectory.cpp
index fb30697135..721c276736 100644
--- a/xbmc/filesystem/MusicDatabaseDirectory.cpp
+++ b/xbmc/filesystem/MusicDatabaseDirectory.cpp
@@ -200,14 +200,8 @@ bool CMusicDatabaseDirectory::GetLabel(const std::string& strDirectory, std::str
strLabel = g_localizeStrings.Get(10504); // Top 100 Songs
break;
case NODE_TYPE_YEAR:
- case NODE_TYPE_YEAR_ALBUM:
- case NODE_TYPE_YEAR_SONG:
strLabel = g_localizeStrings.Get(652); // Years
break;
- case NODE_TYPE_ALBUM_COMPILATIONS:
- case NODE_TYPE_ALBUM_COMPILATIONS_SONGS:
- strLabel = g_localizeStrings.Get(521);
- break;
case NODE_TYPE_OVERVIEW:
strLabel = "";
break;
@@ -226,10 +220,8 @@ bool CMusicDatabaseDirectory::ContainsSongs(const std::string &path)
if (type == MUSICDATABASEDIRECTORY::NODE_TYPE_SINGLES) return true;
if (type == MUSICDATABASEDIRECTORY::NODE_TYPE_ALBUM_RECENTLY_ADDED_SONGS) return true;
if (type == MUSICDATABASEDIRECTORY::NODE_TYPE_ALBUM_RECENTLY_PLAYED_SONGS) return true;
- if (type == MUSICDATABASEDIRECTORY::NODE_TYPE_ALBUM_COMPILATIONS_SONGS) return true;
if (type == MUSICDATABASEDIRECTORY::NODE_TYPE_ALBUM_TOP100_SONGS) return true;
if (type == MUSICDATABASEDIRECTORY::NODE_TYPE_SONG_TOP100) return true;
- if (type == MUSICDATABASEDIRECTORY::NODE_TYPE_YEAR_SONG) return true;
return false;
}
@@ -271,7 +263,6 @@ std::string CMusicDatabaseDirectory::GetIcon(const std::string &strDirectory)
case NODE_TYPE_TOP100:
return "DefaultMusicTop100.png";
case NODE_TYPE_ALBUM:
- case NODE_TYPE_YEAR_ALBUM:
return "DefaultMusicAlbums.png";
case NODE_TYPE_ALBUM_RECENTLY_ADDED:
case NODE_TYPE_ALBUM_RECENTLY_ADDED_SONGS:
@@ -281,8 +272,6 @@ std::string CMusicDatabaseDirectory::GetIcon(const std::string &strDirectory)
return "DefaultMusicRecentlyPlayed.png";
case NODE_TYPE_SINGLES:
case NODE_TYPE_SONG:
- case NODE_TYPE_YEAR_SONG:
- case NODE_TYPE_ALBUM_COMPILATIONS_SONGS:
return "DefaultMusicSongs.png";
case NODE_TYPE_ALBUM_TOP100:
case NODE_TYPE_ALBUM_TOP100_SONGS:
@@ -291,8 +280,6 @@ std::string CMusicDatabaseDirectory::GetIcon(const std::string &strDirectory)
return "DefaultMusicTop100Songs.png";
case NODE_TYPE_YEAR:
return "DefaultMusicYears.png";
- case NODE_TYPE_ALBUM_COMPILATIONS:
- return "DefaultMusicCompilations.png";
default:
break;
}
diff --git a/xbmc/filesystem/MusicDatabaseDirectory/CMakeLists.txt b/xbmc/filesystem/MusicDatabaseDirectory/CMakeLists.txt
index 6de6b45ab1..93a6a8cef8 100644
--- a/xbmc/filesystem/MusicDatabaseDirectory/CMakeLists.txt
+++ b/xbmc/filesystem/MusicDatabaseDirectory/CMakeLists.txt
@@ -1,6 +1,4 @@
-set(SOURCES DirectoryNodeAlbumCompilations.cpp
- DirectoryNodeAlbumCompilationsSongs.cpp
- DirectoryNodeAlbum.cpp
+set(SOURCES DirectoryNodeAlbum.cpp
DirectoryNodeAlbumRecentlyAdded.cpp
DirectoryNodeAlbumRecentlyAddedSong.cpp
DirectoryNodeAlbumRecentlyPlayed.cpp
@@ -15,15 +13,11 @@ set(SOURCES DirectoryNodeAlbumCompilations.cpp
DirectoryNodeSingles.cpp
DirectoryNodeSong.cpp
DirectoryNodeSongTop100.cpp
- DirectoryNodeTop100.cpp
- DirectoryNodeYearAlbum.cpp
- DirectoryNodeYearSong.cpp
+ DirectoryNodeTop100.cpp
QueryParams.cpp)
set(HEADERS DirectoryNode.h
DirectoryNodeAlbum.h
- DirectoryNodeAlbumCompilations.h
- DirectoryNodeAlbumCompilationsSongs.h
DirectoryNodeAlbumRecentlyAdded.h
DirectoryNodeAlbumRecentlyAddedSong.h
DirectoryNodeAlbumRecentlyPlayed.h
@@ -38,8 +32,6 @@ set(HEADERS DirectoryNode.h
DirectoryNodeSong.h
DirectoryNodeSongTop100.h
DirectoryNodeTop100.h
- DirectoryNodeYearAlbum.h
- DirectoryNodeYearSong.h
QueryParams.h)
core_add_library(musicdatabasedirectory)
diff --git a/xbmc/filesystem/MusicDatabaseDirectory/DirectoryNode.cpp b/xbmc/filesystem/MusicDatabaseDirectory/DirectoryNode.cpp
index cf52cb47d7..efee72fd23 100644
--- a/xbmc/filesystem/MusicDatabaseDirectory/DirectoryNode.cpp
+++ b/xbmc/filesystem/MusicDatabaseDirectory/DirectoryNode.cpp
@@ -9,8 +9,6 @@
#include "DirectoryNode.h"
#include "DirectoryNodeAlbum.h"
-#include "DirectoryNodeAlbumCompilations.h"
-#include "DirectoryNodeAlbumCompilationsSongs.h"
#include "DirectoryNodeAlbumRecentlyAdded.h"
#include "DirectoryNodeAlbumRecentlyAddedSong.h"
#include "DirectoryNodeAlbumRecentlyPlayed.h"
@@ -25,8 +23,6 @@
#include "DirectoryNodeSong.h"
#include "DirectoryNodeSongTop100.h"
#include "DirectoryNodeTop100.h"
-#include "DirectoryNodeYearAlbum.h"
-#include "DirectoryNodeYearSong.h"
#include "FileItem.h"
#include "QueryParams.h"
#include "URL.h"
@@ -126,14 +122,6 @@ CDirectoryNode* CDirectoryNode::CreateNode(NODE_TYPE Type, const std::string& st
return new CDirectoryNodeAlbumRecentlyPlayed(strName, pParent);
case NODE_TYPE_ALBUM_RECENTLY_PLAYED_SONGS:
return new CDirectoryNodeAlbumRecentlyPlayedSong(strName, pParent);
- case NODE_TYPE_ALBUM_COMPILATIONS:
- return new CDirectoryNodeAlbumCompilations(strName, pParent);
- case NODE_TYPE_ALBUM_COMPILATIONS_SONGS:
- return new CDirectoryNodeAlbumCompilationsSongs(strName, pParent);
- case NODE_TYPE_YEAR_ALBUM:
- return new CDirectoryNodeYearAlbum(strName, pParent);
- case NODE_TYPE_YEAR_SONG:
- return new CDirectoryNodeYearSong(strName, pParent);
default:
break;
}
diff --git a/xbmc/filesystem/MusicDatabaseDirectory/DirectoryNode.h b/xbmc/filesystem/MusicDatabaseDirectory/DirectoryNode.h
index 016aef49a5..da171356d3 100644
--- a/xbmc/filesystem/MusicDatabaseDirectory/DirectoryNode.h
+++ b/xbmc/filesystem/MusicDatabaseDirectory/DirectoryNode.h
@@ -35,13 +35,9 @@ namespace XFILE
NODE_TYPE_ALBUM_RECENTLY_PLAYED_SONGS,
NODE_TYPE_ALBUM_TOP100,
NODE_TYPE_ALBUM_TOP100_SONGS,
- NODE_TYPE_ALBUM_COMPILATIONS,
- NODE_TYPE_ALBUM_COMPILATIONS_SONGS,
NODE_TYPE_SONG,
NODE_TYPE_SONG_TOP100,
NODE_TYPE_YEAR,
- NODE_TYPE_YEAR_ALBUM,
- NODE_TYPE_YEAR_SONG,
NODE_TYPE_SINGLES
} NODE_TYPE;
diff --git a/xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeAlbumCompilations.cpp b/xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeAlbumCompilations.cpp
deleted file mode 100644
index 9d01dd1774..0000000000
--- a/xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeAlbumCompilations.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (C) 2005-2018 Team Kodi
- * This file is part of Kodi - https://kodi.tv
- *
- * SPDX-License-Identifier: GPL-2.0-or-later
- * See LICENSES/README.md for more information.
- */
-
-#include "DirectoryNodeAlbumCompilations.h"
-
-#include "QueryParams.h"
-#include "guilib/LocalizeStrings.h"
-#include "music/MusicDatabase.h"
-
-using namespace XFILE::MUSICDATABASEDIRECTORY;
-
-CDirectoryNodeAlbumCompilations::CDirectoryNodeAlbumCompilations(const std::string& strName, CDirectoryNode* pParent)
- : CDirectoryNode(NODE_TYPE_ALBUM_COMPILATIONS, strName, pParent)
-{
-
-}
-
-NODE_TYPE CDirectoryNodeAlbumCompilations::GetChildType() const
-{
- if (GetName()=="-1")
- return NODE_TYPE_ALBUM_COMPILATIONS_SONGS;
-
- return NODE_TYPE_SONG;
-}
-
-std::string CDirectoryNodeAlbumCompilations::GetLocalizedName() const
-{
- if (GetID() == -1)
- return g_localizeStrings.Get(15102); // All Albums
- CMusicDatabase db;
- if (db.Open())
- return db.GetAlbumById(GetID());
- return "";
-}
-
-bool CDirectoryNodeAlbumCompilations::GetContent(CFileItemList& items) const
-{
- CMusicDatabase musicdatabase;
- if (!musicdatabase.Open())
- return false;
-
- CQueryParams params;
- CollectQueryParams(params);
-
- bool bSuccess=musicdatabase.GetCompilationAlbums(BuildPath(), items);
-
- musicdatabase.Close();
-
- return bSuccess;
-}
diff --git a/xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeAlbumCompilations.h b/xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeAlbumCompilations.h
deleted file mode 100644
index e7880950bb..0000000000
--- a/xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeAlbumCompilations.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (C) 2005-2018 Team Kodi
- * This file is part of Kodi - https://kodi.tv
- *
- * SPDX-License-Identifier: GPL-2.0-or-later
- * See LICENSES/README.md for more information.
- */
-
-#pragma once
-
-#include "DirectoryNode.h"
-
-namespace XFILE
-{
- namespace MUSICDATABASEDIRECTORY
- {
- class CDirectoryNodeAlbumCompilations : public CDirectoryNode
- {
- public:
- CDirectoryNodeAlbumCompilations(const std::string& strName, CDirectoryNode* pParent);
- protected:
- NODE_TYPE GetChildType() const override;
- bool GetContent(CFileItemList& items) const override;
- std::string GetLocalizedName() const override;
- };
- }
-}
-
-
diff --git a/xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeAlbumCompilationsSongs.cpp b/xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeAlbumCompilationsSongs.cpp
deleted file mode 100644
index 86fe665c48..0000000000
--- a/xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeAlbumCompilationsSongs.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2005-2018 Team Kodi
- * This file is part of Kodi - https://kodi.tv
- *
- * SPDX-License-Identifier: GPL-2.0-or-later
- * See LICENSES/README.md for more information.
- */
-
-#include "DirectoryNodeAlbumCompilationsSongs.h"
-
-#include "QueryParams.h"
-#include "music/MusicDatabase.h"
-
-using namespace XFILE::MUSICDATABASEDIRECTORY;
-
-CDirectoryNodeAlbumCompilationsSongs::CDirectoryNodeAlbumCompilationsSongs(const std::string& strName, CDirectoryNode* pParent)
- : CDirectoryNode(NODE_TYPE_ALBUM_COMPILATIONS_SONGS, strName, pParent)
-{
-
-}
-
-
-bool CDirectoryNodeAlbumCompilationsSongs::GetContent(CFileItemList& items) const
-{
- CMusicDatabase musicdatabase;
- if (!musicdatabase.Open())
- return false;
-
- CQueryParams params;
- CollectQueryParams(params);
-
- bool bSuccess=musicdatabase.GetCompilationSongs(BuildPath(), items);
-
- musicdatabase.Close();
-
- return bSuccess;
-}
diff --git a/xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeAlbumCompilationsSongs.h b/xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeAlbumCompilationsSongs.h
deleted file mode 100644
index eddf2cbf31..0000000000
--- a/xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeAlbumCompilationsSongs.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (C) 2005-2018 Team Kodi
- * This file is part of Kodi - https://kodi.tv
- *
- * SPDX-License-Identifier: GPL-2.0-or-later
- * See LICENSES/README.md for more information.
- */
-
-#pragma once
-
-#include "DirectoryNode.h"
-
-namespace XFILE
-{
- namespace MUSICDATABASEDIRECTORY
- {
- class CDirectoryNodeAlbumCompilationsSongs : public CDirectoryNode
- {
- public:
- CDirectoryNodeAlbumCompilationsSongs(const std::string& strName, CDirectoryNode* pParent);
- protected:
- bool GetContent(CFileItemList& items) const override;
- };
- }
-}
-
-
diff --git a/xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeGrouped.cpp b/xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeGrouped.cpp
index 598dc0398d..65875f70fb 100644
--- a/xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeGrouped.cpp
+++ b/xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeGrouped.cpp
@@ -19,7 +19,7 @@ CDirectoryNodeGrouped::CDirectoryNodeGrouped(NODE_TYPE type, const std::string&
NODE_TYPE CDirectoryNodeGrouped::GetChildType() const
{
if (GetType() == NODE_TYPE_YEAR)
- return NODE_TYPE_YEAR_ALBUM;
+ return NODE_TYPE_ALBUM;
return NODE_TYPE_ARTIST;
}
diff --git a/xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeOverview.cpp b/xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeOverview.cpp
index 25072e426e..54dd81a14b 100644
--- a/xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeOverview.cpp
+++ b/xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeOverview.cpp
@@ -27,7 +27,7 @@ namespace XFILE
{ NODE_TYPE_TOP100, "top100", 271 },
{ NODE_TYPE_ALBUM_RECENTLY_ADDED, "recentlyaddedalbums", 359 },
{ NODE_TYPE_ALBUM_RECENTLY_PLAYED, "recentlyplayedalbums", 517 },
- { NODE_TYPE_ALBUM_COMPILATIONS, "compilations", 521 },
+ { NODE_TYPE_ALBUM, "compilations", 521 },
{ NODE_TYPE_ROLE, "roles", 38033 },
{ NODE_TYPE_SOURCE, "sources", 39031 },
};
diff --git a/xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeYearAlbum.cpp b/xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeYearAlbum.cpp
deleted file mode 100644
index e01763231e..0000000000
--- a/xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeYearAlbum.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (C) 2005-2018 Team Kodi
- * This file is part of Kodi - https://kodi.tv
- *
- * SPDX-License-Identifier: GPL-2.0-or-later
- * See LICENSES/README.md for more information.
- */
-
-#include "DirectoryNodeYearAlbum.h"
-
-#include "QueryParams.h"
-#include "guilib/LocalizeStrings.h"
-#include "music/MusicDatabase.h"
-
-using namespace XFILE::MUSICDATABASEDIRECTORY;
-
-CDirectoryNodeYearAlbum::CDirectoryNodeYearAlbum(const std::string& strName, CDirectoryNode* pParent)
- : CDirectoryNode(NODE_TYPE_YEAR_ALBUM, strName, pParent)
-{
-
-}
-
-NODE_TYPE CDirectoryNodeYearAlbum::GetChildType() const
-{
- if (GetName()=="-1")
- return NODE_TYPE_YEAR_SONG;
-
- return NODE_TYPE_SONG;
-}
-
-std::string CDirectoryNodeYearAlbum::GetLocalizedName() const
-{
- if (GetID() == -1)
- return g_localizeStrings.Get(15102); // All Albums
- CMusicDatabase db;
- if (db.Open())
- return db.GetAlbumById(GetID());
- return "";
-}
-
-bool CDirectoryNodeYearAlbum::GetContent(CFileItemList& items) const
-{
- CMusicDatabase musicdatabase;
- if (!musicdatabase.Open())
- return false;
-
- CQueryParams params;
- CollectQueryParams(params);
-
- bool bSuccess=musicdatabase.GetAlbumsByYear(BuildPath(), items, params.GetYear());
-
- musicdatabase.Close();
-
- return bSuccess;
-}
diff --git a/xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeYearAlbum.h b/xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeYearAlbum.h
deleted file mode 100644
index fe26e4fd60..0000000000
--- a/xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeYearAlbum.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (C) 2005-2018 Team Kodi
- * This file is part of Kodi - https://kodi.tv
- *
- * SPDX-License-Identifier: GPL-2.0-or-later
- * See LICENSES/README.md for more information.
- */
-
-#pragma once
-
-#include "DirectoryNode.h"
-
-namespace XFILE
-{
- namespace MUSICDATABASEDIRECTORY
- {
- class CDirectoryNodeYearAlbum : public CDirectoryNode
- {
- public:
- CDirectoryNodeYearAlbum(const std::string& strName, CDirectoryNode* pParent);
- protected:
- NODE_TYPE GetChildType() const override;
- bool GetContent(CFileItemList& items) const override;
- std::string GetLocalizedName() const override;
- };
- }
-}
-
-
diff --git a/xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeYearSong.cpp b/xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeYearSong.cpp
deleted file mode 100644
index b66b0bfbb1..0000000000
--- a/xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeYearSong.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2005-2018 Team Kodi
- * This file is part of Kodi - https://kodi.tv
- *
- * SPDX-License-Identifier: GPL-2.0-or-later
- * See LICENSES/README.md for more information.
- */
-
-#include "DirectoryNodeYearSong.h"
-
-#include "QueryParams.h"
-#include "music/MusicDatabase.h"
-
-using namespace XFILE::MUSICDATABASEDIRECTORY;
-
-CDirectoryNodeYearSong::CDirectoryNodeYearSong(const std::string& strName, CDirectoryNode* pParent)
- : CDirectoryNode(NODE_TYPE_YEAR_SONG, strName, pParent)
-{
-
-}
-
-bool CDirectoryNodeYearSong::GetContent(CFileItemList& items) const
-{
- CMusicDatabase musicdatabase;
- if (!musicdatabase.Open())
- return false;
-
- CQueryParams params;
- CollectQueryParams(params);
-
- std::string strBaseDir=BuildPath();
- bool bSuccess=musicdatabase.GetSongsByYear(strBaseDir, items, params.GetYear());
-
- musicdatabase.Close();
-
- return bSuccess;
-}
diff --git a/xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeYearSong.h b/xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeYearSong.h
deleted file mode 100644
index fb70450a9e..0000000000
--- a/xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeYearSong.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (C) 2005-2018 Team Kodi
- * This file is part of Kodi - https://kodi.tv
- *
- * SPDX-License-Identifier: GPL-2.0-or-later
- * See LICENSES/README.md for more information.
- */
-
-#pragma once
-
-#include "DirectoryNode.h"
-
-namespace XFILE
-{
- namespace MUSICDATABASEDIRECTORY
- {
- class CDirectoryNodeYearSong : public CDirectoryNode
- {
- public:
- CDirectoryNodeYearSong(const std::string& strName, CDirectoryNode* pParent);
- protected:
- bool GetContent(CFileItemList& items) const override;
- };
- }
-}
-
-
diff --git a/xbmc/filesystem/MusicDatabaseDirectory/QueryParams.cpp b/xbmc/filesystem/MusicDatabaseDirectory/QueryParams.cpp
index 6c991863bf..d1aa397bc2 100644
--- a/xbmc/filesystem/MusicDatabaseDirectory/QueryParams.cpp
+++ b/xbmc/filesystem/MusicDatabaseDirectory/QueryParams.cpp
@@ -38,17 +38,13 @@ void CQueryParams::SetQueryParam(NODE_TYPE NodeType, const std::string& strNodeN
break;
case NODE_TYPE_ALBUM_RECENTLY_PLAYED:
case NODE_TYPE_ALBUM_RECENTLY_ADDED:
- case NODE_TYPE_ALBUM_COMPILATIONS:
case NODE_TYPE_ALBUM_TOP100:
case NODE_TYPE_ALBUM:
- case NODE_TYPE_YEAR_ALBUM:
m_idAlbum=idDb;
break;
case NODE_TYPE_ALBUM_RECENTLY_ADDED_SONGS:
case NODE_TYPE_ALBUM_RECENTLY_PLAYED_SONGS:
case NODE_TYPE_ALBUM_TOP100_SONGS:
- case NODE_TYPE_ALBUM_COMPILATIONS_SONGS:
- case NODE_TYPE_YEAR_SONG:
case NODE_TYPE_SONG:
case NODE_TYPE_SONG_TOP100:
m_idSong=idDb;
diff --git a/xbmc/music/GUIViewStateMusic.cpp b/xbmc/music/GUIViewStateMusic.cpp
index 67b89a0ec5..94a3e2d788 100644
--- a/xbmc/music/GUIViewStateMusic.cpp
+++ b/xbmc/music/GUIViewStateMusic.cpp
@@ -159,9 +159,7 @@ CGUIViewStateMusicDatabase::CGUIViewStateMusicDatabase(const CFileItemList& item
SetSortOrder(viewState->m_sortDescription.sortOrder);
}
break;
- case NODE_TYPE_ALBUM_COMPILATIONS:
case NODE_TYPE_ALBUM:
- case NODE_TYPE_YEAR_ALBUM:
{
// album
AddSortMethod(SortByAlbum, sortAttribute, 558, LABEL_MASKS("%F", "", strAlbum, "%A")); // Filename, empty | Userdefined (default=%B), Artist
@@ -251,9 +249,7 @@ CGUIViewStateMusicDatabase::CGUIViewStateMusicDatabase(const CFileItemList& item
SetSortOrder(viewState->m_sortDescription.sortOrder);
}
break;
- case NODE_TYPE_ALBUM_COMPILATIONS_SONGS:
case NODE_TYPE_ALBUM_TOP100_SONGS:
- case NODE_TYPE_YEAR_SONG:
case NODE_TYPE_SONG:
{
AddSortMethod(SortByTrackNumber, 554, LABEL_MASKS(strTrack, "%D")); // Userdefined, Duration| empty, empty
@@ -309,15 +305,11 @@ void CGUIViewStateMusicDatabase::SaveViewState()
case NODE_TYPE_ARTIST:
SaveViewToDb(m_items.GetPath(), WINDOW_MUSIC_NAV, CViewStateSettings::GetInstance().Get("musicnavartists"));
break;
- case NODE_TYPE_ALBUM_COMPILATIONS:
case NODE_TYPE_ALBUM:
- case NODE_TYPE_YEAR_ALBUM:
SaveViewToDb(m_items.GetPath(), WINDOW_MUSIC_NAV, CViewStateSettings::GetInstance().Get("musicnavalbums"));
break;
case NODE_TYPE_SINGLES:
- case NODE_TYPE_ALBUM_COMPILATIONS_SONGS:
case NODE_TYPE_SONG:
- case NODE_TYPE_YEAR_SONG:
SaveViewToDb(m_items.GetPath(), WINDOW_MUSIC_NAV, CViewStateSettings::GetInstance().Get("musicnavsongs"));
break;
default:
diff --git a/xbmc/music/MusicDatabase.cpp b/xbmc/music/MusicDatabase.cpp
index 28e9b8b35c..8d468eb8fd 100644
--- a/xbmc/music/MusicDatabase.cpp
+++ b/xbmc/music/MusicDatabase.cpp
@@ -9016,30 +9016,6 @@ bool CMusicDatabase::GetGenresJSON(CFileItemList& items, bool bSources)
return false;
}
-bool CMusicDatabase::GetCompilationAlbums(const std::string& strBaseDir, CFileItemList& items)
-{
- CMusicDbUrl musicUrl;
- if (!musicUrl.FromString(strBaseDir))
- return false;
-
- musicUrl.AddOption("compilation", true);
-
- Filter filter;
- return GetAlbumsByWhere(musicUrl.ToString(), filter, items);
-}
-
-bool CMusicDatabase::GetCompilationSongs(const std::string& strBaseDir, CFileItemList& items)
-{
- CMusicDbUrl musicUrl;
- if (!musicUrl.FromString(strBaseDir))
- return false;
-
- musicUrl.AddOption("compilation", true);
-
- Filter filter;
- return GetSongsFullByWhere(musicUrl.ToString(), filter, items, SortDescription(), true);
-}
-
int CMusicDatabase::GetCompilationAlbumsCount()
{
return strtol(GetSingleValue("album", "count(idAlbum)", "bCompilation = 1").c_str(), NULL, 10);
diff --git a/xbmc/music/MusicDatabase.h b/xbmc/music/MusicDatabase.h
index bcd9e4ccc3..f7ddd24555 100644
--- a/xbmc/music/MusicDatabase.h
+++ b/xbmc/music/MusicDatabase.h
@@ -415,8 +415,6 @@ public:
/////////////////////////////////////////////////
// Compilations
/////////////////////////////////////////////////
- bool GetCompilationAlbums(const std::string& strBaseDir, CFileItemList& items);
- bool GetCompilationSongs(const std::string& strBaseDir, CFileItemList& items);
int GetCompilationAlbumsCount();
int GetSinglesCount();
diff --git a/xbmc/music/MusicDbUrl.cpp b/xbmc/music/MusicDbUrl.cpp
index 181bccd3a0..40f812c1ef 100644
--- a/xbmc/music/MusicDbUrl.cpp
+++ b/xbmc/music/MusicDbUrl.cpp
@@ -42,18 +42,14 @@ bool CMusicDbUrl::parse()
case NODE_TYPE_ALBUM_RECENTLY_ADDED:
case NODE_TYPE_ALBUM_RECENTLY_PLAYED:
case NODE_TYPE_ALBUM_TOP100:
- case NODE_TYPE_ALBUM_COMPILATIONS:
- case NODE_TYPE_YEAR_ALBUM:
m_type = "albums";
break;
case NODE_TYPE_ALBUM_RECENTLY_ADDED_SONGS:
case NODE_TYPE_ALBUM_RECENTLY_PLAYED_SONGS:
case NODE_TYPE_ALBUM_TOP100_SONGS:
- case NODE_TYPE_ALBUM_COMPILATIONS_SONGS:
case NODE_TYPE_SONG:
case NODE_TYPE_SONG_TOP100:
- case NODE_TYPE_YEAR_SONG:
case NODE_TYPE_SINGLES:
m_type = "songs";
break;
@@ -72,7 +68,6 @@ bool CMusicDbUrl::parse()
case NODE_TYPE_ALBUM_RECENTLY_ADDED:
case NODE_TYPE_ALBUM_RECENTLY_PLAYED:
case NODE_TYPE_ALBUM_TOP100:
- case NODE_TYPE_YEAR_ALBUM:
m_type = "albums";
break;
@@ -80,9 +75,7 @@ bool CMusicDbUrl::parse()
case NODE_TYPE_ALBUM_RECENTLY_ADDED_SONGS:
case NODE_TYPE_ALBUM_RECENTLY_PLAYED_SONGS:
case NODE_TYPE_ALBUM_TOP100_SONGS:
- case NODE_TYPE_ALBUM_COMPILATIONS_SONGS:
case NODE_TYPE_SONG_TOP100:
- case NODE_TYPE_YEAR_SONG:
case NODE_TYPE_SINGLES:
m_type = "songs";
break;
@@ -103,10 +96,6 @@ bool CMusicDbUrl::parse()
m_type = "years";
break;
- case NODE_TYPE_ALBUM_COMPILATIONS:
- m_type = "albums";
- break;
-
case NODE_TYPE_TOP100:
m_type = "top100";
break;
@@ -143,6 +132,10 @@ bool CMusicDbUrl::parse()
if (queryParams.GetYear() != -1)
AddOption("year", (int)queryParams.GetYear());
+ // Decode legacy use of "musicdb://compilations/" path for filtered albums
+ if (m_url.GetFileName() == "compilations/")
+ AddOption("compilation", true);
+
return true;
}
diff --git a/xbmc/music/windows/GUIWindowMusicNav.cpp b/xbmc/music/windows/GUIWindowMusicNav.cpp
index 0fdb6b329f..c5adfd8931 100644
--- a/xbmc/music/windows/GUIWindowMusicNav.cpp
+++ b/xbmc/music/windows/GUIWindowMusicNav.cpp
@@ -412,9 +412,7 @@ bool CGUIWindowMusicNav::GetDirectory(const std::string &strDirectory, CFileItem
if (node == NODE_TYPE_ALBUM ||
node == NODE_TYPE_ALBUM_RECENTLY_ADDED ||
node == NODE_TYPE_ALBUM_RECENTLY_PLAYED ||
- node == NODE_TYPE_ALBUM_TOP100 ||
- node == NODE_TYPE_ALBUM_COMPILATIONS ||
- node == NODE_TYPE_YEAR_ALBUM)
+ node == NODE_TYPE_ALBUM_TOP100)
items.SetContent("albums");
else if (node == NODE_TYPE_ARTIST)
items.SetContent("artists");
@@ -423,9 +421,7 @@ bool CGUIWindowMusicNav::GetDirectory(const std::string &strDirectory, CFileItem
node == NODE_TYPE_SINGLES ||
node == NODE_TYPE_ALBUM_RECENTLY_ADDED_SONGS ||
node == NODE_TYPE_ALBUM_RECENTLY_PLAYED_SONGS ||
- node == NODE_TYPE_ALBUM_COMPILATIONS_SONGS ||
- node == NODE_TYPE_ALBUM_TOP100_SONGS ||
- node == NODE_TYPE_YEAR_SONG)
+ node == NODE_TYPE_ALBUM_TOP100_SONGS)
items.SetContent("songs");
else if (node == NODE_TYPE_GENRE)
items.SetContent("genres");
diff --git a/xbmc/music/windows/MusicFileItemListModifier.cpp b/xbmc/music/windows/MusicFileItemListModifier.cpp
index 36a8c93530..dc03a8f6a0 100644
--- a/xbmc/music/windows/MusicFileItemListModifier.cpp
+++ b/xbmc/music/windows/MusicFileItemListModifier.cpp
@@ -83,9 +83,7 @@ void CMusicFileItemListModifier::AddQueuingFolder(CFileItemList& items)
case NODE_TYPE_ALBUM:
case NODE_TYPE_ALBUM_RECENTLY_PLAYED:
case NODE_TYPE_ALBUM_RECENTLY_ADDED:
- case NODE_TYPE_ALBUM_COMPILATIONS:
case NODE_TYPE_ALBUM_TOP100:
- case NODE_TYPE_YEAR_ALBUM:
pItem.reset(new CFileItem(g_localizeStrings.Get(15102))); // "All Albums"
musicUrl.AppendPath("-1/");
pItem->SetPath(musicUrl.ToString());
diff --git a/xbmc/network/upnp/UPnPInternal.cpp b/xbmc/network/upnp/UPnPInternal.cpp
index 1cd869b05a..3db48d9596 100644
--- a/xbmc/network/upnp/UPnPInternal.cpp
+++ b/xbmc/network/upnp/UPnPInternal.cpp
@@ -476,9 +476,7 @@ BuildObject(CFileItem& item,
}
break;
case MUSICDATABASEDIRECTORY::NODE_TYPE_ALBUM:
- case MUSICDATABASEDIRECTORY::NODE_TYPE_ALBUM_COMPILATIONS:
- case MUSICDATABASEDIRECTORY::NODE_TYPE_ALBUM_RECENTLY_ADDED:
- case MUSICDATABASEDIRECTORY::NODE_TYPE_YEAR_ALBUM: {
+ case MUSICDATABASEDIRECTORY::NODE_TYPE_ALBUM_RECENTLY_ADDED: {
container->m_ObjectClass.type += ".album.musicAlbum";
// for Sonos to be happy
CMusicInfoTag *tag = item.GetMusicInfoTag();