mirror of
https://github.com/iptv-org/epg
synced 2026-05-09 19:07:03 -04:00
Fix linter issues in sites/
This commit is contained in:
@@ -30,7 +30,8 @@ module.exports = {
|
||||
offset: 0,
|
||||
properties: [
|
||||
{
|
||||
include: 'endtime,genres,id,name,starttime,channelid,pictures,introduce,subName,seasonNum,subNum,cast,country,producedate,externalIds',
|
||||
include:
|
||||
'endtime,genres,id,name,starttime,channelid,pictures,introduce,subName,seasonNum,subNum,cast,country,producedate,externalIds',
|
||||
name: 'playbill'
|
||||
}
|
||||
],
|
||||
@@ -113,15 +114,15 @@ function parseCategory(item) {
|
||||
}
|
||||
|
||||
function parseDirectors(item) {
|
||||
if (!item.cast || !item.cast.director) return [];
|
||||
if (!item.cast || !item.cast.director) return []
|
||||
return item.cast.director
|
||||
.replace('und', ',')
|
||||
.split(',')
|
||||
.map(i => i.trim());
|
||||
.map(i => i.trim())
|
||||
}
|
||||
|
||||
function parseProducers(item) {
|
||||
if (!item.cast || !item.cast.producer) return [];
|
||||
if (!item.cast || !item.cast.producer) return []
|
||||
return item.cast.producer
|
||||
.replace('und', ',')
|
||||
.split(',')
|
||||
@@ -129,7 +130,7 @@ function parseProducers(item) {
|
||||
}
|
||||
|
||||
function parseAdapters(item) {
|
||||
if (!item.cast || !item.cast.adaptor) return [];
|
||||
if (!item.cast || !item.cast.adaptor) return []
|
||||
return item.cast.adaptor
|
||||
.replace('und', ',')
|
||||
.split(',')
|
||||
@@ -138,7 +139,7 @@ function parseAdapters(item) {
|
||||
|
||||
function parseUrls(item) {
|
||||
// currently only a imdb id is returned by the api, thus we can construct the url here
|
||||
if (!item.externalIds) return [];
|
||||
if (!item.externalIds) return []
|
||||
return JSON.parse(item.externalIds)
|
||||
.filter(externalId => externalId.type === 'imdb' && externalId.id)
|
||||
.map(externalId => ({ system: 'imdb', value: `https://www.imdb.com/title/${externalId.id}` }))
|
||||
|
||||
Reference in New Issue
Block a user