enigma2: fixed crash when a skin with HasSubtitles is used
[opendreambox.git] / meta-opendreambox / recipes-dreambox / enigma2 / enigma2-4.3.0r3-dm7080 / 0001-ServiceInfo-fixed-crash-when-a-skin-with-HasSubtitle.patch
1 From 8295829028f29012ed2f0cfec10442b86cdcbd93 Mon Sep 17 00:00:00 2001
2 From: ghost <andreas.monzner@dream-property.net>
3 Date: Thu, 12 May 2016 19:11:16 +0200
4 Subject: [PATCH] ServiceInfo: fixed crash when a skin with HasSubtitles is
5  used
6
7 ---
8  usr/lib/enigma2/python/Components/Converter/ServiceInfo.py | 6 ++----
9  1 file changed, 2 insertions(+), 4 deletions(-)
10
11 diff --git a/usr/lib/enigma2/python/Components/Converter/ServiceInfo.py b/usr/lib/enigma2/python/Components/Converter/ServiceInfo.py
12 index 7a95ca9..390d1b5 100644
13 --- a/usr/lib/enigma2/python/Components/Converter/ServiceInfo.py
14 +++ b/usr/lib/enigma2/python/Components/Converter/ServiceInfo.py
15 @@ -61,10 +61,8 @@ class ServiceInfo(Converter, object):
16         def getBoolean(self):
17                 service = self.source.service
18                 if self.type == self.HAS_SUBTITLES:
19 -                       subtitle = service and service.subtitle()
20 -                       if subtitle and subtitle.getSubtitleList():
21 -                               return True
22 -                       return False
23 +                       subtitle = service and service.subtitleTracks()
24 +                       return subtitle and subtitle.getNumberOfSubtitleTracks() > 0
25  
26                 info = service and service.info()
27                 if not info:
28 -- 
29 1.9.1
30