Skip to content
This repository has been archived by the owner on Mar 29, 2022. It is now read-only.

Resolver crash caused by missing iurl #72

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions YoutubeParser/Classes/HCYoutubeParser.m
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ + (NSDictionary *)h264videosWithYoutubeID:(NSString *)youtubeID {
NSMutableDictionary *optionsDict = [NSMutableDictionary dictionary];
NSArray *keys = @[//@"author", // youtube channel name
//@"avg_rating", // average ratings on yt when downloaded
@"iurl", //@"iurlmaxres", @"iurlsd", // thumbnail urls
//@"iurl", //@"iurlmaxres", @"iurlsd", // thumbnail urls
//@"keywords", // author defined keywords
@"length_seconds", // total duration in seconds
@"title", // video title
Expand All @@ -168,7 +168,9 @@ + (NSDictionary *)h264videosWithYoutubeID:(NSString *)youtubeID {

for (NSString *key in keys)
{
[optionsDict setObject:parts[key][0] forKey:key]; // [0] because we want the object and not the array
if ([parts objectForKey:key]) {
[optionsDict setObject:parts[key][0] forKey:key]; // [0] because we want the object and not the array
}
}

[videoDictionary setObject:optionsDict forKey:@"moreInfo"];
Expand Down