mirror of
https://git.vectorsigma.ru/public/tubearchivist.git
synced 2026-08-05 01:29:24 +00:00
Channel extraction fix, #build
Changed: - Fix for channel all pages extraction - Fix duplicate channel playlist notification - Ensure vid type enum match when adding to queue
This commit is contained in:
@@ -23,7 +23,7 @@ class VideoQueryBuilder:
|
|||||||
VideoTypeEnum.SHORTS: self.shorts_query,
|
VideoTypeEnum.SHORTS: self.shorts_query,
|
||||||
}
|
}
|
||||||
|
|
||||||
if video_type:
|
if video_type and video_type != VideoTypeEnum.UNKNOWN:
|
||||||
# build query for specific type/s
|
# build query for specific type/s
|
||||||
if not isinstance(video_type, list):
|
if not isinstance(video_type, list):
|
||||||
video_type = [video_type]
|
video_type = [video_type]
|
||||||
|
|||||||
@@ -77,6 +77,17 @@ def test_build_multiple_queries(default_config, empty_overwrites):
|
|||||||
assert result == [(VideoTypeEnum.VIDEOS, 5), (VideoTypeEnum.SHORTS, 2)]
|
assert result == [(VideoTypeEnum.VIDEOS, 5), (VideoTypeEnum.SHORTS, 2)]
|
||||||
|
|
||||||
|
|
||||||
|
def test_build_unknown_queries(default_config, empty_overwrites):
|
||||||
|
"""vid_type unknown"""
|
||||||
|
builder = VideoQueryBuilder(default_config, empty_overwrites)
|
||||||
|
result = builder.build_queries(VideoTypeEnum.UNKNOWN)
|
||||||
|
assert result == [
|
||||||
|
(VideoTypeEnum.VIDEOS, 5),
|
||||||
|
(VideoTypeEnum.STREAMS, 3),
|
||||||
|
(VideoTypeEnum.SHORTS, 2),
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
def test_overwrite_applied(default_config, overwrites):
|
def test_overwrite_applied(default_config, overwrites):
|
||||||
"""with overwrite from channel config"""
|
"""with overwrite from channel config"""
|
||||||
builder = VideoQueryBuilder(default_config, overwrites)
|
builder = VideoQueryBuilder(default_config, overwrites)
|
||||||
|
|||||||
@@ -160,7 +160,6 @@ class SearchProcess:
|
|||||||
"playlist_last_refresh": playlist_last_refresh,
|
"playlist_last_refresh": playlist_last_refresh,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
print(playlist_dict)
|
|
||||||
|
|
||||||
return dict(sorted(playlist_dict.items()))
|
return dict(sorted(playlist_dict.items()))
|
||||||
|
|
||||||
|
|||||||
@@ -386,7 +386,7 @@ class PendingList(PendingIndex):
|
|||||||
and video_data["vid_type"]
|
and video_data["vid_type"]
|
||||||
and str(video_data["vid_type"]) in VideoTypeEnum.values_known()
|
and str(video_data["vid_type"]) in VideoTypeEnum.values_known()
|
||||||
):
|
):
|
||||||
return str(video_data["vid_type"])
|
return VideoTypeEnum(video_data["vid_type"]).value
|
||||||
|
|
||||||
if video_data.get("live_status") == "was_live":
|
if video_data.get("live_status") == "was_live":
|
||||||
return VideoTypeEnum.STREAMS.value
|
return VideoTypeEnum.STREAMS.value
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { useOutletContext, useParams } from 'react-router-dom';
|
import { useOutletContext, useParams } from 'react-router-dom';
|
||||||
import Notifications from '../components/Notifications';
|
|
||||||
import PlaylistList from '../components/PlaylistList';
|
import PlaylistList from '../components/PlaylistList';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import { OutletContextType } from './Base';
|
import { OutletContextType } from './Base';
|
||||||
@@ -58,8 +57,6 @@ const ChannelPlaylist = () => {
|
|||||||
<title>TA | Channel: Playlists</title>
|
<title>TA | Channel: Playlists</title>
|
||||||
<ScrollToTopOnNavigate />
|
<ScrollToTopOnNavigate />
|
||||||
<div className="boxed-content">
|
<div className="boxed-content">
|
||||||
<Notifications pageName="channel" includeReindex={true} />
|
|
||||||
|
|
||||||
<div className="view-controls">
|
<div className="view-controls">
|
||||||
<div className="toggle">
|
<div className="toggle">
|
||||||
<span>Show subscribed only:</span>
|
<span>Show subscribed only:</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user