feat: add auto-update option for yt-dlp in settings

This commit is contained in:
MasterAcnolo
2026-10-28 17:46:43 +01:00
parent dc898e1235
commit 1b83272aaf
4 changed files with 16 additions and 0 deletions

View File

@@ -231,6 +231,7 @@ Freedom Loader can be configured either through the settings panel in the UI or
"addThumbnail": true, "addThumbnail": true,
"addMetadata": true, "addMetadata": true,
"verboseLogs": false, "verboseLogs": false,
"autoUpdateYtDlp": true,
"autoDownloadPlaylist": true, "autoDownloadPlaylist": true,
"keepPlaylistOrder": false, "keepPlaylistOrder": false,
"createPlaylistFolders": true, "createPlaylistFolders": true,
@@ -255,6 +256,7 @@ Freedom Loader can be configured either through the settings panel in the UI or
| `addThumbnail` | boolean | `true` | Embed thumbnail in downloaded audio files | | `addThumbnail` | boolean | `true` | Embed thumbnail in downloaded audio files |
| `addMetadata` | boolean | `true` | Add metadata tags to downloaded files | | `addMetadata` | boolean | `true` | Add metadata tags to downloaded files |
| `verboseLogs` | boolean | `false` | Enable detailed logging for debugging | | `verboseLogs` | boolean | `false` | Enable detailed logging for debugging |
| `autoUpdateYtDlp` | boolean | `true` | Automatically update yt-dlp when the app starts |
| `autoDownloadPlaylist` | boolean | `true` | Automatically download entire playlists | | `autoDownloadPlaylist` | boolean | `true` | Automatically download entire playlists |
| `keepPlaylistOrder` | boolean | `false` | Add index before title, usefull for album | | `keepPlaylistOrder` | boolean | `false` | Add index before title, usefull for album |
| `createPlaylistFolders` | boolean | `false` | Automatically create a folder for a playlist | | `createPlaylistFolders` | boolean | `false` | Automatically create a folder for a playlist |

View File

@@ -5,6 +5,7 @@
"addThumbnail": true, "addThumbnail": true,
"addMetadata": true, "addMetadata": true,
"verboseLogs": false, "verboseLogs": false,
"autoUpdateYtDlp": true,
"autoDownloadPlaylist": true, "autoDownloadPlaylist": true,
"keepPlaylistOrder": false, "keepPlaylistOrder": false,
"createPlaylistFolders": false, "createPlaylistFolders": false,

View File

@@ -145,7 +145,12 @@ app.whenReady().then(async () => {
if (!devMode && !checkNativeDependencies()) return; if (!devMode && !checkNativeDependencies()) return;
const { userYtDlp } = require("./server/helpers/path.helpers"); const { userYtDlp } = require("./server/helpers/path.helpers");
if (configFeatures.autoUpdateYtDlp !== false) {
updateYtDlp(userYtDlp); updateYtDlp(userYtDlp);
} else {
logger.info("yt-dlp automatic updates skipped.");
}
try { try {
setSplashProgress(0); // Checking dependencies setSplashProgress(0); // Checking dependencies

View File

@@ -217,6 +217,14 @@
</div> </div>
</div> </div>
<div class="setting-item">
<input data-key="autoUpdateYtDlp" id="autoUpdateYtDlp" type="checkbox">
<div class="setting-info">
<span class="setting-title">Automatically Update yt-dlp</span>
<small>Check for and install yt-dlp updates when the application starts.</small>
</div>
</div>
</details> </details>
<div class="settings-footer"> <div class="settings-footer">