Skip to content

Commit

Permalink
[script.audio.motherearth] 2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianReiterer committed Sep 22, 2023
1 parent 236201b commit 01bda21
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion script.audio.motherearth/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## 2.1
- updated to https streaming
- updated to https
- added artist fanart background when available

## v2.0

Expand Down
1 change: 1 addition & 0 deletions script.audio.motherearth/motherearth.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
{
Expand Down
6 changes: 3 additions & 3 deletions script.audio.motherearth/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -13,7 +13,6 @@

Song = namedtuple('Song', 'data cover')


class Player(xbmc.Player):
"""Adds xbmc.Player callbacks and integrates with the API."""

Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 01bda21

Please sign in to comment.