@@ -287,11 +287,11 @@ def build_main_menu(self, identifiers=[]):
287
287
'icon' : self .icon ,
288
288
}, {
289
289
# YouTube
290
- 'identifier' : '%s_YouTube' % self .bu .upper (),
290
+ 'identifier' : f' { self .bu .upper ()} _YouTube' ,
291
291
'name' : self .plugin_language (30074 ),
292
292
'mode' : 30 ,
293
293
'displayItem' : self .get_boolean_setting (
294
- '%s_YouTube' % self .bu .upper ()),
294
+ f' { self .bu .upper ()} _YouTube' ),
295
295
'icon' : self .get_youtube_icon (),
296
296
}
297
297
]
@@ -553,9 +553,8 @@ def build_episode_menu(self, video_id, include_segments=True,
553
553
"""
554
554
self .log (f'build_episode_menu, video_id = { video_id } ' )
555
555
content_type = 'audio' if audio else 'video'
556
- json_url = ('https://il.srgssr.ch/integrationlayer/2.0/%s/'
557
- 'mediaComposition/%s/%s.json' ) % (self .bu , content_type ,
558
- video_id )
556
+ json_url = f'https://il.srgssr.ch/integrationlayer/2.0/{ self .bu } /' \
557
+ f'mediaComposition/{ content_type } /{ video_id } .json'
559
558
self .log (f'build_episode_menu. Open URL { json_url } ' )
560
559
try :
561
560
json_response = json .loads (self .open_url (json_url ))
@@ -1253,8 +1252,8 @@ def read_favourite_show_ids(self):
1253
1252
try :
1254
1253
return [entry ['id' ] for entry in json_file ]
1255
1254
except KeyError :
1256
- self .log ('Unexpected file structure for %s.' %
1257
- FAVOURITE_SHOWS_FILENAME )
1255
+ self .log ('Unexpected file structure '
1256
+ f'for { FAVOURITE_SHOWS_FILENAME } .' )
1258
1257
return []
1259
1258
except (IOError , TypeError ):
1260
1259
return []
@@ -1285,8 +1284,7 @@ def read_searches(self, filename):
1285
1284
try :
1286
1285
return [entry ['search' ] for entry in json_file ]
1287
1286
except KeyError :
1288
- self .log ('Unexpected file structure for %s.' %
1289
- filename )
1287
+ self .log (f'Unexpected file structure for { filename } .' )
1290
1288
return []
1291
1289
except (IOError , TypeError ):
1292
1290
return []
@@ -1383,7 +1381,7 @@ def get_srf3_live_ids():
1383
1381
live_ids = get_live_ids ()
1384
1382
for lid in live_ids :
1385
1383
api_url = ('https://event.api.swisstxt.ch/v1/events/'
1386
- '%s /byEventItemId/?eids=%s' ) % ( self . bu , lid )
1384
+ f' { self . bu } /byEventItemId/?eids={ lid } ' )
1387
1385
live_json = json .loads (self .open_url (api_url ))
1388
1386
entry = utils .try_get (live_json , 0 , data_type = dict , default = {})
1389
1387
if not entry :
0 commit comments