Skip to content

Commit

Permalink
[ServiceInfo, VAudioInfo, AudioSelection] Remove A_and A, from audio …
Browse files Browse the repository at this point in the history
…codec and display EAC3 as AC3+ when using Exteplayer3
  • Loading branch information
Ev0-BH authored and Huevos committed Jul 20, 2023
1 parent e79a476 commit 0621a3c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/python/Components/Converter/ServiceInfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ def getBoolean(self):
idx = 0
while idx < n:
i = audio.getTrackInfo(idx)
description = i.getDescription()
if description and description.split()[0] in ("AC3", "AC-3", "A_AC3", "A_AC-3", "A-AC-3", "E-AC-3", "A_EAC3", "DTS", "DTS-HD", "AC4", "LPCM", "Dolby", "AAC-HE"):
description = i.getDescription().replace("A ", "").replace("A_", "").replace("A-", "").replace("EAC3", "AC3+").replace("EAC-3", "AC3+").replace("AC-3", "AC3")
if description and description.split()[0] in ("AC3", "AC3+", "DTS", "DTS-HD", "AC4", "LPCM", "Dolby", "HE-AAC"):
if self.type == self.IS_MULTICHANNEL:
return True
elif self.type == self.IS_STEREO:
Expand Down
2 changes: 1 addition & 1 deletion lib/python/Components/Converter/VAudioInfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def getAudioCodec(self, info):
description_str = _("unknown")
if self.getAudio():
languages = self.getLanguage()
description = self.audio_info.getDescription()
description = self.audio_info.getDescription().replace("A ", "").replace("A_", "").replace("EAC3", "AC3+").replace("EAC-3", "AC3+").replace("AC-3", "AC3")
description_str = description.split(" ")
if len(description_str) and description_str[0] in languages:
return languages
Expand Down
2 changes: 1 addition & 1 deletion lib/python/Screens/AudioSelection.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ def fillList(self, arg=None):
number = str(x + 1)
i = audio.getTrackInfo(x)
languages = i.getLanguage().split('/')
description = i.getDescription() or ""
description = i.getDescription().replace("A ", "").replace("A_", "").replace("EAC3", "AC3+").replace("EAC-3", "AC3+").replace("AC-3", "AC3") or ""
selected = ""
language = ""
if selectedAudio == x:
Expand Down

0 comments on commit 0621a3c

Please sign in to comment.