Skip to content

Commit

Permalink
Refactor playlist extraction logic to maintain order
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-niles committed Aug 20, 2024
1 parent 594680e commit 986718e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]

- Report scraper progress in a JSON file specified with `--stats-filename` (#228)
- Fix main playlist selection to respect the order of provided playlist IDs (#286)

## [3.0.1] - 2024-08-13

Expand Down
2 changes: 1 addition & 1 deletion scraper/src/youtube2zim/youtube.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ def extract_playlists_details_from(collection_type, youtube_id):
raise NotImplementedError("unsupported collection_type")

return (
[Playlist.from_id(playlist_id) for playlist_id in list(set(playlist_ids))],
[Playlist.from_id(playlist_id) for playlist_id in dict.fromkeys(playlist_ids)],
main_channel_id,
uploads_playlist_id,
)

0 comments on commit 986718e

Please sign in to comment.