Skip to content

Commit

Permalink
chore: changelog generated, version bump and dart doc comments
Browse files Browse the repository at this point in the history
fix(macos): podspec direct path for shared lib
  • Loading branch information
KRTirtho committed Sep 21, 2022
1 parent a5b1f0b commit 3f3d50b
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 13 deletions.
27 changes: 25 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
## 0.0.1
# Changelog

* TODO: Describe initial release.
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## 0.2.0 (2022-09-01)

### Breaking

* `getMetadata` and `writeMetadata` now takes a path string instead of a `File` because of web compatibility.

### Fixes

* macos library not getting added due to glob path for `vendored_libraries`
* web can't be build because of FFI exception

## 0.1.1 (2022-09-13)
### Features

* macos support via podspec ([073660c](https://github.com/KRTirtho/metadata_god/commit/073660cbe2485d92819cbd7b5cce6259b9bb556a))
* add macos support ([e8cc330](https://github.com/KRTirtho/metadata_god/commit/e8cc330d9468b9dee56d84d3c03c61f9386f3aee))


## 0.1.0 (2022-09-13)
### Features

* support for basic read/write audio tags via `getMetadata` and `writeMetadata`
9 changes: 1 addition & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,7 @@ A flutter plugin for retrieving and writing audio tags/metadata from audio files

## Installation

Add the following to your pubspec.yaml file:

```yaml
dependencies:
metadata_god: ^0.1.0
```
Or, run in terminal:
Run in terminal:

```bash
$ flutter pub add metadata_god
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.1.1"
version: "0.2.0"
path:
dependency: transitive
description:
Expand Down
2 changes: 2 additions & 0 deletions lib/src/metadata_god.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ import 'package:metadata_god/src/extensions/native_metadata.dart';
class MetadataGod {
static registerWith([dynamic _]) {}

/// Extracts metadata from a audio file and returns a [Metadata] object
static Future<Metadata?> getMetadata(String path) async {
final file = File(path);
if (!await file.exists()) return null;
return (await api.readMetadata(file: file.path)).toMetadata();
}

/// Writes audio-tags or audio metadata to a supported audio file formate
static Future<void> writeMetadata(String path, Metadata metadata) async {
final file = File(path);
if (!await file.exists()) return;
Expand Down
18 changes: 18 additions & 0 deletions lib/src/models/metadata.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,36 @@ class Image {
}

class Metadata {
/// The title of the audio file.
final String? title;

/// Duration of the audio file. It can be null if was not set
final double? durationMs;

/// The artist(s) of the audio file.
final String? artist;

/// The album of the audio file.
final String? album;

/// The album artist(s) of the audio file.
final String? albumArtist;

final int? trackNumber;
final int? trackTotal;
final int? discNumber;
final int? discTotal;

/// The year the track was released
final int? year;

/// The genre of the track
final String? genre;

/// The attached album-art image data with [mimeType]
final Image? picture;

/// The file size of the audio file
final int? fileSize;

Metadata({
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion macos/metadata_god.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ A new Flutter project.

s.source = { :path => '.' }
s.source_files = 'Classes/**/*'
s.vendored_libraries = 'Libs/**/*'
s.vendored_libraries = 'librust.dylib'

s.dependency 'FlutterMacOS'

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: metadata_god
description: Plugin for retrieving and writing audio tags/metadata from audio files
version: 0.1.1
version: 0.2.0
homepage: https://github.com/KRTirtho/metadata_god

environment:
Expand Down

0 comments on commit 3f3d50b

Please sign in to comment.