flutter_yt_dlp 0.2.2
flutter_yt_dlp: ^0.2.2 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.2.2 - 2025-05-29 #
Added #
- Marked the package as discontinued in
pubspec.yamlwith a notice. - Updated
README.mdwith a prominent discontinuation notice, informing users that the plugin will be unpublished from pub.dev and the GitHub repository will be archived. - Set
publish_to: noneinpubspec.yamlafter publishing to prevent further publishes.
Notes #
- This is the final release of the plugin. No further updates or maintenance will be provided. Refer to the README.md for alternative suggestions and details.
0.2.1 - 2025-04-13 #
0.2.0 - 2025-03-19 #
Added #
- Modular Android Architecture: Split
FlutterYtDlpPlugin.ktinto multiple Kotlin classes (ChannelManager,DownloadManager,DownloadProcessor, etc.) for improved maintainability. - Simplified Python Script: Replaced multiple format-specific functions in
yt_dlp_helper.pywithget_video_infoanddownload_format, streamlining native integration. - Format Categorization: Added
format_categorizer.dartto categorize formats on the Dart side intorawVideoWithSoundFormats,mergeFormats, andrawAudioOnlyFormats. - Enhanced Logging: Introduced
logger.dartfor dedicated, configurable logging across the plugin. - New API Methods: Added
getVideoInfo,getCombinedFormats,getMergeFormats,getAudioOnlyFormats, andgetThumbnailUrltoFlutterYtDlpClient. - Download Options: Support for
overrideNameanddownloadAsRawinstartDownloadfor custom filenames and raw format preservation. - Comprehensive Example App: Revamped
example/with a full UI, including format selection, progress tracking, and provider-based state management.
Changed #
- API Overhaul: Replaced specific format-fetching methods (e.g.,
getAllRawVideoWithSoundFormats) with a unifiedgetVideoInfoapproach, requiring users to access formats via the returned map (breaking change). - Plugin Class: Renamed
FlutterYtDlpPlugintoFlutterYtDlpClientwith a simplified interface. - Model Simplification: Removed
Format,CombinedFormat, andMergeFormatclasses; formats are now dynamic maps processed byFormatCategorizer. - Android FFmpeg Integration: Shifted FFmpeg inclusion from
chaquopy.extractPackagestodependencies.implementationinandroid/build.gradle(functionality unchanged). - Logging: Moved logging setup from
utils.darttologger.dartfor better encapsulation, revertingprintusage from 0.1.4 to proper logging.
Fixed #
- General Improvements: Refactoring likely resolved minor bugs and performance issues from the monolithic 0.1.4 structure, though specific fixes aren’t detailed.
Breaking Changes #
- API Changes: Users must update code to use
getVideoInfoand access categorized formats instead of old methods. - Download Method:
startDownloadnow requires a format map fromgetVideoInforesults and supports new parameters. - Model Removal: Direct use of format classes is no longer possible; adapt to dynamic maps.
Notes #
- Refer to the updated README.md for new usage instructions and the example app for practical guidance.
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: 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).