Automatically press the retry button when something goes wrong. Mostly meant to fix error 429 but also works for other errors.
< 腳本Auto Retry for lucida.to的回應
this script works only when you're downloading a list of songs like an album or a playlist, because the retry button doesn't pop up when you get the error while downloading individual songs (at least for the error code 429). so i asked chatgpt to cook up a new script and here's what i found that works flawlessly for me:
// ==UserScript==
// @name Auto Retry for lucida.to (tracks & albums)
// @author cracktorio
// @namespace https://cracktorio.net/
// @version 1.2
// @description Automatically retry on Tidal 429 errors by clicking “Retry” on albums or re-clicking “Download” on single tracks.
// @match *://lucida.to/*
// @match *://lucida.su/*
// @grant none
// @license GNU GPLv3
// @downloadURL https://update.greasyfork.org/scripts/514514/Auto%20Retry%20for%20lucidato.user.js
// @updateURL https://update.greasyfork.org/scripts/514514/Auto%20Retry%20for%20lucidato.meta.js
// ==/UserScript==
(function() {
'use strict';
const ERROR_CONTAINER = '#zip-error';
const RETRY_BTN = 'button[data-action="retry"]';
const DOWNLOAD_BTN = 'button.download-button';
console.log('[AutoRetry] script initialized.');
setInterval(() => {
const errDiv = document.querySelector(ERROR_CONTAINER);
if (!errDiv) return;
const style = window.getComputedStyle(errDiv);
if (style.display === 'none') return;
// If it's an album page with a retry button, click that first
const retry = document.querySelector(RETRY_BTN);
if (retry) {
console.log('[AutoRetry] Detected album error – clicking Retry.');
setTimeout(() => retry.click(), 200);
return;
}
// Otherwise assume single-track page: re-click the Download button
const dl = document.querySelector(DOWNLOAD_BTN);
if (dl) {
console.log('[AutoRetry] Detected track error – re-clicking Download.');
setTimeout(() => dl.click(), 200);
}
}, 2000);
})();
Amazing Job!