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
..
__init__.py Break up websocket 2 (#17028) 2018-10-01 16:09:31 +02:00
anthemav.py async_create_task (#17059) 2018-10-02 11:03:09 +02:00
apple_tv.py Async syntax 4/8 (#17018) 2018-10-01 08:58:21 +02:00
aquostv.py Order imports (#16515) 2018-09-09 14:26:06 +02:00
blackbird.py Order imports (#16515) 2018-09-09 14:26:06 +02:00
bluesound.py async_create_task (#17059) 2018-10-02 11:03:09 +02:00
braviatv.py Order imports (#16515) 2018-09-09 14:26:06 +02:00
cast.py async_create_task (#17059) 2018-10-02 11:03:09 +02:00
channels.py Order imports (#16515) 2018-09-09 14:26:06 +02:00
clementine.py Async syntax 4/8 (#17018) 2018-10-01 08:58:21 +02:00
cmus.py Order imports (#16515) 2018-09-09 14:26:06 +02:00
demo.py Order imports (#16515) 2018-09-09 14:26:06 +02:00
denon.py Order imports (#16515) 2018-09-09 14:26:06 +02:00
denonavr.py Pushed to version 0.7.6 of denonavr library to add more sound modes (#17227) 2018-10-08 09:32:14 +02:00
directv.py Change source, add attributes, and improve state of DirecTV (#17536) 2018-10-29 21:06:37 +01:00
dlna_dmr.py Fixes for upnp-component/#17753 and missing hass-data when only setup from config entry (#17868) 2018-10-29 08:10:01 +01:00
dunehd.py Order imports (#16515) 2018-09-09 14:26:06 +02:00
emby.py Async syntax 4/8 (#17018) 2018-10-01 08:58:21 +02:00
epson.py Order imports (#16515) 2018-09-09 14:26:06 +02:00
firetv.py Order imports (#16515) 2018-09-09 14:26:06 +02:00
frontier_silicon.py Async syntax 4/8 (#17018) 2018-10-01 08:58:21 +02:00
gpmdp.py Order imports (#16515) 2018-09-09 14:26:06 +02:00
gstreamer.py Upgrade gstreamer-player to 1.1.2 (#17568) 2018-10-19 18:11:47 +02:00
hdmi_cec.py Order imports (#16515) 2018-09-09 14:26:06 +02:00
horizon.py Fix unhandled exception which creates many useless logs (#17508) 2018-10-16 16:41:38 +02:00
itunes.py Order imports (#16515) 2018-09-09 14:26:06 +02:00
kodi.py async_create_task (#17059) 2018-10-02 11:03:09 +02:00
lg_netcast.py Order imports (#16515) 2018-09-09 14:26:06 +02:00
lg_soundbar.py Add support for LG soundbars (#17570) 2018-10-18 10:39:33 +02:00
liveboxplaytv.py Async syntax 4/8 (#17018) 2018-10-01 08:58:21 +02:00
mediaroom.py Order imports (#16515) 2018-09-09 14:26:06 +02:00
monoprice.py add_devices -> add_entities (#16171) 2018-08-24 16:37:30 +02:00
mpchc.py Order imports (#16515) 2018-09-09 14:26:06 +02:00
mpd.py Fix mpd timeout error (#17254) 2018-10-09 12:24:39 +02:00
nad.py Order imports (#16515) 2018-09-09 14:26:06 +02:00
nadtcp.py add_devices -> add_entities (#16171) 2018-08-24 16:37:30 +02:00
onkyo.py Order imports (#16515) 2018-09-09 14:26:06 +02:00
openhome.py Order imports (#16515) 2018-09-09 14:26:06 +02:00
panasonic_viera.py Upgrade wakeonlan to 1.1.6 (#16512) 2018-09-10 16:07:31 +02:00
pandora.py Order imports (#16515) 2018-09-09 14:26:06 +02:00
philips_js.py Order imports (#16515) 2018-09-09 14:26:06 +02:00
pioneer.py Order imports (#16515) 2018-09-09 14:26:06 +02:00
pjlink.py Order imports (#16515) 2018-09-09 14:26:06 +02:00
plex.py Order imports (#16515) 2018-09-09 14:26:06 +02:00
roku.py Order imports (#16515) 2018-09-09 14:26:06 +02:00
russound_rio.py Async syntax 4/8 (#17018) 2018-10-01 08:58:21 +02:00
russound_rnet.py Order imports (#16515) 2018-09-09 14:26:06 +02:00
samsungtv.py State is set to UNKNOWN rather than ON in order to make UI have an play/pause button (#17357) 2018-10-15 11:42:27 +02:00
services.yaml Epson projector support (#14841) 2018-06-13 07:28:59 +02:00
sisyphus.py Order imports (#16515) 2018-09-09 14:26:06 +02:00
snapcast.py Update snapcast to 2.0.9 (#17573) 2018-10-18 11:06:32 +02:00
songpal.py Order imports (#16515) 2018-09-09 14:26:06 +02:00
sonos.py Narrow scope of various pylint inline disables (#15364) 2018-10-10 12:17:11 +02:00
soundtouch.py Revert incorrect check (#16883) 2018-09-26 10:15:49 +02:00
spotify.py Order imports (#16515) 2018-09-09 14:26:06 +02:00
squeezebox.py Async syntax 4/8 (#17018) 2018-10-01 08:58:21 +02:00
ue_smart_radio.py Order imports (#16515) 2018-09-09 14:26:06 +02:00
universal.py Order imports (#16515) 2018-09-09 14:26:06 +02:00
vizio.py Order imports (#16515) 2018-09-09 14:26:06 +02:00
vlc.py Order imports (#16515) 2018-09-09 14:26:06 +02:00
volumio.py Remove unnecessary call (#17514) 2018-10-17 10:53:05 +02:00
webostv.py Updated package to fix #16960 (#17555) 2018-10-17 22:56:54 +02:00
xiaomi_tv.py Order imports (#16515) 2018-09-09 14:26:06 +02:00
yamaha.py Yamaha AVR update and change Sound Mode only on main_zone (#17241) 2018-10-10 14:07:33 +02:00
yamaha_musiccast.py Validate ports as a port (#17549) 2018-10-17 23:09:05 +02:00
ziggo_mediabox_xl.py Order imports (#16515) 2018-09-09 14:26:06 +02:00