mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Fix media_title empty when title is empty but label is set (#14791)
This commit is contained in:
parent
919b431a24
commit
e35d4beb95
@ -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):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user