Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
143 changes: 135 additions & 8 deletions addons/resource.language.en_gb/resources/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ msgstr ""

#: Unknown
#: xbmc/music/windows/GUIWindowMusicBase.cpp
#: xbmc/music/windows/GUIWindowMusicNav.cpp
#: xbmc/video/windows/GUIWindowVideoBase.cpp
#: xbmc/windows/GUIWindowFileManager.cpp
msgctxt "#6"
Expand Down Expand Up @@ -8824,6 +8823,7 @@ msgstr ""
#. Label for a context menu entry that opens a submenu with further actions for the selected item
#: xbmc/pvr/windows/GUIWindowPVRChannels.cpp
#: xbmc/video/windows/GUIWindowVideoNav.cpp
#: xbmc/music/windows/GUIWindowMusicNav.cpp
msgctxt "#16106"
msgid "Manage..."
msgstr ""
Expand Down Expand Up @@ -11980,10 +11980,7 @@ msgctxt "#20058"
msgid "Add profile..."
msgstr ""

#. Context menu entry
msgctxt "#20059"
msgid "Query info for all albums"
msgstr ""
#empty string with id 20059

#: addons/skin.estuary/xml/Variables.xml
msgctxt "#20060"
Expand Down Expand Up @@ -14554,9 +14551,7 @@ msgctxt "#21883"
msgid "Saved music"
msgstr ""

msgctxt "#21884"
msgid "Query info for all artists"
msgstr ""
#empty string with id 21884

msgctxt "#21885"
msgid "Downloading album information"
Expand Down Expand Up @@ -21811,6 +21806,7 @@ msgstr ""

#. Group header describing the settings
#: xbmc/music/dialogs/GUIDialogInfoProviderSettings.cpp
#: xbmc/music/dialogs/GUIDialogRefreshSettings.cpp
msgctxt "#38337"
msgid "Options for fetching additional information"
msgstr ""
Expand Down Expand Up @@ -22248,3 +22244,134 @@ msgstr ""
msgctxt "#39142"
msgid "Custom"
msgstr ""
msgstr ""

#. Context menu entry
#: xbmc/music/windows/GUIWindowMusicNav.cpp
msgctxt "#39147"
msgid "Refresh information and artwork"
msgstr ""

#. Dialog heading
#: xbmc/music/dialogs/GUIDialogRefreshSettings.cpp
msgctxt "#39148"
msgid "Refresh artist information and artwork"
msgstr ""

#. Dialog heading
#: xbmc/music/dialogs/GUIDialogRefreshSettings.cpp
msgctxt "#39149"
msgid "Refresh album information and artwork"
msgstr ""

#. Item in selection list indicating do action on selected specific artist
#: xbmc/music/dialogs/GUIDialogRefreshSettings.cpp
msgctxt "#39150"
msgid "This artist"
msgstr ""

#. Item in selection list indicating do action on all artists in node
#: xbmc/music/dialogs/GUIDialogRefreshSettings.cpp
msgctxt "#39151"
msgid "All artists shown"
msgstr ""

#. Item in selection list indicating do action on all artists in library
#: xbmc/music/dialogs/GUIDialogRefreshSettings.cpp
msgctxt "#39152"
msgid "All artists in library"
msgstr ""

#. Item in selection list indicating do action on selected specific album
#: xbmc/music/dialogs/GUIDialogRefreshSettings.cpp
msgctxt "#39153"
msgid "This album"
msgstr ""

#. Item in selection list indicating do action on all albums in node
#: xbmc/music/dialogs/GUIDialogRefreshSettings.cpp
msgctxt "#39154"
msgid "All albums shown"
msgstr ""

#. Item in selection list indicating do action on all albums in library
#: xbmc/music/dialogs/GUIDialogRefreshSettings.cpp
msgctxt "#39155"
msgid "All albums in library"
msgstr ""

#: xbmc/music/dialogs/GUIDialogRefreshSettings.cpp
msgctxt "#39157"
msgid "Refresh..."
msgstr ""

#. Heading when selecting from list for #39147
#: xbmc/music/dialogs/GUIDialogRefreshSettings.cpp
msgctxt "#39158"
msgid "Refresh information and artwork for"
msgstr ""

#. Toggle scraping option - skip scraped artists
#: xbmc/music/dialogs/GUIDialogRefreshSettings.cpp
msgctxt "#39159"
msgid "Skip those artists with previously fetched information"
msgstr ""

#. Toggle scraping option - skip scraped albums
#: xbmc/music/dialogs/GUIDialogRefreshSettings.cpp
msgctxt "#39160"
msgid "Skip those albums with previously fetched information"
msgstr ""

#. Toggle scraping option
#: xbmc/music/dialogs/GUIDialogRefreshSettings.cpp
msgctxt "#39161"
msgid "Ignore NFO files and fetch remote information"
msgstr ""

