fix: fetch artist albums continuation

This commit is contained in:
ThetaDev 2024-10-22 23:56:59 +02:00
parent be18d89ea6
commit b589061a40
No known key found for this signature in database
GPG key ID: E319D3C5148D65B6
17 changed files with 50309 additions and 38906 deletions

View file

@ -23,9 +23,10 @@ pub enum ChannelVideoTab {
}
/// Sort order for channel videos
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Default, Debug, Clone, Copy, PartialEq, Eq)]
pub enum ChannelOrder {
/// Order videos with the latest upload date first (default)
#[default]
Latest = 1,
/// Order videos with the highest number of views first
Popular = 2,
@ -43,3 +44,23 @@ impl ChannelVideoTab {
}
}
}
/// Sort order for YTM artist albums
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum AlbumOrder {
/// Sort albums by release date
Recency = 1,
/// Sort albums by popularity
Popularity = 2,
/// Sort albums by their name
Alphabetical = 3,
}
/// Filter for YTM artist albums
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum AlbumFilter {
/// Only show albums
Albums = 1,
/// Only show singles
Singles = 2,
}

View file

@ -204,7 +204,7 @@ impl SearchFilter {
if let Some(sort) = self.sort {
pb.varint(1, sort as u64);
}
if !filters.bytes.is_empty() {
if !filters.is_empty() {
pb.embedded(2, filters);
}
if self.verbatim {