2018-04-27 18:54:36 +02:00
|
|
|
const logger = require('winston');
|
2018-06-06 04:34:24 +02:00
|
|
|
const { details, publishing } = require('@config/siteConfig');
|
2018-04-27 18:54:36 +02:00
|
|
|
|
2019-02-23 06:52:31 +01:00
|
|
|
const createThumbnailPublishParams = (thumbnailFilePath, claimName, license, licenseUrl, nsfw) => {
|
2018-04-27 18:54:36 +02:00
|
|
|
if (!thumbnailFilePath) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
logger.debug(`Creating Thumbnail Publish Parameters`);
|
|
|
|
// create the publish params
|
|
|
|
return {
|
2019-02-23 06:52:31 +01:00
|
|
|
name: `${claimName}-thumb`,
|
2018-04-27 18:54:36 +02:00
|
|
|
file_path: thumbnailFilePath,
|
2019-02-23 06:52:31 +01:00
|
|
|
bid: publishing.fileClaimBidAmount,
|
2019-05-24 19:09:07 +02:00
|
|
|
title: `${claimName} thumbnail`,
|
|
|
|
description: `a thumbnail for ${claimName}`,
|
|
|
|
author: details.title,
|
|
|
|
languages: ['en'],
|
|
|
|
license,
|
|
|
|
license_url: licenseUrl,
|
2018-04-27 18:54:36 +02:00
|
|
|
claim_address: publishing.primaryClaimAddress,
|
2019-02-23 06:52:31 +01:00
|
|
|
channel_name: publishing.thumbnailChannel,
|
|
|
|
channel_id: publishing.thumbnailChannelId,
|
2018-04-27 18:54:36 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = createThumbnailPublishParams;
|