Skip to content

Commit

Permalink
Add well known map for audio channels
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc committed Apr 9, 2021
1 parent 228e21e commit 9164d31
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion plex_trakt_sync/plex_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,14 @@ def audio_channels(self):
"""
Set to 1.0, 2.0, 2.1, 3.0, 3.1, 4.0, 4.1, 5.0, 5.1, 5.1.2, 5.1.4, 6.1, 7.1, 7.1.2, 7.1.4, 9.1, or 10.1
"""
map = {
2: "2.0",
}
media = self.item.media[0]
return media.audioChannels
try:
return map[media.audioChannels]
except KeyError:
return None

@property
@memoize
Expand Down

0 comments on commit 9164d31

Please sign in to comment.