Files
home-assistant-core/homeassistant/components/media_player
ehendrix23 deeb288daf Change source, add attributes, and improve state of DirecTV (#17536)
* Enhancements for DirecTV media player

Following enhancements have been made:

1. Added debug logging
2. Added ability to change channel using select_source service of the remote platform.
3. State will now show paused if a recorded program is paused, for live TV playing will always be returned.
4. Added the following attributes:
    a. media_position: current position of the media (in seconds)
    b. media_position_updated_at: timestamp when media_position was updated.
   c. source: current source (channel).
   d. media_isbeingrecorded: if current media is being recorded or not.
   e. media_rating: TV/Movie rating of the media
   f. media_recorded: if current media is recorded or live TV
   g. media_starttime: Timestamp media was aired

Reordered properties to follow same order as how they are in __init__.py of remote platform.

* Fixed error and cleaned up few items

Fixed an issue when determining if a program is recorded or not.
Cleaned up some coding.

* Attribute last position update only updated when position changed.

The attribute media_position_updated_at will only be updated if the position changed (thus media is playing for recorded or live TV).
Added assumed_state; will be set to False if in standby or when a recorded show is watched. For live TV it will be set to True.

* Added some empty lines for easier reading

Added some empty lines before returns to improve readability.

* Seperated words in constants

Seperated the words in constants.

* Fix _lastupdate to _last_update

Split words in _lastupdate to _last_update as I missed it.
2018-10-29 21:06:37 +01:00
..
2018-10-01 16:09:31 +02:00
2018-10-02 11:03:09 +02:00
2018-10-01 08:58:21 +02:00
2018-09-09 14:26:06 +02:00
2018-09-09 14:26:06 +02:00
2018-10-02 11:03:09 +02:00
2018-09-09 14:26:06 +02:00
2018-10-02 11:03:09 +02:00
2018-09-09 14:26:06 +02:00
2018-10-01 08:58:21 +02:00
2018-09-09 14:26:06 +02:00
2018-09-09 14:26:06 +02:00
2018-09-09 14:26:06 +02:00
2018-09-09 14:26:06 +02:00
2018-10-01 08:58:21 +02:00
2018-09-09 14:26:06 +02:00
2018-09-09 14:26:06 +02:00
2018-10-01 08:58:21 +02:00
2018-09-09 14:26:06 +02:00
2018-09-09 14:26:06 +02:00
2018-09-09 14:26:06 +02:00
2018-10-02 11:03:09 +02:00
2018-09-09 14:26:06 +02:00
2018-10-01 08:58:21 +02:00
2018-09-09 14:26:06 +02:00
2018-09-09 14:26:06 +02:00
2018-10-09 12:24:39 +02:00
2018-09-09 14:26:06 +02:00
2018-08-24 16:37:30 +02:00
2018-09-09 14:26:06 +02:00
2018-09-09 14:26:06 +02:00
2018-09-09 14:26:06 +02:00
2018-09-09 14:26:06 +02:00
2018-09-09 14:26:06 +02:00
2018-09-09 14:26:06 +02:00
2018-09-09 14:26:06 +02:00
2018-09-09 14:26:06 +02:00
2018-10-01 08:58:21 +02:00
2018-09-09 14:26:06 +02:00
2018-06-13 07:28:59 +02:00
2018-09-09 14:26:06 +02:00
2018-10-18 11:06:32 +02:00
2018-09-09 14:26:06 +02:00
2018-09-26 10:15:49 +02:00
2018-09-09 14:26:06 +02:00
2018-10-01 08:58:21 +02:00
2018-09-09 14:26:06 +02:00
2018-09-09 14:26:06 +02:00
2018-09-09 14:26:06 +02:00
2018-09-09 14:26:06 +02:00
2018-10-17 10:53:05 +02:00
2018-09-09 14:26:06 +02:00
2018-09-09 14:26:06 +02:00