mirror of
https://github.com/home-assistant/core.git
synced 2025-08-03 12:45:28 +02:00
Fix media_title empty when title is empty but label is set (#14791)
This commit is contained in:
@@ -542,8 +542,8 @@ class KodiDevice(MediaPlayerDevice):
|
|||||||
def media_title(self):
|
def media_title(self):
|
||||||
"""Title of current playing media."""
|
"""Title of current playing media."""
|
||||||
# find a string we can use as a title
|
# find a string we can use as a title
|
||||||
return self._item.get(
|
item = self._item
|
||||||
'title', self._item.get('label', self._item.get('file')))
|
return item.get('title') or item.get('label') or item.get('file')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def media_series_title(self):
|
def media_series_title(self):
|
||||||
|
Reference in New Issue
Block a user