From ac55ef0fbda0989ccb91c12e051ed364797222ef Mon Sep 17 00:00:00 2001 From: j Date: Sat, 18 Feb 2017 12:33:10 +0100 Subject: [PATCH] py3 comparing int/str --- ox/movie.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ox/movie.py b/ox/movie.py index 23211ae..189fa3c 100644 --- a/ox/movie.py +++ b/ox/movie.py @@ -116,7 +116,7 @@ def parse_item_files(files): subtitle_files = [file for file in version_files[version_key] if file['extension'] == 'srt'] for subtitle_language in sorted( list(set([file['language'] for file in subtitle_files])), - key=lambda x: LANGUAGES.index(x) if x in LANGUAGES else x + key=lambda x: '%d' % LANGUAGES.index(x) if x in LANGUAGES else x ): language_files = [file for file in subtitle_files if file['language'] == subtitle_language] if len(subtitle_files) == len(parts):