@@ -68,7 +68,7 @@ def remove_previous_torrent_from_qbittorrent(qb, new_info_hash):
6868 # Remove previous torrents
6969 if info_hash_list :
7070 print (
71- "Удаление предыдущих раздач этого торрента: {}" . format ( info_hash_list )
71+ f "Удаление предыдущих раздач этого торрента: { info_hash_list } "
7272 )
7373 qb .delete (info_hash_list )
7474
@@ -95,13 +95,11 @@ def remove_previous_torrent_from_qbittorrent(qb, new_info_hash):
9595 torrent_url
9696 )
9797 print (
98- "{}: Проверка {}: {} / {}" .format (
99- today , torrent_url , torrent_file_url , info_hash
100- )
98+ f"{ today } : Проверка { torrent_url } : { torrent_file_url } / { info_hash } "
10199 )
102100
103101 if qb .get_torrent (info_hash ):
104- print ("Торрент {} уже есть в списке раздачи" . format ( info_hash ) )
102+ print (f "Торрент { info_hash } уже есть в списке раздачи" )
105103
106104 else :
107105 if info_hash != last_info_hash :
@@ -117,14 +115,12 @@ def remove_previous_torrent_from_qbittorrent(qb, new_info_hash):
117115
118116 if last_info_hash is None :
119117 print (
120- "Добавление торрента с {} файлами: {}" .format (
121- len (new_files ), new_files
122- )
118+ f"Добавление торрента с { len (new_files )} файлами: { new_files } "
123119 )
124120 else :
125121 print ("Торрент изменился, пора его перекачивать" )
126122 print (
127- "Добавлено {} файлов: {}" . format ( len ( new_files ), new_files )
123+ f "Добавлено { len ( new_files ) } файлов: { new_files } "
128124 )
129125
130126 last_info_hash = info_hash
@@ -138,7 +134,7 @@ def remove_previous_torrent_from_qbittorrent(qb, new_info_hash):
138134 url = "https://sms.ru/sms/send?api_id={api_id}&to={to}&text={text}" .format (
139135 api_id = API_ID ,
140136 to = TO ,
141- text = "Вышла новая серия '{}'" . format ( torrent [" info" ][ " name" ]) ,
137+ text = f "Вышла новая серия '{ torrent [' info' ][ ' name' ] } '" ,
142138 )
143139 rs = requests .get (url )
144140 print (rs .text )
0 commit comments