better
This commit is contained in:
parent
ffde9d07d8
commit
8305cb6b47
5 changed files with 2905 additions and 4 deletions
|
|
@ -1 +1 @@
|
||||||
{"access_token": "BQDMFbkA-dtq-QJ-vhjYwLpCBIZLIVCLyfkQCuRe2p3O4NVfD_nnJs9zkeCIRz91Dxi8InIERq-ZYki_aOAsbkBSF4_yUjtgjL4ygY14UbvHicIhtMwd33zP8Zj0ekdyK60mOIoOrAR4DHUZJW8B25GD4B6SgLTipTId_HzhwJATffuuQwCkz_8q8NN40CL3qXHuM9wKAtluf75GjovVTeSg_hHVWrP2mWQZPCsrpE5baIjK2Fkes3k1gPi0hd_d", "token_type": "Bearer", "expires_in": 3600, "scope": "user-library-read user-read-private playlist-read-private playlist-read-collaborative user-read-email", "expires_at": 1752710282, "refresh_token": "AQDmfQkPCGObfJeTUIbW1hAAwhSqkuHRA3Qh2dqVYMRh0eCkFMQgPNJDDzF8y-BiaVbj80zePkK_XSfYH1aJutMtNbnsqRKWuxP31BTrMc7pdUdbE7Fma4oH8wpDUKdG3MM"}
|
{"access_token": "BQAvuN5wZDy6V7W-4bS66mKvl98xNOZHUZkfjSTBGVIaOEqXbcmLJbrGY1mtr2Pu6umdBEQSQyJwr1Azdgwuh17nrwBSAlD8XLU3QpK_bXJVnDL5glK2zdJN0edeESfE1oV0GF8k9leLH0NlDWihE-AGPWLH8jF8WDPanX-qfZDtttQk6IZWhvkVlTpwinc25nImBprjXrT8i-qgnGoleSlhfJEc6Eh4X7q-yrYr2aHxWVi0vaQM_hHxPw4Ds0A4", "token_type": "Bearer", "expires_in": 3600, "scope": "user-library-read user-read-private playlist-read-private playlist-read-collaborative user-read-email", "expires_at": 1752723839, "refresh_token": "AQDmfQkPCGObfJeTUIbW1hAAwhSqkuHRA3Qh2dqVYMRh0eCkFMQgPNJDDzF8y-BiaVbj80zePkK_XSfYH1aJutMtNbnsqRKWuxP31BTrMc7pdUdbE7Fma4oH8wpDUKdG3MM"}
|
||||||
Binary file not shown.
2889
logs/app.log
2889
logs/app.log
File diff suppressed because it is too large
Load diff
Binary file not shown.
|
|
@ -10005,9 +10005,9 @@ class DownloadsPage(QWidget):
|
||||||
"""Find downloads that need cleanup in the next tick"""
|
"""Find downloads that need cleanup in the next tick"""
|
||||||
try:
|
try:
|
||||||
# Get current downloads from backend
|
# Get current downloads from backend
|
||||||
def check_backend_downloads():
|
async def check_backend_downloads():
|
||||||
try:
|
try:
|
||||||
result = self.soulseek_client.get_all_downloads()
|
result = await self.soulseek_client.get_all_downloads()
|
||||||
if result:
|
if result:
|
||||||
bulk_cleanup_states = {'Completed, Succeeded', 'Completed, Cancelled', 'Cancelled', 'Canceled'}
|
bulk_cleanup_states = {'Completed, Succeeded', 'Completed, Cancelled', 'Cancelled', 'Canceled'}
|
||||||
individual_cleanup_states = {'Completed, Errored', 'Failed', 'Errored'}
|
individual_cleanup_states = {'Completed, Errored', 'Failed', 'Errored'}
|
||||||
|
|
@ -10041,9 +10041,21 @@ class DownloadsPage(QWidget):
|
||||||
print(f"[ERROR] Error checking backend downloads: {e}")
|
print(f"[ERROR] Error checking backend downloads: {e}")
|
||||||
|
|
||||||
# Run in background to avoid blocking UI
|
# Run in background to avoid blocking UI
|
||||||
|
def run_check():
|
||||||
|
import asyncio
|
||||||
|
try:
|
||||||
|
loop = asyncio.new_event_loop()
|
||||||
|
asyncio.set_event_loop(loop)
|
||||||
|
loop.run_until_complete(check_backend_downloads())
|
||||||
|
finally:
|
||||||
|
try:
|
||||||
|
loop.close()
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
|
||||||
from concurrent.futures import ThreadPoolExecutor
|
from concurrent.futures import ThreadPoolExecutor
|
||||||
with ThreadPoolExecutor(max_workers=1) as executor:
|
with ThreadPoolExecutor(max_workers=1) as executor:
|
||||||
executor.submit(check_backend_downloads)
|
executor.submit(run_check)
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"[ERROR] Error finding downloads for cleanup: {e}")
|
print(f"[ERROR] Error finding downloads for cleanup: {e}")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue