-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
[Music]Fix change of information provider for albums and artists #12597
Conversation
jenkins build this please |
Test build available as 9095c13, so for win32 in particular (Spotted a rebasing error that left repeated tag in exported NFOs. Fixed but not in test build) |
ae0486d
to
c761c43
Compare
Some discussion on Slack if "Set for this artist", "Set for all artists shown", and "Set default information provider" are acceptale on a menu. That latter is long enough to need scrolling on Estuary, and translations will probably be longer. Meanwhile getting some test feedback on the forum. Build errors not related to this PR |
c761c43
to
a130a8e
Compare
New test build available as 20170809-ec166d8, but for win32 in particular (had to kick off another build) it is http://mirrors.kodi.tv/test-builds/windows/win32/KodiSetup-20170809-a130a8e139-InfoSettings-x86.exe |
Created about a dozen test cases, also did some free-play testing. All tests passed (DB state consistent with info provider changes made via the UI). |
This change has received thorough testing, see https://forum.kodi.tv/showthread.php?tid=319356 so I would like to merge it. Any team member care to review it? |
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.
some nitpicks and the find("?") needs a fix
@@ -121,7 +121,8 @@ void CMusicDatabaseDirectory::ClearDirectoryCache(const std::string& strDirector | |||
|
|||
bool CMusicDatabaseDirectory::IsAllItem(const std::string& strDirectory) | |||
{ | |||
if (StringUtils::EndsWith(strDirectory, "/-1/")) | |||
//Last query parameter, ignoring any appended options is -1 | |||
if (StringUtils::EndsWith(strDirectory.substr(0, strDirectory.find("?")), "/-1/")) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
xbmc/music/MusicDatabase.h
Outdated
@@ -429,8 +425,9 @@ class CMusicDatabase : public CDatabase | |||
///////////////////////////////////////////////// | |||
// Scraper | |||
///////////////////////////////////////////////// | |||
bool SetScraperForPath(const std::string& strPath, const ADDON::ScraperPtr& info); | |||
bool GetScraperForPath(const std::string& strPath, ADDON::ScraperPtr& info, const ADDON::TYPE &type); | |||
bool SetScraper(int id, const CONTENT_TYPE &content, const ADDON::ScraperPtr& scraper); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -253,6 +254,138 @@ std::string CGUIWindowMusicNav::GetQuickpathName(const std::string& strPath) con | |||
} | |||
} | |||
|
|||
bool CGUIWindowMusicNav::ManageInfoProvider(const CFileItemPtr &item) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
MusicDB changes: Add release group MBID, scrapedMBID flag and lastScraped to views. GetAlbum and GetArtist now fetch these values, so remove separate queries for values. This fixes loss of release group MBID when refreshing with a scraper that does not return release group id e.g. TADB scraper or from NFO files, and needed for JSON API exposure of properties. Rework info provider settings to be artist and album id specific rather than path. Replace content with infosetting table and store idSetting in artist and album tables. Add clean up of orphaned settings. Remove albuminfosong table, storing scraped tracks is deprecated. Fix having "Change information provider" on context menu for parent folder and *all items. IsAllItem() handles paths with options at the end. Fix refresh of information for all items within this path after info provider change for a single artist or album. Add facility to set information provider for multiple artists or albums. Unlike the path based attempt before this works. From context menu set information provider for a) current item, b) all items on node, c) default (for all).
a130a8e
to
873c1a3
Compare
@Paxxi have fixed your comments, thanks for those. Could you approve, please check you are happy with |
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.
looks good to me
A follow up from #12120, the improvements to scraping additional artist and album information, that fixes flaws in how changes to artist and album information providers are selected and applied.
Music DB schema changes include:
The "Change Info provider" context menu action was truely broken, especially on saying saying yes to the subsequent "Do you want to refresh information for all items within this path?". For example:
Also "content" (if anyone did use this feature) was not cleaned up when orphaned.
The user access to set/clear these settings was also so limited as to be useless.
I suspect that all users have done in the past is to set the default settings, and then apply them to everything uniformly.
This PR addresses both aspects, to do this there is a UX/UI change
a) current item,
b) all items on node, filtered by criteria
c) default (for all).
This is followed by the
CGUIDialogContentSetting
dialog to select the info provider addon to use and change settings. Then a comfirmation message is displayed before the setting change is applied. Finally the user is asked if they want to query for additional information using these settings immediately (otherwise they can use "Query Info For all" later).This gives the facility to set information provider for multiple artists or albums, and to reset to default, without cluttering ordinary music library use.