Skip to content

Commit

Permalink
Also display Radio programmes
Browse files Browse the repository at this point in the history
Fixes an error 404 when selecting a Radio programme from a collection
  • Loading branch information
ehrhart committed Jan 5, 2023
1 parent 168cef3 commit c4b789e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions config/routes/programmes.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,11 @@ module.exports = {
}
],
$where: [
'GRAPH ?g { ?id a ebucore:TVProgramme }',
`
{
?id a ?rdfType
GRAPH ?g {
?id a ?rdfType .
VALUES ?rdfType { ebucore:TVProgramme ebucore:RadioProgramme }
}
UNION
{
?id ebucore:title ?label .
}
Expand Down Expand Up @@ -175,7 +173,7 @@ module.exports = {
labelProp: 'http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#title',
imageFunc: (props) => props.mediaLocator ? `https://explorer.memad.eu/api/limecraft/thumbnail?locator=${encodeURIComponent(props.mediaLocator)}` : null,
baseWhere: [
'GRAPH ?g { ?id a ebucore:TVProgramme }',
'GRAPH ?g { ?id a ?rdfType . VALUES ?rdfType { ebucore:TVProgramme ebucore:RadioProgramme } }',
],
metadata: {
publicationStartDateTime: (value) => new Date(value).toLocaleDateString(),
Expand All @@ -191,7 +189,9 @@ module.exports = {
mediaLocator: '$ebucore:isInstantiatedBy/ebucore:locator',
}
],
$where: ['GRAPH ?g { ?id a ebucore:TVProgramme }'],
$where: [
'GRAPH ?g { ?id a ?rdfType . VALUES ?rdfType { ebucore:TVProgramme ebucore:RadioProgramme } }',
],
$langTag: 'hide',
},
filters: [
Expand Down

0 comments on commit c4b789e

Please sign in to comment.