diff --git a/CHANGELOG.md b/CHANGELOG.md
index ea4ebcc0..90d81f43 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Compression (gzip) to static web app files. Reduces app size significantly
+### Fixed
+
+- Error when opening a mix
+
## [0.33.0] - 2024-12-14
### Added
diff --git a/playlet-lib/src/components/ContentNode/PlaylistContentTask.bs b/playlet-lib/src/components/ContentNode/PlaylistContentTask.bs
index 4225bd8e..8b49e5ac 100644
--- a/playlet-lib/src/components/ContentNode/PlaylistContentTask.bs
+++ b/playlet-lib/src/components/ContentNode/PlaylistContentTask.bs
@@ -35,10 +35,23 @@ function PlaylistContentTask(input as object) as object
}
end if
+ ' TODO:P2 To remove after https://github.com/iv-org/invidious/pull/5116
+ if IsString(metadata["mixId"]) and IsArray(metadata["videos"])
+ videos = metadata["videos"]
+ for i = 0 to videos.Count() - 1
+ thumbnails = videos[i].videoThumbnails
+ if thumbnails.Count() = 1 and IsArray(thumbnails[0])
+ videos[i].videoThumbnails = thumbnails[0]
+ end if
+ end for
+ end if
+
InvidiousContent.ToPlaylistContentNode(contentNode, metadata, instance)
childCount = contentNode.getChildCount()
- if metadata.videos.Count() = 0 or childCount >= metadata.videoCount
+ videoCount = ValidInt(metadata.videoCount)
+
+ if metadata.videos.Count() = 0 or childCount >= videoCount
contentNode.loadState = FeedLoadState.Loaded
return {
success: true
diff --git a/playlet-lib/src/components/PlaylistView/PlaylistView.bs b/playlet-lib/src/components/PlaylistView/PlaylistView.bs
index 3405578b..b4c308b0 100644
--- a/playlet-lib/src/components/PlaylistView/PlaylistView.bs
+++ b/playlet-lib/src/components/PlaylistView/PlaylistView.bs
@@ -42,8 +42,13 @@ function OnContentSet() as void
end if
m.titleLabel.text = content.title
- ' NOTE: "_author" not "author". See PlaylistContentNode.xml for explanation.
- m.subtitleLabel.text = `${content._author} • ${content.videoCountText} • ${content.viewCountText}`
+ ' Starts with RD means a mix, not a playlist
+ if content.playlistId.StartsWith("RD")
+ m.subtitleLabel.text = ""
+ else
+ ' NOTE: "_author" not "author". See PlaylistContentNode.xml for explanation.
+ m.subtitleLabel.text = `${content._author} • ${content.videoCountText} • ${content.viewCountText}`
+ end if
m.updatedLabel.text = content.updatedText
m.descriptionLabel.text = content.description
diff --git a/playlet-lib/src/components/Services/Invidious/InvidiousToContentNode.bs b/playlet-lib/src/components/Services/Invidious/InvidiousToContentNode.bs
index 87454213..f88a6af0 100644
--- a/playlet-lib/src/components/Services/Invidious/InvidiousToContentNode.bs
+++ b/playlet-lib/src/components/Services/Invidious/InvidiousToContentNode.bs
@@ -239,6 +239,11 @@ namespace InvidiousContent
end function
function PlaylistSetThumbnail(node as object, nodeField as string, playlistItem as object, instance as dynamic, quality = "medium" as string) as void
+ currentThumbnail = node[nodeField]
+ if currentThumbnail <> "" and currentThumbnail <> "pkg:/images/thumbnail-missing.jpg"
+ return
+ end if
+
thumbnail = ""
if IsString(playlistItem.playlistThumbnail)
thumbnailUrl = playlistItem.playlistThumbnail
diff --git a/playlet-lib/src/components/VideoFeed/VideoRowCell/PlaylistRowCell.bs b/playlet-lib/src/components/VideoFeed/VideoRowCell/PlaylistRowCell.bs
index af71ca8e..0069ba86 100644
--- a/playlet-lib/src/components/VideoFeed/VideoRowCell/PlaylistRowCell.bs
+++ b/playlet-lib/src/components/VideoFeed/VideoRowCell/PlaylistRowCell.bs
@@ -19,7 +19,12 @@ function OnContentSet() as void
m.top.thumbnailUri = content.thumbnail
- SetVideoCount(content.videoCountText)
+ if content.videoCount = -1
+ m.top.videoCountLabelVisible = false
+ else
+ m.top.videoCountLabelVisible = true
+ SetVideoCount(content.videoCountText)
+ end if
end function
function SetVideoCount(videoCountText as string) as void
diff --git a/playlet-lib/src/components/VideoFeed/VideoRowCell/PlaylistRowCell.xml b/playlet-lib/src/components/VideoFeed/VideoRowCell/PlaylistRowCell.xml
index 440634fb..f8e92a6f 100644
--- a/playlet-lib/src/components/VideoFeed/VideoRowCell/PlaylistRowCell.xml
+++ b/playlet-lib/src/components/VideoFeed/VideoRowCell/PlaylistRowCell.xml
@@ -7,6 +7,7 @@
+