mirror of
https://git.vectorsigma.ru/public/tubearchivist.git
synced 2026-08-04 22:39:38 +00:00
implement bulk add subscriptions in appsettings
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user