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:
commit
01db2df729
|
|
@ -23,7 +23,7 @@ class VideoQueryBuilder:
|
|||
VideoTypeEnum.SHORTS: self.shorts_query,
|
||||
}
|
||||
|
||||
if video_type:
|
||||
if video_type and video_type != VideoTypeEnum.UNKNOWN:
|
||||
# build query for specific type/s
|
||||
if not isinstance(video_type, list):
|
||||
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)]
|
||||
|
||||
|
||||
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):
|
||||
"""with overwrite from channel config"""
|
||||
builder = VideoQueryBuilder(default_config, overwrites)
|
||||
|
|
|
|||
|
|
@ -160,7 +160,6 @@ class SearchProcess:
|
|||
"playlist_last_refresh": playlist_last_refresh,
|
||||
}
|
||||
)
|
||||
print(playlist_dict)
|
||||
|
||||
return dict(sorted(playlist_dict.items()))
|
||||
|
||||
|
|
|
|||
|
|
@ -386,7 +386,7 @@ class PendingList(PendingIndex):
|
|||
and video_data["vid_type"]
|
||||
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":
|
||||
return VideoTypeEnum.STREAMS.value
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import { useOutletContext, useParams } from 'react-router-dom';
|
||||
import Notifications from '../components/Notifications';
|
||||
import PlaylistList from '../components/PlaylistList';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { OutletContextType } from './Base';
|
||||
|
|
@ -58,8 +57,6 @@ const ChannelPlaylist = () => {
|
|||
<title>TA | Channel: Playlists</title>
|
||||
<ScrollToTopOnNavigate />
|
||||
<div className="boxed-content">
|
||||
<Notifications pageName="channel" includeReindex={true} />
|
||||
|
||||
<div className="view-controls">
|
||||
<div className="toggle">
|
||||
<span>Show subscribed only:</span>
|
||||
|
|
|
|||
Loading…
Reference in New Issue