SUMMARY *** At the moment the bingprovider retrieves the title from the node title from the JSON from https://www.bing.com/HPImageArchive.aspx?forma This node title has always the text "Info". The code for the bingprovide already retrieves the title from the copyright, but checks if the Title node is empty. I think by removing lines 75 to 78 will fix this issue. This way we will respect the full credentials from the author of the photo. *** In bingprovider.cpp from line 65. ´ // Parse the title and the copyright text from the json data // Example copyright text: "草丛中的母狮和它的幼崽,南非 (© Andrew Coleman/Getty Images)" const QString copyright = imageObject.value(QStringLiteral("copyright")).toString(); const QRegularExpression copyrightRegEx(QStringLiteral("(.+?)[\\((](.+?)[\\))]")); if (const QRegularExpressionMatch match = copyrightRegEx.match(copyright); match.hasMatch()) { // In some regions "title" is empty, so extract the title from the copyright text. m_title = match.captured(1).trimmed(); m_author = match.captured(2).remove(QStringLiteral("©")).trimmed(); } const QString title = imageObject.value(QStringLiteral("title")).toString(); if (!title.isEmpty()) { m_title = title; }
Please feel free to submit a merge request for this change! The code lives at https://invent.kde.org/plasma/kdeplasma-addons/.
I understand that this is the way. It is that at the moment I don´t have a clone of this repo anymore and I don´t have time to do this. If it is only possible with a CR, I respect that and we need to close this small request.