Skip to content

Commit

Permalink
fix: Parsing JSON response for shorts
Browse files Browse the repository at this point in the history
  • Loading branch information
JorWo committed Nov 16, 2024
1 parent 020663d commit 5ed750e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 2.3.7
- Fixes JSON parsing for shorts data

## 2.3.6
- Update search playlists parsing due to yt changes.
- Implement >,<,== operators for `VideoResolution`.
Expand Down
2 changes: 1 addition & 1 deletion lib/src/channels/video_type.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ enum VideoType {
normal('videos', 'videoRenderer'),

/// Youtube shorts video
shorts('shorts', 'reelItemRenderer');
shorts('shorts', 'shortsLockupViewModel');

final String name;

Expand Down
6 changes: 6 additions & 0 deletions lib/src/reverse_engineering/pages/channel_upload_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,12 @@ class _InitialData extends InitialData {
.get('richItemRenderer')
?.get('content')
?.get(type.youtubeRenderText);
if (type == VideoType.shorts) {
video = video
?.get('onTap')
?.get('innertubeCommand')
?.get('reelWatchEndpoint');
}
}

if (video == null) {
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: youtube_explode_dart
description: A port in dart of the youtube explode library. Supports several API functions without the need of Youtube API Key.
version: 2.3.6
version: 2.3.7
homepage: https://github.com/Hexer10/youtube_explode_dart

topics:
Expand Down

0 comments on commit 5ed750e

Please sign in to comment.