diff --git a/.gitignore b/.gitignore index e256fd2..1899579 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ *.swo settings.py oliver_screen.sqlite3 +venv diff --git a/oliver_screen/requirements.txt b/oliver_screen/requirements.txt new file mode 100644 index 0000000..c5ba8ea --- /dev/null +++ b/oliver_screen/requirements.txt @@ -0,0 +1,3 @@ +Django==1.3.7 +pylast==0.5.11 + diff --git a/oliver_screen/settings-sample.py b/oliver_screen/settings-sample.py index b481fc0..9447c15 100644 --- a/oliver_screen/settings-sample.py +++ b/oliver_screen/settings-sample.py @@ -56,7 +56,7 @@ MEDIA_ROOT = '' # 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). # 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 # trailing slash. diff --git a/oliver_screen/tracks/views.py b/oliver_screen/tracks/views.py index 387d129..02e79c4 100644 --- a/oliver_screen/tracks/views.py +++ b/oliver_screen/tracks/views.py @@ -47,9 +47,10 @@ def get_now_playing(request): if not track is None: artist = track.get_artist() video = get_youtubevideo(artist.get_name(), track.get_title()) - image = artist.get_images(limit=1) - if len(image) > 0: - image = image[0].sizes.original + image = artist.get_cover_image(size=4) + + if "The Shins" in artist.get_name(): + image = 'http://nikolark.at.neuf.no/the_shins.jpg' now_playing = { 'artist': artist.get_name(),