-
Notifications
You must be signed in to change notification settings - Fork 0
Add the ability for Kodi to properly navigate Box Sets #1
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
base: master
Are you sure you want to change the base?
Changes from all commits
d8d7799
bdca0e7
695590b
4a5357d
e9dd60a
bfe3e88
f1ab740
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2192,6 +2192,7 @@ msgctxt "#470" | |
| msgid "Credits" | ||
| msgstr "" | ||
|
|
||
|
|
||
| #empty strings from id 471 to 473 | ||
|
|
||
| msgctxt "#474" | ||
|
|
@@ -2389,7 +2390,7 @@ msgctxt "#519" | |
| msgid "Launch in..." | ||
| msgstr "" | ||
|
|
||
| #empty string with id 520 | ||
| #: empty string 520 | ||
|
|
||
| #: xbmc/filesystem/MusicDatabaseDirectory/DirectoryNodeOverview.cpp | ||
| msgctxt "#521" | ||
|
|
@@ -8522,7 +8523,17 @@ msgctxt "#15311" | |
| msgid "Path:" | ||
| msgstr "" | ||
|
|
||
| #empty strings from id 15312 to 15999 | ||
| #: addons/skin.estuary/xml/Variables.xml | ||
| msgctxt "#15312" | ||
| msgid "Disc number" | ||
| msgstr "" | ||
|
|
||
| #: addons/skin.estuary/xml/Variables.xml | ||
| msgctxt "#15313" | ||
| msgid "Disc title" | ||
| msgstr "" | ||
|
|
||
| #empty strings from id 15314 to 15999 | ||
|
|
||
| #: system/settings/settings.xml | ||
| msgctxt "#16000" | ||
|
|
@@ -12764,7 +12775,8 @@ msgctxt "#20340" | |
| msgid "Do you want to remove all items within this path from your library?" | ||
| msgstr "" | ||
|
|
||
| #empty string with id 20341 | ||
| #: empty string #20341 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Revert to original text/spaces |
||
|
|
||
|
|
||
| #: xbmc/dialogs/GUIDialogMediaFilter.cpp | ||
| #: xbmc/dialogs/GUIDialogSmartPlaylistEditor.cpp | ||
|
|
@@ -21145,8 +21157,12 @@ msgctxt "#38073" | |
| msgid "Do you want to refresh information for this item now?" | ||
| msgstr "" | ||
|
|
||
| #empty strings from id 38074 to 38099 | ||
| #strings 38074 to 38099 reserved for music library | ||
| msgctxt "#38074" | ||
| msgid "Box-sets" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "Box-sets", "Box sets".... hyphen consistency? |
||
| msgstr "" | ||
|
|
||
| #empty strings from id 38075 to 38099 | ||
| #strings 38075 to 38099 reserved for music library | ||
|
|
||
| #. Description of section #14200 "Player"" | ||
| #: system/settings/settings.xml | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> | ||
| <node order="99" type="folder" visible="Library.HasContent(boxsets)"> | ||
| <label>Boxsets</label> | ||
| <icon>DefaultSets.png</icon> | ||
| <path>musicdb://boxsets/</path> | ||
| </node> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| /* | ||
| * 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 "DirectoryNodeBoxsetDiscSongs.h" | ||
|
|
||
| #include "QueryParams.h" | ||
| #include "guilib/LocalizeStrings.h" | ||
| #include "music/MusicDatabase.h" | ||
|
|
||
| using namespace XFILE::MUSICDATABASEDIRECTORY; | ||
|
|
||
| CDirectoryNodeBoxsetDiscSongs::CDirectoryNodeBoxsetDiscSongs(const std::string& strName, CDirectoryNode* pParent) | ||
| : CDirectoryNode(NODE_TYPE_BOXSET_DISC_SONGS, strName, pParent) | ||
| { | ||
|
|
||
| } | ||
|
|
||
| NODE_TYPE CDirectoryNodeBoxsetDiscSongs::GetChildType() const | ||
| { | ||
| return NODE_TYPE_BOXSET_DISC_SONGS; | ||
| } | ||
| std::string CDirectoryNodeBoxsetDiscSongs::GetLocalizedName() const | ||
| { | ||
|
|
||
| if (GetID() == -1) | ||
| return g_localizeStrings.Get(15102); // All Albums | ||
| return ""; | ||
| } | ||
|
|
||
| bool CDirectoryNodeBoxsetDiscSongs::GetContent(CFileItemList& items) const | ||
| { | ||
| CMusicDatabase musicdatabase; | ||
| if (!musicdatabase.Open()) | ||
| return false; | ||
|
|
||
| CQueryParams params; | ||
| CollectQueryParams(params); | ||
|
|
||
| bool bSuccess=musicdatabase.GetBoxsetDiscSongs(BuildPath(), items); | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is this method and node doing that is different from
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah well, I guess I could ask you what's the difference between CDirectoryNodeSong and CDirectoryAlbumCompilationSongs because I don't think that is needed either. You shouldn't need the "compilations" flag when getting the songs as all the albums in items are already compilations and thus returning the songs for each album is enough. I've tested that funnily enough and it works fine. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes exactly, CDirectoryAlbumCompilationSongs is historic and superseded. |
||
| musicdatabase.Close(); | ||
|
|
||
| return bSuccess; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| /* | ||
| * 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 CDirectoryNodeBoxsetDiscSongs : public CDirectoryNode | ||
| { | ||
| public: | ||
| CDirectoryNodeBoxsetDiscSongs(const std::string& strName, CDirectoryNode* pParent); | ||
| protected: | ||
| NODE_TYPE GetChildType() const override; | ||
| bool GetContent(CFileItemList& items) const override; | ||
| std::string GetLocalizedName() const override; | ||
| }; | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| /* | ||
| * 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 "DirectoryNodeBoxsetDiscs.h" | ||
|
|
||
| #include "QueryParams.h" | ||
| #include "guilib/LocalizeStrings.h" | ||
| #include "music/MusicDatabase.h" | ||
|
|
||
| using namespace XFILE::MUSICDATABASEDIRECTORY; | ||
|
|
||
| CDirectoryNodeBoxsetDiscs::CDirectoryNodeBoxsetDiscs(const std::string& strName, CDirectoryNode* pParent) | ||
| : CDirectoryNode(NODE_TYPE_BOXSET_DISCS, strName, pParent) | ||
| { | ||
|
|
||
| } | ||
|
|
||
| NODE_TYPE CDirectoryNodeBoxsetDiscs::GetChildType() const | ||
| { | ||
| return NODE_TYPE_BOXSET_DISC_SONGS; | ||
| } | ||
|
|
||
| std::string CDirectoryNodeBoxsetDiscs::GetLocalizedName() const | ||
| { | ||
|
|
||
| if (GetID() == -1) | ||
| return g_localizeStrings.Get(15102); // All Albums | ||
| return ""; | ||
| } | ||
|
|
||
| bool CDirectoryNodeBoxsetDiscs::GetContent(CFileItemList& items) const | ||
| { | ||
| CMusicDatabase musicdatabase; | ||
| if (!musicdatabase.Open()) | ||
| return false; | ||
|
|
||
| CQueryParams params; | ||
| CollectQueryParams(params); | ||
|
|
||
| bool bSuccess=musicdatabase.GetBoxsetDiscs(BuildPath(), items, params.GetAlbumId()); | ||
|
|
||
| musicdatabase.Close(); | ||
|
|
||
| return bSuccess; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert to original text