2017-06-20 04:34:34 +02:00
|
|
|
const logger = require('winston');
|
|
|
|
|
2017-06-17 22:51:30 +02:00
|
|
|
module.exports = ({ value }) => {
|
2017-06-20 04:34:34 +02:00
|
|
|
logger.debug('checking isFreePublicClaim ?');
|
2017-06-17 22:51:30 +02:00
|
|
|
if (
|
|
|
|
(value.stream.metadata.license.indexOf('Public Domain') !== -1 || value.stream.metadata.license.indexOf('Creative Commons') !== -1) &&
|
|
|
|
(!value.stream.metadata.fee || value.stream.metadata.fee.amount === 0)
|
|
|
|
) {
|
2017-06-19 18:37:35 +02:00
|
|
|
return true;
|
2017-06-17 22:51:30 +02:00
|
|
|
} else {
|
2017-06-19 18:37:35 +02:00
|
|
|
return false;
|
2017-06-17 22:51:30 +02:00
|
|
|
}
|
2017-06-19 18:37:35 +02:00
|
|
|
};
|