#. Toggle scraping option
#: xbmc/music/dialogs/GUIDialogRefreshSettings.cpp
msgctxt "#39162"
msgid "Replace currently selected artwork"
msgstr ""

#. Indication of what is going to be refreshed - single artist
#: xbmc/music/dialogs/GUIDialogRefreshSettings.cpp
msgctxt "#39163"
msgid "Refresh information and artwork for this artist now?"
msgstr ""

#. Indication of what is going to be refreshed - many artists
#: xbmc/music/dialogs/GUIDialogRefreshSettings.cpp
msgctxt "#39164"
msgid "Refresh information and artwork for all these artists now?"
msgstr ""

#. Indication of what is going to be refreshed - single album
#: xbmc/music/dialogs/GUIDialogRefreshSettings.cpp
msgctxt "#39165"
msgid "Refresh information and artwork for this album now?"
msgstr ""

#. Indication of what is going to be refreshed - many albums
#: xbmc/music/dialogs/GUIDialogRefreshSettings.cpp
msgctxt "#39166"
msgid "Refresh information and artwork for all these albums now?"
msgstr ""

#. Toggle scraping option
#: xbmc/music/dialogs/GUIDialogRefreshSettings.cpp
msgctxt "#39171"
msgid "Replace all previously fetched artist information"
msgstr ""

#. Toggle scraping option
#: xbmc/music/dialogs/GUIDialogRefreshSettings.cpp
msgctxt "#39172"
msgid "Replace all previously fetched album information"
msgstr ""

