diff --git a/daapinterface.py b/daapinterface.py index 8b3329e..1bf75d1 100644 --- a/daapinterface.py +++ b/daapinterface.py @@ -235,7 +235,7 @@ def artwork(): ''') sparql.setReturnFormat(JSON) artworkimages = sparql.query().convert() - # print(artworkimages) + print(artworkimages) ######### Right top # contributors diff --git a/templates/artwork.html b/templates/artwork.html index ae132b9..12143ea 100644 --- a/templates/artwork.html +++ b/templates/artwork.html @@ -39,17 +39,20 @@
+
- {% for x in artworkimages['results']['bindings'] %} - {% if loop.index <= 1 %} - {% if "image" in x %} - - {% else %} - - {% endif %} + {% if artworkimages['results']['bindings']==[] %} + + {% else %} + {% for x in artworkimages['results']['bindings'] %} + {% if loop.index <= 1 %} + {% if "image" in x %} + + {% endif %} + {% endif %} + {% endfor %} {% endif %} - {% endfor %}
@@ -122,15 +125,18 @@ DESCRIPTION {{ artworkdescriptiontext }} - -
- AUTHOR + + + + + - SOURCE + - DATE + -
+ +
diff --git a/templates/publishersindex.html b/templates/publishersindex.html index 3aee8db..16c5fed 100644 --- a/templates/publishersindex.html +++ b/templates/publishersindex.html @@ -15,8 +15,8 @@ {% for x in results['results']['bindings']%} - {{ x['publishers']['value'] | replace('http://daap.bannerrepeater.org/entity/', '') }} - {{ x["publishersLabel"]['value'] }} + {{ x['publishers']['value'] | replace('http://daap.bannerrepeater.org/entity/', '') }} + {{ x["publishersLabel"]['value'] }} {% if "publishersAltLabel" in x %} {{ x["publishersAltLabel"]["value"] }}