diff --git a/src/App.tsx b/src/App.tsx index 822245c..e3845e0 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -55,6 +55,7 @@ export default function App({ children }: { children: React.ReactNode }) { const MAX_PARALLEL_DOWNLOADS = useSettingsPageStatesStore(state => state.settings.max_parallel_downloads); const DOWNLOAD_DIR = useSettingsPageStatesStore(state => state.settings.download_dir); const PREFER_VIDEO_OVER_PLAYLIST = useSettingsPageStatesStore(state => state.settings.prefer_video_over_playlist); + const SHOW_DOWNLOADABLE_STREAMS_ONLY = useSettingsPageStatesStore(state => state.settings.show_downloadable_streams_only); const USE_PROXY = useSettingsPageStatesStore(state => state.settings.use_proxy); const PROXY_URL = useSettingsPageStatesStore(state => state.settings.proxy_url); const VIDEO_FORMAT = useSettingsPageStatesStore(state => state.settings.video_format); @@ -95,6 +96,7 @@ export default function App({ children }: { children: React.ReactNode }) { if (formatId) args.push('-f', formatId); if (playlistIndex) args.push('--playlist-items', playlistIndex); if (PREFER_VIDEO_OVER_PLAYLIST) args.push('--no-playlist'); + if (SHOW_DOWNLOADABLE_STREAMS_ONLY) args.push('--check-all-formats'); if (USE_PROXY && PROXY_URL) args.push('--proxy', PROXY_URL); const command = Command.sidecar('binaries/yt-dlp', args); diff --git a/src/pages/settings.tsx b/src/pages/settings.tsx index a354447..60584ea 100644 --- a/src/pages/settings.tsx +++ b/src/pages/settings.tsx @@ -60,6 +60,7 @@ export default function SettingsPage() { const appTheme = useSettingsPageStatesStore(state => state.settings.theme); const maxParallelDownloads = useSettingsPageStatesStore(state => state.settings.max_parallel_downloads); const preferVideoOverPlaylist = useSettingsPageStatesStore(state => state.settings.prefer_video_over_playlist); + const showDownloadableStreamsOnly = useSettingsPageStatesStore(state => state.settings.show_downloadable_streams_only); const useProxy = useSettingsPageStatesStore(state => state.settings.use_proxy); const proxyUrl = useSettingsPageStatesStore(state => state.settings.proxy_url); const videoFormat = useSettingsPageStatesStore(state => state.settings.video_format); @@ -341,6 +342,15 @@ export default function SettingsPage() { onCheckedChange={(checked) => saveSettingsKey('prefer_video_over_playlist', checked)} /> +
+

Show Downloadable Streams Only (Strict)

+

Check, filter-out and show the streams that are actualy downloadable (high quality results, takes longer time to search, start a download)

+ saveSettingsKey('show_downloadable_streams_only', checked)} + /> +
diff --git a/src/services/store.ts b/src/services/store.ts index d7820a5..c4721be 100644 --- a/src/services/store.ts +++ b/src/services/store.ts @@ -107,6 +107,7 @@ export const useSettingsPageStatesStore = create((set) theme: 'system', download_dir: '', prefer_video_over_playlist: true, + show_downloadable_streams_only: false, max_parallel_downloads: 2, use_proxy: false, proxy_url: '', @@ -147,6 +148,7 @@ export const useSettingsPageStatesStore = create((set) theme: 'system', download_dir: '', prefer_video_over_playlist: true, + show_downloadable_streams_only: false, max_parallel_downloads: 2, use_proxy: false, proxy_url: '', diff --git a/src/types/settings.ts b/src/types/settings.ts index 13b2756..f3f8f4c 100644 --- a/src/types/settings.ts +++ b/src/types/settings.ts @@ -10,6 +10,7 @@ export interface Settings { download_dir: string; max_parallel_downloads: number; prefer_video_over_playlist: boolean; + show_downloadable_streams_only: boolean; use_proxy: boolean; proxy_url: string; video_format: string;