From b7c3eb02480fccdc1d95cbb7588b56d672d18fec Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Wed, 29 Jun 2022 23:50:53 +0200 Subject: [PATCH] Fix playlists on Piped --- Model/Applications/PipedAPI.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Model/Applications/PipedAPI.swift b/Model/Applications/PipedAPI.swift index fe93377d..e8b59bb6 100644 --- a/Model/Applications/PipedAPI.swift +++ b/Model/Applications/PipedAPI.swift @@ -370,12 +370,14 @@ final class PipedAPI: Service, ObservableObject, VideosAPI { func extractChannelPlaylist(from json: JSON) -> ChannelPlaylist? { let details = json.dictionaryValue + let id = details["url"]?.stringValue.components(separatedBy: "?list=").last let thumbnailURL = details["thumbnail"]?.url ?? details["thumbnailUrl"]?.url var videos = [Video]() if let relatedStreams = details["relatedStreams"] { videos = extractVideos(from: relatedStreams) } return ChannelPlaylist( + id: id ?? UUID().uuidString, title: details["name"]?.string ?? "", thumbnailURL: thumbnailURL, channel: extractChannel(from: json),