Skip to content

Commit ca4da7f

Browse files
committed
Fixed crash when search results contain non available item
1 parent 0aa77e3 commit ca4da7f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

YouTubeMusicAPI/Services/Search/SearchService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ async Task<Page<T>> FetchPageAsync<T>(
9797
.Select(item => item
9898
.Get("musicResponsiveListItemRenderer"))
9999
.Where(item => // istg youtube. why tf do u return PODCAST EPISODES in video searches???? now i gotta do that unnecessary extra saftey check
100-
categoryTitle == "Episodes" || !item.SelectIsPodcast()) // duh no fluent syntax :( "short-circuiting" performance blabla
100+
item.Contains("menu") && (categoryTitle == "Episodes" || !item.SelectIsPodcast())) // duh no fluent syntax :( "short-circuiting" performance blabla
101101
.Select(item => parse(item))
102102
.ToList();
103103

@@ -376,7 +376,7 @@ public async Task<SearchPage> AllAsync(
376376
.Select(item => item
377377
.Get("musicResponsiveListItemRenderer"))
378378
.Where(item => // istg youtube. why tf do u return PODCAST EPISODES in video searches???? now i gotta do that unnecessary extra saftey check
379-
categoryTitle == "Episodes" || !item.SelectIsPodcast()) // duh no fluent syntax >:( "short-circuiting" performance blabla
379+
item.Contains("menu") && (categoryTitle == "Episodes" || !item.SelectIsPodcast())) // duh no fluent syntax >:( "short-circuiting" performance blabla
380380
.Select(parse);
381381
})
382382
.Where(Syntax.IsNotNull)

0 commit comments

Comments
 (0)