mirror of
https://github.com/anxdpanic/plugin.video.youtube.git
synced 2025-12-15 15:10:34 -08:00
Try to reduce log spam in Kodi versions <20 due to unsupported colorbutton control in settings
- Introduced after 4d1c665
- Probably won't achieve anything
- Related #668
This commit is contained in:
parent
b42d260adc
commit
0d86842057
1 changed files with 15 additions and 4 deletions
|
|
@ -13,7 +13,7 @@ from __future__ import absolute_import, division, unicode_literals
|
|||
import sys
|
||||
|
||||
from ..constants import settings
|
||||
from ..utils import validate_ip_address
|
||||
from ..utils import current_system_version, validate_ip_address
|
||||
|
||||
|
||||
class AbstractSettings(object):
|
||||
|
|
@ -383,6 +383,17 @@ class AbstractSettings(object):
|
|||
def set_history_playlist(self, value):
|
||||
return self.set_string(settings.HISTORY_PLAYLIST, value)
|
||||
|
||||
def get_label_color(self, label_part):
|
||||
setting_name = '.'.join((settings.LABEL_COLOR, label_part))
|
||||
return self.get_string(setting_name, 'white')
|
||||
if current_system_version.compatible(20, 0):
|
||||
def get_label_color(self, label_part):
|
||||
setting_name = '.'.join((settings.LABEL_COLOR, label_part))
|
||||
return self.get_string(setting_name, 'white')
|
||||
else:
|
||||
_COLOR_MAP = {
|
||||
'commentCount': 'cyan',
|
||||
'favoriteCount': 'gold',
|
||||
'likeCount': 'lime',
|
||||
'viewCount': 'lightblue',
|
||||
}
|
||||
|
||||
def get_label_color(self, label_part):
|
||||
return self._COLOR_MAP.get(label_part, 'white')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue