flutter_yt_dlp 0.1.4
flutter_yt_dlp: ^0.1.4 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.4 - 2025-03-13 #
Added #
- Expanded Android NDK ABI support in
android/build.gradleto includearmeabi-v7a,arm64-v8a,x86, andx86_64, enhancing compatibility across a wider range of devices. - Added try-catch block in
FlutterYtDlpPlugin.initialize()to handle and report initialization errors, improving debugging capabilities. - Added
changed_files.txtandold_codebase.txtto.gitignorefor better management of temporary development files.
Changed #
- Modified
setupLogginginutils.dartto useprintinstead of_logger.infofor log output. - Updated
FlutterYtDlpPlugin.initialize()to useprintstatements for initialization feedback instead of logging.
Fixed #
- No specific bugs fixed in this release; focus was on compatibility and debugging enhancements.
Notes #
- The use of
printinsetupLoggingandinitialize()is temporary and will be reverted to proper logging in the next release to adhere toavoid_printlint rules. - File sizes remain under 100 lines, and functions average around 3 lines, maintaining clean code principles.
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. - Improved Null Safety: Updated
Format,CombinedFormat, and related classes to handlenullvalues from platform channels, preventing type cast errors (e.g.,TypeError: type 'Null' is not a subtype of type 'String').
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).