implement bulk add subscriptions in appsettings

This commit is contained in:
Simon
2025-07-11 16:45:00 +07:00
parent 05ce2a7034
commit fa7643e903
17 changed files with 486 additions and 486 deletions

View File

@@ -6,6 +6,7 @@ export type AppSettingsConfigType = {
live_channel_size: number | null;
shorts_channel_size: number | null;
auto_start: boolean;
extract_flat: boolean;
};
downloads: {
limit_speed: number | null;

View File

@@ -42,6 +42,7 @@ const SettingsApplication = () => {
const [livePageSize, setLivePageSize] = useState<number | null>(null);
const [shortPageSize, setShortPageSize] = useState<number | null>(null);
const [isAutostart, setIsAutostart] = useState<boolean>(false);
const [isExtractFlat, setIsExtractFlat] = useState<boolean>(false);
// Downloads
const [currentDownloadSpeed, setCurrentDownloadSpeed] = useState<number | null>(null);
@@ -98,6 +99,7 @@ const SettingsApplication = () => {
setLivePageSize(appSettingsConfigData?.subscriptions.live_channel_size || null);
setShortPageSize(appSettingsConfigData?.subscriptions.shorts_channel_size || null);
setIsAutostart(appSettingsConfigData?.subscriptions.auto_start || false);
setIsExtractFlat(appSettingsConfigData?.subscriptions.extract_flat || false);
// Downloads
setCurrentDownloadSpeed(appSettingsConfigData?.downloads.limit_speed || null);
@@ -212,6 +214,10 @@ const SettingsApplication = () => {
Autostart automatically starts downloading videos from subscriptions with
priority.
</li>
<li>
Fast add extracts and adds videos in bulk. That is much faster but is not able
to extract as much metadata during adding to the queue.
</li>
</ul>
</div>
)}
@@ -264,6 +270,16 @@ const SettingsApplication = () => {
updateCallback={handleUpdateConfig}
/>
</div>
<div className="settings-box-wrapper">
<div>
<p>Fast add</p>
</div>
<ToggleConfig
name="subscriptions.extract_flat"
value={isExtractFlat}
updateCallback={handleUpdateConfig}
/>
</div>
</div>
<div className="info-box-item">
<h2 id="downloads">Downloads</h2>

View File

@@ -13,6 +13,7 @@ export const useAppSettingsStore = create<AppSettingsState>(set => ({
live_channel_size: null,
shorts_channel_size: null,
auto_start: false,
extract_flat: false,
},
downloads: {
limit_speed: null,