Skip to content

Commit

Permalink
Update application friendly names in constants (#232)
Browse files Browse the repository at this point in the history
* Display updated name for Google Play videos application.

* Define app constants with FIRETV suffix for identifiers that are specific to Amazon devices.

* Rename 'Amz Video' and address typo in 'DreamPLayer'.

* Add friendly names for mainstream/popular applications.

Majority of the applications are alternative players or streaming media platforms.
With some additional entries specific to Dutch, Slovenian content.
  • Loading branch information
martomo committed Feb 3, 2021
1 parent 88ada41 commit 6316819
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 21 deletions.
70 changes: 58 additions & 12 deletions androidtv/constants.py
Expand Up @@ -293,14 +293,20 @@

# Apps
APP_AE_TV = 'com.aetn.aetv.watch'
APP_AMAZON_PRIME_VIDEO = 'com.amazon.avod.thirdpartyclient'
APP_AMAZON_VIDEO = 'com.amazon.avod'
APP_AMZ_VIDEO = 'com.amazon.avod.thirdpartyclient'
APP_APPLE_TV = 'com.apple.atve.amazon.appletv'
APP_APPLE_TV = 'com.apple.atve.sony.appletv'
APP_APPLE_TV_FIRETV = 'com.apple.atve.amazon.appletv'
APP_ATV_LAUNCHER = 'com.google.android.tvlauncher'
APP_BELL_FIBE = 'com.quickplay.android.bellmediaplayer'
APP_COMEDY_CENTRAL = 'com.vmn.android.comedycentral'
APP_DAILYMOTION = 'com.dailymotion.dailymotion'
APP_DEEZER = 'deezer.android.tv'
APP_DISNEY_PLUS = 'com.disney.disneyplus'
APP_DS_PHOTO = 'com.synology.dsphoto'
APP_DS_VIDEO = 'com.synology.dsvideo'
APP_ES_FILE_EXPLORER = 'com.estrongs.android.pop'
APP_FACEBOOK = 'com.facebook.katana'
APP_FAWESOME = 'com.future.moviesByFawesomeAndroidTV'
APP_FIREFOX = 'org.mozilla.tv.firefox'
APP_FIRETV_PACKAGE_LAUNCHER = 'com.amazon.tv.launcher'
Expand All @@ -310,88 +316,128 @@
APP_FRANCE_TV = 'fr.francetv.pluzz'
APP_GOOGLE_CAST = 'com.google.android.apps.mediashell'
APP_GOOGLE_TV_LAUNCHER = 'com.google.android.apps.tv.launcherx'
APP_HAYSTACK_NEWS = 'com.haystack.android'
APP_HBO_GO = 'eu.hbogo.androidtv.production'
APP_HBO_GO_2 = 'com.HBO'
APP_HULU = 'com.hulu.plus'
APP_IMDB_TV = 'com.amazon.imdb.tv.android.app'
APP_IPTV = 'ru.iptvremote.android.iptv'
APP_IPTV_SMARTERS_PRO = 'com.nst.iptvsmarterstvbox'
APP_JELLYFIN_TV = 'org.jellyfin.androidtv'
APP_KODI = 'org.xbmc.kodi'
APP_LIVE_CHANNELS = 'com.google.android.tv'
APP_MIJN_RADIO = 'org.samsonsen.nederlandse.radio.holland.nl'
APP_MOLOTOV = 'tv.molotov.app'
APP_MX_PLAYER = 'com.mxtech.videoplayer.ad'
APP_NETFLIX = 'com.netflix.ninja'
APP_NLZIET = 'nl.nlziet'
APP_NOS = 'nl.nos.app'
APP_NPO = 'nl.uitzendinggemist'
APP_OCS = 'com.orange.ocsgo'
APP_PLAY_GAMES = 'com.google.android.games'
APP_PLAY_MUSIC = 'com.google.android.music'
APP_PLAY_STORE = 'com.android.vending'
APP_PLAY_VIDEOS = 'com.android.videos'
APP_PLEX = 'com.plexapp.android'
APP_PRIME_VIDEO = 'com.amazon.amazonvideo.livingroom'
APP_PRIME_VIDEO_2 = 'com.amazon.firebat'
APP_PRIME_VIDEO_FIRETV = 'com.amazon.firebat'
APP_SMART_YOUTUBE_TV = 'com.liskovsoft.videomanager'
APP_SPORT1 = 'de.sport1.firetv.video'
APP_SPOTIFY = 'com.spotify.tv.android'
APP_STEAM_LINK = 'com.valvesoftware.steamlink'
APP_SYFY = 'com.amazon.webapps.nbc.syfy'
APP_T2 = 'tv.perception.clients.tv.android'
APP_TED = 'com.ted.android.tv'
APP_TUNEIN = 'tunein.player'
APP_TVHEADEND = 'de.cyberdream.dreamepg.tvh.tv.player'
APP_TWITCH = 'tv.twitch.android.viewer'
APP_TWITCH_APP = 'tv.twitch.android.app'
APP_TWITCH = 'tv.twitch.android.app'
APP_TWITCH_FIRETV = 'tv.twitch.android.viewer'
APP_VEVO = 'com.vevo.tv'
APP_VH1 = 'com.mtvn.vh1android'
APP_VIMEO = 'com.vimeo.android.videoapp'
APP_VLC = 'org.videolan.vlc'
APP_VOYO = 'com.phonegap.voyo'
APP_VRV = 'com.ellation.vrv'
APP_WAIPU_TV = 'de.exaring.waipu.firetv.live'
APP_WATCH_TNT = 'com.turner.tnt.android.networkapp'
APP_YOUTUBE = 'com.google.android.youtube.tv'
APP_YOUTUBE_2 = 'com.amazon.firetv.youtube'
APP_YOUTUBE_FIRETV = 'com.amazon.firetv.youtube'
APP_YOUTUBE_KIDS = 'com.google.android.youtube.tvkids'
APP_YOUTUBE_KIDS_FIRETV = 'com.amazon.firetv.youtube.kids'
APP_YOUTUBE_MUSIC = 'com.google.android.youtube.tvmusic'
APP_YOUTUBE_TV = 'com.google.android.youtube.tvunplugged'
APP_ZIGGO_GO_TV = 'com.ziggo.tv'
APPS = {APP_AE_TV: 'A&E',
APP_AMAZON_PRIME_VIDEO: 'Amazon Prime Video',
APP_AMAZON_VIDEO: 'Amazon Video',
APP_AMZ_VIDEO: 'Amz Video',
APP_APPLE_TV: 'Apple TV',
APP_APPLE_TV_FIRETV: 'Apple TV (FireTV)',
APP_ATV_LAUNCHER: 'Android TV Launcher',
APP_BELL_FIBE: 'Bell Fibe',
APP_COMEDY_CENTRAL: 'Comedy Central',
APP_DAILYMOTION: 'Dailymotion',
APP_DEEZER: 'Deezer',
APP_DISNEY_PLUS: 'Disney+',
APP_DS_PHOTO: 'DS photo',
APP_DS_VIDEO: 'DS video',
APP_ES_FILE_EXPLORER: 'ES File Explorer',
APP_FACEBOOK: 'Facebook Watch',
APP_FAWESOME: 'Fawsome',
APP_FIREFOX: 'Firefox',
APP_FIRETV_STORE: 'FireTV Store',
APP_FOOD_NETWORK_GO: 'Food Network GO',
APP_FRANCE_TV: 'France TV',
APP_GOOGLE_CAST: 'Google Cast',
APP_GOOGLE_TV_LAUNCHER: 'Google TV Launcher',
APP_HAYSTACK_NEWS: 'Haystack News',
APP_HBO_GO: 'HBO GO',
APP_HBO_GO_2: 'HBO GO (2)',
APP_HULU: 'Hulu',
APP_IMDB_TV: 'IMDb TV',
APP_IPTV: 'IPTV',
APP_IPTV_SMARTERS_PRO: 'IPTV Smarters Pro',
APP_JELLYFIN_TV: 'Jellyfin',
APP_KODI: 'Kodi',
APP_LIVE_CHANNELS: 'Live Channels',
APP_MIJN_RADIO: 'Mijn Radio',
APP_MOLOTOV: 'Molotov',
APP_MX_PLAYER: 'MX Player',
APP_NETFLIX: 'Netflix',
APP_NLZIET: 'NLZIET',
APP_NOS: 'NOS',
APP_NPO: 'NPO',
APP_OCS: 'OCS',
APP_PLAY_GAMES: 'Play Games',
APP_PLAY_MUSIC: 'Play Music',
APP_PLAY_STORE: 'Play Store',
APP_PLAY_VIDEOS: 'Play Videos',
APP_PLAY_VIDEOS: 'Play Movies & TV',
APP_PLEX: 'Plex',
APP_PRIME_VIDEO: 'Prime Video',
APP_PRIME_VIDEO_2: 'Prime Video (2)',
APP_PRIME_VIDEO_FIRETV: 'Prime Video (FireTV)',
APP_SMART_YOUTUBE_TV: 'Smart YouTube TV',
APP_SPORT1: 'Sport 1',
APP_SPOTIFY: 'Spotify',
APP_STEAM_LINK: 'Steam Link',
APP_SYFY: 'Syfy',
APP_TVHEADEND: 'DreamPLayer TVHeadend',
APP_T2: 'T-2 TV',
APP_TED: 'TED',
APP_TUNEIN: 'TuneIn Radio',
APP_TVHEADEND: 'DreamPlayer TVHeadend',
APP_TWITCH: 'Twitch',
APP_TWITCH_APP: 'Twitch App',
APP_TWITCH_FIRETV: 'Twitch (FireTV)',
APP_VEVO: 'Vevo',
APP_VH1: 'VH1',
APP_VIMEO: 'Vimeo',
APP_VLC: 'VLC',
APP_VOYO: 'VOYO',
APP_VRV: 'VRV',
APP_WAIPU_TV: 'Waipu TV',
APP_WATCH_TNT: 'Watch TNT',
APP_YOUTUBE: 'YouTube',
APP_YOUTUBE_2: 'YouTube (FireTV)',
APP_YOUTUBE_FIRETV: 'YouTube (FireTV)',
APP_YOUTUBE_KIDS: 'YouTube Kids',
APP_YOUTUBE_KIDS_FIRETV: 'YouTube Kids (FireTV)',
APP_YOUTUBE_MUSIC: 'YouTube Music',
APP_YOUTUBE_TV: 'YouTube TV',
APP_ZIGGO_GO_TV: 'Ziggo GO TV'}

Expand Down
2 changes: 1 addition & 1 deletion androidtv/firetv/base_firetv.py
Expand Up @@ -185,7 +185,7 @@ def _update(self, screen_on, awake, wake_lock_size, current_app, media_session_s
state = constants.STATE_IDLE

# Twitch
elif current_app == constants.APP_TWITCH:
elif current_app == constants.APP_TWITCH_FIRETV:
if wake_lock_size == 2:
state = constants.STATE_PAUSED
elif media_session_state == 3:
Expand Down
16 changes: 8 additions & 8 deletions tests/test_firetv_sync.py
Expand Up @@ -440,17 +440,17 @@ def test_state_detection(self):
(constants.STATE_IDLE, constants.APP_SPOTIFY, [constants.APP_SPOTIFY], None))

# Twitch
self.assertUpdate([True, True, 2, constants.APP_TWITCH, 3, [constants.APP_TWITCH], None],
(constants.STATE_PAUSED, constants.APP_TWITCH, [constants.APP_TWITCH], None))
self.assertUpdate([True, True, 2, constants.APP_TWITCH_FIRETV, 3, [constants.APP_TWITCH_FIRETV], None],
(constants.STATE_PAUSED, constants.APP_TWITCH_FIRETV, [constants.APP_TWITCH_FIRETV], None))

self.assertUpdate([True, True, 1, constants.APP_TWITCH, 3, [constants.APP_TWITCH], None],
(constants.STATE_PLAYING, constants.APP_TWITCH, [constants.APP_TWITCH], None))
self.assertUpdate([True, True, 1, constants.APP_TWITCH_FIRETV, 3, [constants.APP_TWITCH_FIRETV], None],
(constants.STATE_PLAYING, constants.APP_TWITCH_FIRETV, [constants.APP_TWITCH_FIRETV], None))

self.assertUpdate([True, True, 1, constants.APP_TWITCH, 4, [constants.APP_TWITCH], None],
(constants.STATE_PLAYING, constants.APP_TWITCH, [constants.APP_TWITCH], None))
self.assertUpdate([True, True, 1, constants.APP_TWITCH_FIRETV, 4, [constants.APP_TWITCH_FIRETV], None],
(constants.STATE_PLAYING, constants.APP_TWITCH_FIRETV, [constants.APP_TWITCH_FIRETV], None))

self.assertUpdate([True, True, 1, constants.APP_TWITCH, 1, [constants.APP_TWITCH], None],
(constants.STATE_IDLE, constants.APP_TWITCH, [constants.APP_TWITCH], None))
self.assertUpdate([True, True, 1, constants.APP_TWITCH_FIRETV, 1, [constants.APP_TWITCH_FIRETV], None],
(constants.STATE_IDLE, constants.APP_TWITCH_FIRETV, [constants.APP_TWITCH_FIRETV], None))

# Waipu TV
self.assertUpdate([True, True, 3, constants.APP_WAIPU_TV, 1, [constants.APP_WAIPU_TV], None],
Expand Down

0 comments on commit 6316819

Please sign in to comment.