#: xbmc/music/dialogs/GUIDialogRefreshSettings.cpp
msgctxt "#39173"
msgid "Merge Options (Access settings controling fields overwritten)"
msgstr ""
3 changes: 2 additions & 1 deletion xbmc/dialogs/GUIDialogContextMenu.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ enum CONTEXT_BUTTON { CONTEXT_BUTTON_CANCELLED = 0,
CONTEXT_BUTTON_EDIT,
CONTEXT_BUTTON_EDIT_SMART_PLAYLIST,
CONTEXT_BUTTON_INFO,
CONTEXT_BUTTON_INFO_ALL,
CONTEXT_BUTTON_REFRESH_INFO,
CONTEXT_BUTTON_MANAGE,
CONTEXT_BUTTON_CDDB,
CONTEXT_BUTTON_SCAN,
CONTEXT_BUTTON_SCAN_TO_LIBRARY,
Expand Down
3 changes: 3 additions & 0 deletions xbmc/guilib/GUIWindowManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "messaging/helpers/DialogHelper.h"
#include "music/dialogs/GUIDialogInfoProviderSettings.h"
#include "music/dialogs/GUIDialogMusicInfo.h"
#include "music/dialogs/GUIDialogRefreshSettings.h"
#include "music/windows/GUIWindowMusicNav.h"
#include "music/windows/GUIWindowMusicPlaylist.h"
#include "music/windows/GUIWindowMusicPlaylistEditor.h"
Expand Down Expand Up @@ -233,6 +234,7 @@ void CGUIWindowManager::CreateWindows()
Add(new CGUIDialogLibExportSettings);

Add(new CGUIDialogInfoProviderSettings);
Add(new CGUIDialogRefreshSettings);

Add(new CGUIDialogPlayEject);

Expand Down Expand Up @@ -341,6 +343,7 @@ bool CGUIWindowManager::DestroyWindows()
DestroyWindow(WINDOW_DIALOG_VIDEO_BOOKMARKS);
DestroyWindow(WINDOW_DIALOG_CONTENT_SETTINGS);
DestroyWindow(WINDOW_DIALOG_INFOPROVIDER_SETTINGS);
DestroyWindow(WINDOW_DIALOG_MUSICREFRESH_SETTINGS);
DestroyWindow(WINDOW_DIALOG_LIBEXPORT_SETTINGS);
DestroyWindow(WINDOW_DIALOG_FAVOURITES);
DestroyWindow(WINDOW_DIALOG_SONG_INFO);
Expand Down
1 change: 1 addition & 0 deletions xbmc/guilib/WindowIDs.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
#define WINDOW_DIALOG_INFOPROVIDER_SETTINGS 10158
#define WINDOW_DIALOG_SUBTITLE_OSD_SETTINGS 10159
#define WINDOW_DIALOG_BUSY_NOCANCEL 10160
#define WINDOW_DIALOG_MUSICREFRESH_SETTINGS 10161

#define WINDOW_MUSIC_PLAYLIST 10500
#define WINDOW_MUSIC_NAV 10502
Expand Down
1 change: 1 addition & 0 deletions xbmc/input/WindowTranslator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ const CWindowTranslator::WindowMapByName CWindowTranslator::WindowMappingByName
{"musicplaylist", WINDOW_MUSIC_PLAYLIST},
{"musicplaylisteditor", WINDOW_MUSIC_PLAYLIST_EDITOR},
{"infoprovidersettings", WINDOW_DIALOG_INFOPROVIDER_SETTINGS},
{"musicrefreshsettings", WINDOW_DIALOG_MUSICREFRESH_SETTINGS},
{"teletext", WINDOW_DIALOG_OSD_TELETEXT},
{"selectdialog", WINDOW_DIALOG_SELECT},
{"musicinformation", WINDOW_DIALOG_MUSIC_INFO},
Expand Down
129 changes: 129 additions & 0 deletions xbmc/music/Artist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,135 @@ void CArtist::MergeScrapedArtist(const CArtist& source, bool override /* = true
discography = source.discography;
}

void CArtist::MergeScrapedArtist(const CArtist& source, const std::string& strReplaceFields)
{
/*
Initial scraping of artist information when the mbid is derived from tags is done directly
using that ID, otherwise the lookup is based on name and can mis-identify the artist
(many have same name). It is useful to store the scraped mbid, but we need to be
able to correct any mistakes. Hence a manual refresh of artist information uses either
the mbid is derived from tags or the artist name, not any previously scraped mbid.

A Musicbrainz artist ID derived from music file tags is always taken as accurate and so can
not be overwritten by a scraped value. When the artist does not already have an mbid or has
a previously scraped mbid, merge the new scraped value, flagging it as being from the
scraper rather than derived from music file tags.
*/
if (!source.strMusicBrainzArtistID.empty() && (strMusicBrainzArtistID.empty() || bScrapedMBID))
{
strMusicBrainzArtistID = source.strMusicBrainzArtistID;
bScrapedMBID = true;
}

// Only full empty artist name and sortname values
if (strArtist.empty())
strArtist = source.strArtist;
if (strSortName.empty())
strSortName = source.strSortName;

bool bType(true);
bool bGender(true);
bool bDisambiguation(true);
bool bGenre(true);
bool bBio(true);
bool bStyles(true);
bool bMoods(true);
bool bInstruments(true);
bool bBorn(true);
bool bFormed(true);
bool bDied(true);
bool bDisbanded(true);
bool bYearsActive(true);
bool bArtURL(true);
bool bDiscography(true);

std::vector<std::string> fields;
if (!strReplaceFields.empty())
{
bType = false;
bGender = false;
bDisambiguation = false;
bGenre = false;
bBio = false;
bStyles = false;
bMoods = false;
bInstruments = false;
bBorn = false;
bFormed = false;
bDied = false;
bDisbanded = false;
bYearsActive = false;
bArtURL = false;
bDiscography = false;
fields = StringUtils::Split(strReplaceFields, ",");
for (const auto& f : fields)
{
if (f == "type")
bType = true;
else if (f == "gender")
bGender = true;
else if (f == "disambiguation")
bDisambiguation = true;
else if (f == "genre")
bGenre = true;
else if (f == "biography")
bBio = true;
else if (f == "styles")
bStyles = true;
else if (f == "moods")
bMoods = true;
else if (f == "instruments")
bInstruments = true;
else if (f == "born")
bBorn = true;
else if (f == "formed")
bFormed = true;
else if (f == "died")
bDied = true;
else if (f == "disbanded")
bDisbanded = true;
else if (f == "yearsactive")
bYearsActive = true;
else if (f == "art")
bArtURL = true;
else if (f == "Discography")
bDiscography = true;
}
}

if (bType || strType.empty())
strType = source.strType;
if (bGender || strGender.empty())
strGender = source.strGender;
if (bDisambiguation || strDisambiguation.empty())
strDisambiguation = source.strDisambiguation;
if (bGenre || genre.empty())
genre = source.genre;
if (bBio || strBiography.empty())
strBiography = source.strBiography;
if (bStyles || styles.empty())
styles = source.styles;
if (bMoods || moods.empty())
moods = source.moods;
if (bInstruments || instruments.empty())
instruments = source.instruments;
if (bBorn || strBorn.empty())
strBorn = source.strBorn;
if (bFormed || strFormed.empty())
strFormed = source.strFormed;
if (bDied || strDied.empty())
strDied = source.strDied;
if (bDisbanded || strDisbanded.empty())
strDisbanded = source.strDisbanded;
if (bYearsActive || yearsActive.empty())
yearsActive = source.yearsActive;
if (bArtURL || !thumbURL.HasData())
thumbURL = source.thumbURL; // Available remote thumbs
if (bArtURL || fanart.GetNumFanarts() == 0)
fanart = source.fanart; // Available remote fanart
if (bDiscography || discography.empty())
discography = source.discography;
}

bool CArtist::Load(const TiXmlElement *artist, bool append, bool prioritise)
{
Expand Down
1 change: 1 addition & 0 deletions xbmc/music/Artist.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class CArtist
}

void MergeScrapedArtist(const CArtist& source, bool override = true);
void MergeScrapedArtist(const CArtist& source, const std::string& strReplaceFields);

void Reset()
{
Expand Down
Loading