From 01bda211e4f5c6e7c88f3138a4fb913d01d7958d Mon Sep 17 00:00:00 2001 From: Florian Reiterer Date: Fri, 22 Sep 2023 23:37:50 +0200 Subject: [PATCH] [script.audio.motherearth] 2.1 --- script.audio.motherearth/CHANGELOG.md | 3 ++- script.audio.motherearth/motherearth.py | 1 + script.audio.motherearth/service.py | 6 +++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/script.audio.motherearth/CHANGELOG.md b/script.audio.motherearth/CHANGELOG.md index db9984846..495c794a3 100644 --- a/script.audio.motherearth/CHANGELOG.md +++ b/script.audio.motherearth/CHANGELOG.md @@ -1,5 +1,6 @@ ## 2.1 -- updated to https streaming +- updated to https +- added artist fanart background when available ## v2.0 diff --git a/script.audio.motherearth/motherearth.py b/script.audio.motherearth/motherearth.py index 480a3be59..c3002e54f 100644 --- a/script.audio.motherearth/motherearth.py +++ b/script.audio.motherearth/motherearth.py @@ -5,6 +5,7 @@ KEY_FILTER_RE = re.compile(r'[^\w\']+') NOWPLAYING_URL = 'https://motherearth.streamserver24.com/api/nowplaying/{}' +FANART_URL = 'https://motherearthradio.de/artist/{}/fanart.jpg' STREAMS = [ { diff --git a/script.audio.motherearth/service.py b/script.audio.motherearth/service.py index 6732ecf6d..c04d3c5c2 100644 --- a/script.audio.motherearth/service.py +++ b/script.audio.motherearth/service.py @@ -4,7 +4,7 @@ import xbmcaddon import xbmcgui from collections import namedtuple -from motherearth import STREAM_INFO, NowPlaying +from motherearth import STREAM_INFO, NowPlaying, FANART_URL RESTART_INTERVAL = 1.0 @@ -13,7 +13,6 @@ Song = namedtuple('Song', 'data cover') - class Player(xbmc.Player): """Adds xbmc.Player callbacks and integrates with the API.""" @@ -87,7 +86,8 @@ def update_player(self): item = xbmcgui.ListItem() item.setPath(self.getPlayingFile()) item.setArt({'thumb': song.cover}) - item.setArt({'fanart': song.cover}) + # item.setArt({'fanart': song.cover}) + item.setArt({'fanart' : FANART_URL.format((song.data['artist']))}) item.setInfo('music', info) self.updateInfoTag(item)