Remove enum dependency

enum isn't in the Python 2.7 stdlib
This commit is contained in:
Odd Stråbø 2021-10-20 20:38:33 +02:00
parent 5998206458
commit 5ab9a37804

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)