@@ -287,11 +287,11 @@ def build_main_menu(self, identifiers=[]):
287287 'icon' : self .icon ,
288288 }, {
289289 # YouTube
290- 'identifier' : '%s_YouTube' % self .bu .upper (),
290+ 'identifier' : f' { self .bu .upper ()} _YouTube' ,
291291 'name' : self .plugin_language (30074 ),
292292 'mode' : 30 ,
293293 'displayItem' : self .get_boolean_setting (
294- '%s_YouTube' % self .bu .upper ()),
294+ f' { self .bu .upper ()} _YouTube' ),
295295 'icon' : self .get_youtube_icon (),
296296 }
297297 ]
@@ -553,9 +553,8 @@ def build_episode_menu(self, video_id, include_segments=True,
553553 """
554554 self .log (f'build_episode_menu, video_id = { video_id } ' )
555555 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'
559558 self .log (f'build_episode_menu. Open URL { json_url } ' )
560559 try :
561560 json_response = json .loads (self .open_url (json_url ))
@@ -1253,8 +1252,8 @@ def read_favourite_show_ids(self):
12531252 try :
12541253 return [entry ['id' ] for entry in json_file ]
12551254 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 } .' )
12581257 return []
12591258 except (IOError , TypeError ):
12601259 return []
@@ -1285,8 +1284,7 @@ def read_searches(self, filename):
12851284 try :
12861285 return [entry ['search' ] for entry in json_file ]
12871286 except KeyError :
1288- self .log ('Unexpected file structure for %s.' %
1289- filename )
1287+ self .log (f'Unexpected file structure for { filename } .' )
12901288 return []
12911289 except (IOError , TypeError ):
12921290 return []
@@ -1383,7 +1381,7 @@ def get_srf3_live_ids():
13831381 live_ids = get_live_ids ()
13841382 for lid in live_ids :
13851383 api_url = ('https://event.api.swisstxt.ch/v1/events/'
1386- '%s /byEventItemId/?eids=%s' ) % ( self . bu , lid )
1384+ f' { self . bu } /byEventItemId/?eids={ lid } ' )
13871385 live_json = json .loads (self .open_url (api_url ))
13881386 entry = utils .try_get (live_json , 0 , data_type = dict , default = {})
13891387 if not entry :
0 commit comments