Skip to content

Commit 4f06e9e

Browse files
committed
Formatting
1 parent 01523d4 commit 4f06e9e

File tree

2 files changed

+29
-28
lines changed

2 files changed

+29
-28
lines changed

addon.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@
1919

2020
from resources.lib import srfplaytv
2121

22-
if __name__ == '__main__':
22+
if __name__ == "__main__":
2323
srfplaytv.run()

resources/lib/srfplaytv.py

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,17 @@
2929

3030
import srgssr
3131

32-
ADDON_ID = 'plugin.video.srfplaytv'
32+
ADDON_ID = "plugin.video.srfplaytv"
3333
REAL_SETTINGS = xbmcaddon.Addon(id=ADDON_ID)
34-
ADDON_NAME = REAL_SETTINGS.getAddonInfo('name')
35-
ADDON_VERSION = REAL_SETTINGS.getAddonInfo('version')
36-
DEBUG = (REAL_SETTINGS.getSetting('Enable_Debugging') == 'true')
37-
CONTENT_TYPE = 'videos'
34+
ADDON_NAME = REAL_SETTINGS.getAddonInfo("name")
35+
ADDON_VERSION = REAL_SETTINGS.getAddonInfo("version")
36+
DEBUG = REAL_SETTINGS.getSetting("Enable_Debugging") == "true"
37+
CONTENT_TYPE = "videos"
3838

3939

4040
class SRFPlayTV(srgssr.SRGSSR):
4141
def __init__(self):
42-
super(SRFPlayTV, self).__init__(
43-
int(sys.argv[1]), bu='srf', addon_id=ADDON_ID)
42+
super(SRFPlayTV, self).__init__(int(sys.argv[1]), bu="srf", addon_id=ADDON_ID)
4443

4544

4645
def log(msg, level=xbmc.LOGDEBUG):
@@ -53,8 +52,8 @@ def log(msg, level=xbmc.LOGDEBUG):
5352
"""
5453
if DEBUG:
5554
if level == xbmc.LOGERROR:
56-
msg += ' ,' + traceback.format_exc()
57-
xbmc.log(ADDON_ID + '-' + ADDON_VERSION + '-' + msg, level)
55+
msg += " ," + traceback.format_exc()
56+
xbmc.log(ADDON_ID + "-" + ADDON_VERSION + "-" + msg, level)
5857

5958

6059
def get_params():
@@ -79,31 +78,31 @@ def run():
7978
except Exception:
8079
mode = None
8180
try:
82-
page_hash = unquote_plus(params['page_hash'])
81+
page_hash = unquote_plus(params["page_hash"])
8382
except Exception:
8483
page_hash = None
8584
try:
86-
page = unquote_plus(params['page'])
85+
page = unquote_plus(params["page"])
8786
except Exception:
8887
page = None
8988

90-
log('Mode: ' + str(mode))
91-
log('URL : ' + str(url))
92-
log('Name: ' + str(name))
93-
log('Page Hash: ' + str(page_hash))
94-
log('Page: ' + str(page))
89+
log("Mode: " + str(mode))
90+
log("URL : " + str(url))
91+
log("Name: " + str(name))
92+
log("Page Hash: " + str(page_hash))
93+
log("Page: " + str(page))
9594

9695
if mode is None:
9796
identifiers = [
98-
'All_Shows',
99-
'Favourite_Shows',
100-
'Newest_Favourite_Shows',
101-
'Homepage',
102-
'Topics',
103-
'Most_Searched_TV_Shows',
104-
'Shows_By_Date',
105-
'Search',
106-
'SRF_YouTube'
97+
"All_Shows",
98+
"Favourite_Shows",
99+
"Newest_Favourite_Shows",
100+
"Homepage",
101+
"Topics",
102+
"Most_Searched_TV_Shows",
103+
"Shows_By_Date",
104+
"Search",
105+
"SRF_YouTube",
107106
]
108107
SRFPlayTV().menu_builder.build_main_menu(identifiers)
109108
elif mode == 10:
@@ -132,14 +131,16 @@ def run():
132131
SRFPlayTV().menu_builder.build_search_menu()
133132
elif mode == 28:
134133
SRFPlayTV().menu_builder.build_search_media_menu(
135-
mode=mode, name=name, page=page, page_hash=page_hash)
134+
mode=mode, name=name, page=page, page_hash=page_hash
135+
)
136136
elif mode == 70:
137137
SRFPlayTV().menu_builder.build_recent_search_menu()
138138
elif mode == 30:
139139
SRFPlayTV().youtube_builder.build_youtube_channel_overview_menu(33)
140140
elif mode == 33:
141141
SRFPlayTV().youtube_builder.build_youtube_channel_menu(
142-
name, mode, page=page, page_token=page_hash)
142+
name, mode, page=page, page_token=page_hash
143+
)
143144
elif mode == 50:
144145
SRFPlayTV().player.play_video(name)
145146
elif mode == 100:

0 commit comments

Comments
 (0)