Archived
Fixes image update
This commit is contained in:
1 parent
b28779bdd7
commit
dcae0e9048
4 files changed
+9
-4
No files matched your search
@@ -3,3 +3,4 @@
|
|||||||
*.swo
|
*.swo
|
||||||
settings.py
|
settings.py
|
||||||
oliver_screen.sqlite3
|
oliver_screen.sqlite3
|
||||||
|
venv
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
Django==1.3.7
|
||||||
|
pylast==0.5.11
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ MEDIA_ROOT = ''
|
|||||||
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
|
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
|
||||||
# trailing slash if there is a path component (optional in other cases).
|
# trailing slash if there is a path component (optional in other cases).
|
||||||
# Examples: "http://media.lawrence.com", "http://example.com/media/"
|
# Examples: "http://media.lawrence.com", "http://example.com/media/"
|
||||||
MEDIA_URL = ''
|
MEDIA_URL = '/static/'
|
||||||
|
|
||||||
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
|
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
|
||||||
# trailing slash.
|
# trailing slash.
|
||||||
|
|||||||
@@ -47,9 +47,10 @@ def get_now_playing(request):
|
|||||||
if not track is None:
|
if not track is None:
|
||||||
artist = track.get_artist()
|
artist = track.get_artist()
|
||||||
video = get_youtubevideo(artist.get_name(), track.get_title())
|
video = get_youtubevideo(artist.get_name(), track.get_title())
|
||||||
image = artist.get_images(limit=1)
|
image = artist.get_cover_image(size=4)
|
||||||
if len(image) > 0:
|
|
||||||
image = image[0].sizes.original
|
if "The Shins" in artist.get_name():
|
||||||
|
image = 'http://nikolark.at.neuf.no/the_shins.jpg'
|
||||||
|
|
||||||
now_playing = {
|
now_playing = {
|
||||||
'artist': artist.get_name(),
|
'artist': artist.get_name(),
|
||||||
|
|||||||
Reference in new issue
Block a user