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,
"addMetadata": true,
"verboseLogs": false,
"autoUpdateYtDlp": true,
"autoDownloadPlaylist": true,
"keepPlaylistOrder": false,
"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 |
| `addMetadata` | boolean | `true` | Add metadata tags to downloaded files |
| `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 |
| `keepPlaylistOrder` | boolean | `false` | Add index before title, usefull for album |
| `createPlaylistFolders` | boolean | `false` | Automatically create a folder for a playlist |

View File

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

View File

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

View File

@@ -217,6 +217,14 @@
</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>
<div class="settings-footer">