def get_subtitles(video):
 result_list = []
 if (not video.subtitle_languages):
  return result_list
 for language in video.subtitle_languages:
  if (hasattr(language, 'opensubtitles') and language.opensubtitles):
   result_list.append(language.opensubtitles)
 return sorted(result_list)

def get_subtitles ( video ) : result_list = [ ] if ( not video . subtitle_languages ) : return result_list for language in video . subtitle_languages : if ( hasattr ( language , 'opensubtitles' ) and language . opensubtitles ) : result_list . append ( language . opensubtitles ) return sorted ( result_list )
return a sorted list of detected subtitles for the given video file .