@@ -71,14 +71,14 @@ async def re_verify(paused, resumed, hash_id):
71
71
await qbittorrent .torrents .file_prio (
72
72
hash = hash_id , id = paused , priority = 0
73
73
)
74
- except ClientError as e :
74
+ except ( ClientError , TimeoutError ) as e :
75
75
LOGGER .error (f"{ e } Errored in reverification paused!" )
76
76
if resumed :
77
77
try :
78
78
await qbittorrent .torrents .file_prio (
79
79
hash = hash_id , id = resumed , priority = 1
80
80
)
81
- except ClientError as e :
81
+ except ( ClientError , TimeoutError ) as e :
82
82
LOGGER .error (f"{ e } Errored in reverification resumed!" )
83
83
k += 1
84
84
if k > 5 :
@@ -184,7 +184,7 @@ async def handle_torrent(request: Request):
184
184
op = await aria2 .getOption (gid )
185
185
fpath = f"{ op ['dir' ]} /"
186
186
content = make_tree (res , "aria2" , fpath )
187
- except (Exception , ClientError ) as e :
187
+ except (ClientError , TimeoutError ) as e :
188
188
LOGGER .error (str (e ))
189
189
content = {
190
190
"files" : [],
@@ -203,7 +203,7 @@ async def handle_rename(gid, data):
203
203
await qbittorrent .torrents .rename_file (hash = gid , ** data )
204
204
else :
205
205
await qbittorrent .torrents .rename_folder (hash = gid , ** data )
206
- except ClientError as e :
206
+ except ( ClientError , TimeoutError ) as e :
207
207
LOGGER .error (f"{ e } Errored in renaming" )
208
208
209
209
@@ -218,14 +218,14 @@ async def set_qbittorrent(gid, selected_files, unselected_files):
218
218
await qbittorrent .torrents .file_prio (
219
219
hash = gid , id = unselected_files , priority = 0
220
220
)
221
- except ClientError as e :
221
+ except ( ClientError , TimeoutError ) as e :
222
222
LOGGER .error (f"{ e } Errored in paused" )
223
223
if selected_files :
224
224
try :
225
225
await qbittorrent .torrents .file_prio (
226
226
hash = gid , id = selected_files , priority = 1
227
227
)
228
- except ClientError as e :
228
+ except ( ClientError , TimeoutError ) as e :
229
229
LOGGER .error (f"{ e } Errored in resumed" )
230
230
await sleep (0.5 )
231
231
if not await re_verify (unselected_files , selected_files , gid ):
0 commit comments