flutter_yt_dlp 0.1.3
flutter_yt_dlp: ^0.1.3 copied to clipboard
A Flutter plugin for downloading and processing media using yt-dlp and FFmpeg.
Changelog #
All notable changes to the flutter_yt_dlp plugin will be documented in this file.
0.1.3 - 2025-03-13 #
Added #
- Split
flutter_yt_dlp.dartinto three files for improved maintainability:models.dart: Contains data classes (Format,CombinedFormat,MergeFormat,DownloadProgress,DownloadState,DownloadTask).utils.dart: Contains utility functions (setupLogging,generateOutputPath,convertFormatToMap).flutter_yt_dlp.dart: Main plugin class with core functionality, includingformatBytes.
- Added comprehensive Dartdoc comments to public APIs to address
public_member_api_docslint warnings. - Exposed
formatBytesas a public method inFlutterYtDlpPluginfor formatting byte sizes in a human-readable format.
Changed #
- Updated
toLogStringmethods inmodels.dartto useString Function(int)syntax for better type safety. - Adjusted imports in
main.dartto reflect the new modular file structure. - Improved logging in
_fetchFormatsto use a ternary operator for format type checking. - Renamed
_MyAppStatetoMyAppStateinmain.dartto resolvelibrary_private_types_in_public_api.
Fixed #
- Resolved
undefined_method: formatByteserrors inmain.dartby makingformatBytesa public method inFlutterYtDlpPlugin. - Fixed
undefined_identifiererrors inutils.dartby addingimport 'models.dart'. - Replaced
printwith logging insetupLoggingto fixavoid_printlint warning. - Corrected
forEachusage in_fetchFormatsto aforloop to addressavoid_function_literals_in_foreach_calls.
Notes #
- File sizes are kept under 100 lines each, with functions averaging around 3 lines, adhering to clean code principles.
- Some
public_member_api_docswarnings remain but are informational (severity 2).
0.1.1 - 2025-03-12 #
Added #
- Cancel Download Refinement: Enhanced the
DownloadTask.cancel()method with better stream cleanup and state management, ensuring robust cancellation of ongoing downloads.
0.1.0 - 2025-03-12 #
Initial Release #
- Added: Support for fetching media formats using
yt-dlp:- Raw video with sound formats (
getAllRawVideoWithSoundFormats). - Video and audio formats for merging (
getRawVideoAndAudioFormatsForMerge). - Non-MP4 video formats for conversion to MP4 (
getNonMp4VideoWithSoundFormatsForConversion). - Raw audio-only formats (
getAllRawAudioOnlyFormats). - Non-MP3 audio formats for conversion to MP3 (
getNonMp3AudioOnlyFormatsForConversion).
- Raw video with sound formats (
- Added: Download functionality with progress and state tracking:
- Download raw video+sound, merged video+audio, and audio-only formats.
- Real-time progress updates via
progressStream. - State updates (preparing, downloading, merging, converting, completed, canceled, failed) via
stateStream. - Option to cancel downloads mid-progress.
- Added: Conversion support using FFmpeg:
- Convert non-MP4 video formats to MP4.
- Convert non-MP3 audio formats to MP3.
- Added: Example app demonstrating all features with a simple UI.
- Platform: Android-only support via Chaquopy for Python integration (minimum SDK 24).
- Dependencies: Integrated
yt-dlp(2025.2.19) and FFmpeg (6.0) via Chaquopy. - Developed: With assistance from Grok by xAI for design and implementation.
0.0.1 #
- Placeholder for initial development version (not released).