forked from blallo/rss-bridge
discogs: avoid negative timestamp
This commit is contained in:
parent
3bd64b905f
commit
756ec7610d
1 changed files with 2 additions and 0 deletions
|
@ -63,6 +63,8 @@ class DiscogsBridge extends BridgeAbstract {
|
||||||
$resId = array_key_exists('main_release', $release) ? $release['main_release'] : $release['id'];
|
$resId = array_key_exists('main_release', $release) ? $release['main_release'] : $release['id'];
|
||||||
$item['uri'] = self::URI . $this->getInput('artistid') . '/release/' . $resId;
|
$item['uri'] = self::URI . $this->getInput('artistid') . '/release/' . $resId;
|
||||||
$item['timestamp'] = DateTime::createFromFormat('Y', $release['year'])->getTimestamp();
|
$item['timestamp'] = DateTime::createFromFormat('Y', $release['year'])->getTimestamp();
|
||||||
|
if($item['timestamp'] < 0)
|
||||||
|
$item['timestamp'] = 0;
|
||||||
$item['content'] = $item['author'] . ' - ' . $item['title'];
|
$item['content'] = $item['author'] . ' - ' . $item['title'];
|
||||||
$this->items[] = $item;
|
$this->items[] = $item;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue