mirror of
https://git.vectorsigma.ru/public/tubearchivist.git
synced 2026-08-04 22:39:38 +00:00
Channel about POST, #build
Changed: - Fixed channel about POST request response type - Fixed modal shortcuts ignoring modifier keys
This commit is contained in:
@@ -228,7 +228,6 @@ class VideoProgressView(ApiBaseView):
|
|||||||
|
|
||||||
current_progress.update({"watched": watched})
|
current_progress.update({"watched": watched})
|
||||||
redis_con.set_message(key, current_progress, expire=expire)
|
redis_con.set_message(key, current_progress, expire=expire)
|
||||||
print(current_progress)
|
|
||||||
|
|
||||||
response_serializer = PlayerSerializer(current_progress)
|
response_serializer = PlayerSerializer(current_progress)
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import APIClient from '../../functions/APIClient';
|
import APIClient from '../../functions/APIClient';
|
||||||
|
import { ChannelResponseType } from '../../pages/ChannelBase';
|
||||||
|
|
||||||
const loadChannelById = async (youtubeChannelId: string) => {
|
const loadChannelById = async (youtubeChannelId: string): Promise<ChannelResponseType> => {
|
||||||
return APIClient(`/api/channel/${youtubeChannelId}/`);
|
return APIClient(`/api/channel/${youtubeChannelId}/`);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,13 @@ export function useKeyPress(targetKey: string) {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const handleKeyDown = (event: KeyboardEvent) => {
|
const handleKeyDown = (event: KeyboardEvent) => {
|
||||||
if (event.key === targetKey) {
|
if (
|
||||||
|
event.key === targetKey &&
|
||||||
|
!event.ctrlKey &&
|
||||||
|
!event.metaKey &&
|
||||||
|
!event.altKey &&
|
||||||
|
!event.altKey
|
||||||
|
) {
|
||||||
setIsKeyPressed(true);
|
setIsKeyPressed(true);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -63,20 +63,16 @@ const ChannelAbout = () => {
|
|||||||
const channelResponse = await loadChannelById(channelId);
|
const channelResponse = await loadChannelById(channelId);
|
||||||
|
|
||||||
setChannelResponse(channelResponse);
|
setChannelResponse(channelResponse);
|
||||||
setDownloadFormat(channelResponse?.data?.channel_overwrites?.download_format ?? null);
|
setDownloadFormat(channelResponse?.channel_overwrites?.download_format ?? null);
|
||||||
setAutoDeleteAfter(channelResponse?.data?.channel_overwrites?.autodelete_days ?? null);
|
setAutoDeleteAfter(channelResponse?.channel_overwrites?.autodelete_days ?? null);
|
||||||
setIndexPlaylists(channelResponse?.data?.channel_overwrites?.index_playlists ?? null);
|
setIndexPlaylists(channelResponse?.channel_overwrites?.index_playlists ?? false);
|
||||||
setEnableSponsorblock(
|
setEnableSponsorblock(channelResponse?.channel_overwrites?.integrate_sponsorblock ?? null);
|
||||||
channelResponse?.data?.channel_overwrites?.integrate_sponsorblock ?? null,
|
setPageSizeVideo(channelResponse?.channel_overwrites?.subscriptions_channel_size ?? null);
|
||||||
);
|
|
||||||
setPageSizeVideo(
|
|
||||||
channelResponse?.data?.channel_overwrites?.subscriptions_channel_size ?? null,
|
|
||||||
);
|
|
||||||
setPageSizeShorts(
|
setPageSizeShorts(
|
||||||
channelResponse?.data?.channel_overwrites?.subscriptions_shorts_channel_size ?? null,
|
channelResponse?.channel_overwrites?.subscriptions_shorts_channel_size ?? null,
|
||||||
);
|
);
|
||||||
setPageSizeStreams(
|
setPageSizeStreams(
|
||||||
channelResponse?.data?.channel_overwrites?.subscriptions_live_channel_size ?? null,
|
channelResponse?.channel_overwrites?.subscriptions_live_channel_size ?? null,
|
||||||
);
|
);
|
||||||
|
|
||||||
setRefresh(false);
|
setRefresh(false);
|
||||||
|
|||||||
@@ -17,13 +17,13 @@ import { useUserConfigStore } from '../stores/UserConfigStore';
|
|||||||
import updateUserConfig, { UserConfigType } from '../api/actions/updateUserConfig';
|
import updateUserConfig, { UserConfigType } from '../api/actions/updateUserConfig';
|
||||||
|
|
||||||
type ChannelOverwritesType = {
|
type ChannelOverwritesType = {
|
||||||
download_format?: string;
|
download_format: string | null;
|
||||||
autodelete_days?: number;
|
autodelete_days: number | null;
|
||||||
index_playlists?: boolean;
|
index_playlists: boolean | null;
|
||||||
integrate_sponsorblock?: boolean | null;
|
integrate_sponsorblock: boolean | null;
|
||||||
subscriptions_channel_size?: number;
|
subscriptions_channel_size: number | null;
|
||||||
subscriptions_live_channel_size?: number;
|
subscriptions_live_channel_size: number | null;
|
||||||
subscriptions_shorts_channel_size?: number;
|
subscriptions_shorts_channel_size: number | null;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ChannelType = {
|
export type ChannelType = {
|
||||||
|
|||||||
Reference in New Issue
Block a user