Merge pull request #591 from oddstr13/fix/587-2

Remove enum dependency
This commit is contained in:
Odd Stråbø 2021-10-20 23:25:05 +02:00 committed by GitHub
commit ff2bd65efb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,7 +3,6 @@ from __future__ import division, absolute_import, print_function, unicode_litera
#################################################################################################
import enum
import os
from uuid import uuid4
@ -20,7 +19,7 @@ from . import translate, settings, window, dialog, api, LazyLogger
LOG = LazyLogger(__name__)
class Transcode(enum.IntEnum):
class Transcode(object):
Enabled = 0
Audio = 1
Subtitle = 2
@ -607,7 +606,7 @@ class PlayUtils(object):
subs_streams.append(index)
skip_dialog = Transcode(int(settings('skipDialogTranscode') or 0))
skip_dialog = int(settings('skipDialogTranscode') or 0)
def get_track_title(track_index):
return streams[track_index]['DisplayTitle'] or ("Track %s" % track_index)