@@ -10,7 +10,7 @@ module Invidious::Search
1010 Playlist # "Add playlist item" search
1111 end
1212
13- @ type : Type = Type ::Regular
13+ getter type : Type = Type ::Regular
1414
1515 @raw_query : String
1616 @query : String = " "
@@ -63,14 +63,17 @@ module Invidious::Search
6363
6464 # Specific handling
6565 case @type
66- when .playlist?, .channel?
67- # In "add playlist item" mode, filters are parsed from the query
68- # string itself (legacy), and the channel is ignored.
69- #
66+ when .channel?
7067 # In "channel search" mode, filters are ignored, but we still parse
7168 # the query prevent transmission of legacy filters to youtube.
7269 #
73- @filters , @query , @channel , _ = Filters .from_legacy_filters(@raw_query || " " )
70+ _, _, @query , _ = Filters .from_legacy_filters(@raw_query )
71+ #
72+ when .playlist?
73+ # In "add playlist item" mode, filters are parsed from the query
74+ # string itself (legacy), and the channel is ignored.
75+ #
76+ @filters , _, @query , _ = Filters .from_legacy_filters(@raw_query )
7477 #
7578 when .subscriptions?, .regular?
7679 if params[" sp" ]?
@@ -84,7 +87,7 @@ module Invidious::Search
8487
8588 if @filters .default? && @raw_query .includes?(':' )
8689 # Parse legacy filters from query
87- @filters , @query , @channel , subs = Filters .from_legacy_filters(@raw_query || " " )
90+ @filters , @channel , @query , subs = Filters .from_legacy_filters(@raw_query )
8891 else
8992 @query = @raw_query || " "
9093 end
0 commit comments