mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Use library method for season number (#28708)
This commit is contained in:
parent
48fd95c7db
commit
5f177fa42e
@ -289,12 +289,7 @@ class PlexMediaPlayer(MediaPlayerDevice):
|
|||||||
self._media_content_type = MEDIA_TYPE_TVSHOW
|
self._media_content_type = MEDIA_TYPE_TVSHOW
|
||||||
|
|
||||||
# season number (00)
|
# season number (00)
|
||||||
if callable(self.session.season):
|
self._media_season = self.session.seasonNumber
|
||||||
self._media_season = str((self.session.season()).index).zfill(2)
|
|
||||||
elif self.session.parentIndex is not None:
|
|
||||||
self._media_season = self.session.parentIndex.zfill(2)
|
|
||||||
else:
|
|
||||||
self._media_season = None
|
|
||||||
# show name
|
# show name
|
||||||
self._media_series_title = self.session.grandparentTitle
|
self._media_series_title = self.session.grandparentTitle
|
||||||
# episode number (00)
|
# episode number (00)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user