diff options
| author | Omar Roth <omarroth@hotmail.com> | 2019-03-17 18:31:11 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2019-03-17 18:31:11 -0500 |
| commit | 2ebc773863b13091d12439b24bb73ce1a012f11c (patch) | |
| tree | 71818b0747a1b5b9fcc2c2bffc6d00c6d5114536 /src/invidious.cr | |
| parent | 44f4057876e2dab0b04529d10456aa8e880c346b (diff) | |
| download | invidious-2ebc773863b13091d12439b24bb73ce1a012f11c.tar.gz invidious-2ebc773863b13091d12439b24bb73ce1a012f11c.tar.bz2 invidious-2ebc773863b13091d12439b24bb73ce1a012f11c.zip | |
Add mixes to genre channels
Diffstat (limited to 'src/invidious.cr')
| -rw-r--r-- | src/invidious.cr | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/invidious.cr b/src/invidious.cr index 375bb538..0a2174ce 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -2471,7 +2471,14 @@ get "/channel/:ucid" do |env| sort_by ||= "last" items, continuation = fetch_channel_playlists(ucid, author, auto_generated, continuation, sort_by) - items.select! { |item| item.is_a?(SearchPlaylist) && !item.videos.empty? } + items.uniq! do |item| + if item.responds_to?(:title) + item.title + elsif item.responds_to?(:author) + item.author + end + end + items.select! { |item| item.responds_to?(:thumbnail_id) && item.thumbnail_id } items = items.map { |item| item.as(SearchPlaylist) } items.each { |item| item.author = "" } else |
