mirror of
https://github.com/iptv-org/epg
synced 2026-05-07 01:46:59 -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}` }))
|
||||
|
||||
@@ -41,7 +41,8 @@ it('can generate valid request data', () => {
|
||||
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'
|
||||
}
|
||||
],
|
||||
@@ -78,20 +79,27 @@ it('can parse response', () => {
|
||||
sub_title: 'Tritte unter dem Tisch',
|
||||
description:
|
||||
'Amy arbeitet für eine Weile in Sheldons Universität, er freut sich darüber, doch sie warnt ihn, dass sie sich jetzt häufiger zu Gesicht bekommen. Als Leonard, Sheldon, Raj und Howard zusammen sitzen, diskutieren sie darüber. Sheldon lässt auf sich einreden und informiert Amy, dass er ein Problem mit ihr auf seiner Arbeit hat. Sie ist enttäuscht, während Bernadette mit Howard darüber spricht, warum er auf Sheldon eingeredet hat.',
|
||||
season: "7",
|
||||
episode: "5",
|
||||
season: '7',
|
||||
episode: '5',
|
||||
image:
|
||||
'http://ngiss.t-online.de/cm1s/media/gracenote/1/0/p10262968_e_h9_ah_2021-10-20T07_16_16.jpg',
|
||||
category: ['Sitcom'],
|
||||
directors: ["Mark Cendrowski"],
|
||||
producers: ["Chuck Lorre","Bill Prady","Steven Molaro"],
|
||||
adapters: ["Steven Molaro","Steve Holland","Maria Ferrari","Chuck Lorre","Eric Kaplan","Jim Reynolds"],
|
||||
directors: ['Mark Cendrowski'],
|
||||
producers: ['Chuck Lorre', 'Bill Prady', 'Steven Molaro'],
|
||||
adapters: [
|
||||
'Steven Molaro',
|
||||
'Steve Holland',
|
||||
'Maria Ferrari',
|
||||
'Chuck Lorre',
|
||||
'Eric Kaplan',
|
||||
'Jim Reynolds'
|
||||
],
|
||||
country: 'US',
|
||||
date: "2013-01-01",
|
||||
date: '2013-01-01',
|
||||
urls: [
|
||||
{
|
||||
system: "imdb",
|
||||
value: "https://www.imdb.com/title/tt0898266"
|
||||
system: 'imdb',
|
||||
value: 'https://www.imdb.com/title/tt0898266'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user