mirror of
https://git.vectorsigma.ru/public/tubearchivist.git
synced 2026-08-04 23:49:38 +00:00
add per playlist page size
This commit is contained in:
@@ -5,6 +5,7 @@ export type AppSettingsConfigType = {
|
||||
channel_size: number | null;
|
||||
live_channel_size: number | null;
|
||||
shorts_channel_size: number | null;
|
||||
playlist_size: number | null;
|
||||
auto_start: boolean;
|
||||
extract_flat: boolean;
|
||||
};
|
||||
|
||||
@@ -41,6 +41,7 @@ const SettingsApplication = () => {
|
||||
const [videoPageSize, setVideoPageSize] = useState<number | null>(null);
|
||||
const [livePageSize, setLivePageSize] = useState<number | null>(null);
|
||||
const [shortPageSize, setShortPageSize] = useState<number | null>(null);
|
||||
const [playlistPageSize, setPlaylistPageSize] = useState<number | null>(null);
|
||||
const [isAutostart, setIsAutostart] = useState<boolean>(false);
|
||||
const [isExtractFlat, setIsExtractFlat] = useState<boolean>(false);
|
||||
|
||||
@@ -98,6 +99,7 @@ const SettingsApplication = () => {
|
||||
setVideoPageSize(appSettingsConfigData?.subscriptions.channel_size || null);
|
||||
setLivePageSize(appSettingsConfigData?.subscriptions.live_channel_size || null);
|
||||
setShortPageSize(appSettingsConfigData?.subscriptions.shorts_channel_size || null);
|
||||
setPlaylistPageSize(appSettingsConfigData?.subscriptions.playlist_size || null);
|
||||
setIsAutostart(appSettingsConfigData?.subscriptions.auto_start || false);
|
||||
setIsExtractFlat(appSettingsConfigData?.subscriptions.extract_flat || false);
|
||||
|
||||
@@ -260,6 +262,19 @@ const SettingsApplication = () => {
|
||||
updateCallback={handleUpdateConfig}
|
||||
/>
|
||||
</div>
|
||||
<div className="settings-box-wrapper">
|
||||
<div>
|
||||
<p>Playlist page size</p>
|
||||
</div>
|
||||
<InputConfig
|
||||
type="number"
|
||||
name="subscriptions.playlist_size"
|
||||
value={playlistPageSize}
|
||||
setValue={setPlaylistPageSize}
|
||||
oldValue={appSettingsConfig?.subscriptions.playlist_size}
|
||||
updateCallback={handleUpdateConfig}
|
||||
/>
|
||||
</div>
|
||||
<div className="settings-box-wrapper">
|
||||
<div>
|
||||
<p>Autostart download subscriptions</p>
|
||||
|
||||
@@ -12,6 +12,7 @@ export const useAppSettingsStore = create<AppSettingsState>(set => ({
|
||||
channel_size: null,
|
||||
live_channel_size: null,
|
||||
shorts_channel_size: null,
|
||||
playlist_size: null,
|
||||
auto_start: false,
|
||||
extract_flat: false,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user