mirror of
https://github.com/mue/mue.git
synced 2026-06-11 19:18:57 +02:00
fix: quote image copyright text
This commit is contained in:
@@ -132,13 +132,11 @@ export default class Quote extends PureComponent {
|
||||
)
|
||||
).json();
|
||||
|
||||
const license =
|
||||
authorimglicensedata.query.pages[Object.keys(authorimglicensedata.query.pages)[0]]
|
||||
.imageinfo[0].extmetadata.LicenseShortName;
|
||||
const photographer =
|
||||
authorimglicensedata.query.pages[Object.keys(authorimglicensedata.query.pages)[0]]
|
||||
.imageinfo[0].extmetadata.Attribution || 'Unknown';
|
||||
authorimglicense = `© ${photographer.value}. ${license.value}`;
|
||||
const metadata = authorimglicensedata.query.pages[Object.keys(authorimglicensedata.query.pages)[0]].imageinfo[0].extmetadata;
|
||||
const license = metadata.LicenseShortName;
|
||||
const photographer = metadata.Attribution.value || metadata.Artist?.value.match(/<a.+>(?<name>.+)<\/a>/i)?.groups.name || 'Unknown';
|
||||
authorimglicense = `© ${photographer}. ${license.value}`;
|
||||
authorimglicense = authorimglicense.replace(/copyright\s/i, '').replace(/©\s©\s/, '© ');
|
||||
|
||||
if (license.value === 'Public domain') {
|
||||
authorimglicense = null;
|
||||
|
||||
Reference in New Issue
Block a user