def _is_stream_value_equal(self, stream_a, stream_b):
     if isinstance(stream_a, dict):
         return common.compare_dict_keys(stream_a, stream_b, [
             'channels', 'codec', 'isdefault', 'isimpaired', 'isoriginal',
             'language'
         ])
     # subtitleenabled is boolean and not a dict
     return stream_a == stream_b
Пример #2
0
 def _is_stream_value_equal(self, stream_a, stream_b):
     if self.legacy_kodi_version:
         # Kodi version 18, compare dict values directly, this will always fails when
         # between episodes the number of streams change,
         # there is no way with Kodi 18 to compare the streams
         # will be removed when Kodi 18 is deprecated
         return stream_a == stream_b
     # Kodi version >= 19, compares stream properties to find the right stream index
     # between episodes with a different numbers of streams
     if isinstance(stream_a, dict):
         return common.compare_dict_keys(stream_a, stream_b,
                                         ['channels', 'codec', 'isdefault', 'isimpaired', 'isoriginal', 'language'])
     # subtitleenabled is boolean and not a dict
     return stream_a == stream_b