Skip to content

Commit

Permalink
Release of 2.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
LucJosin authored Sep 25, 2021
2 parents 650c63b + a3dcf9c commit 0265015
Show file tree
Hide file tree
Showing 66 changed files with 1,096 additions and 680 deletions.
81 changes: 58 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,13 @@ NOTE: Feel free to help with readme translations

### Topics:

* [Gif Examples](#gif-examples)
* [How to Install](#how-to-install)
* [Platforms](#platforms)
* [How to use](#how-to-use)
* [Examples](#examples)
* [Gif Examples](#gif-examples)
* [License](#license)

## Gif Examples:
| <img src="https://user-images.githubusercontent.com/76869974/129740857-33f38b27-06a3-4959-bb31-2ae97d6b66ff.gif"/> | <img src="https://user-images.githubusercontent.com/76869974/129741012-1215b292-d700-466f-9c41-552df0ad5e89.gif"/> | <img src="https://user-images.githubusercontent.com/76869974/129741188-e6803432-24d7-4e39-bfde-cc6765e13663.gif"/> | <img src="https://user-images.githubusercontent.com/76869974/129741151-b820edc9-ddbf-4446-b67a-6e254cb5a46d.gif"/> |
|:---:|:---:|:---:|:---:|
| <img src="https://user-images.githubusercontent.com/76869974/129763885-c0cb3871-39af-45fa-aebf-ebf4113effa2.gif"/> | <img src="https://user-images.githubusercontent.com/76869974/129763519-497cab72-6a95-42fd-8237-3f83e954ea50.gif"/> | <img src="https://user-images.githubusercontent.com/76869974/129763577-9037d16f-f940-4bcb-ba37-879a0eecf2ac.gif"/> | <img src="https://user-images.githubusercontent.com/76869974/129763551-726512a9-bc10-4c75-a167-8928f0c0c212.gif"/> |
| Songs | Albums | Playlists | Artists |

## Platforms:

<!-- ✔️ | ❌ -->
Expand Down Expand Up @@ -69,7 +63,7 @@ NOTE: Feel free to help with readme translations
Add the following code to your `pubspec.yaml`:
```yaml
dependencies:
on_audio_query: ^2.2.0
on_audio_query: ^2.3.0
```
### Request Permission:
Expand Down Expand Up @@ -166,8 +160,6 @@ All types of methods on this plugin:

### Artwork Widget

Now `[QueryArtworkWidget]` support all Android versions.

```dart
Widget someOtherName() async {
return QueryArtworkWidget(
Expand All @@ -186,14 +178,19 @@ Now `[QueryArtworkWidget]` support all Android versions.

## Examples:

#### OnAudioQuery
```dart
final OnAudioQuery _audioQuery = OnAudioQuery();
```

#### querySongs
```dart
someName() async {
// DEFAULT:
// SongSortType.TITLE,
// OrderType.ASC_OR_SMALLER,
// UriType.EXTERNAL,
List<SongModel> something = await OnAudioQuery().querySongs();
List<SongModel> something = await _audioQuery.querySongs();
}
```

Expand All @@ -203,7 +200,7 @@ Now `[QueryArtworkWidget]` support all Android versions.
// DEFAULT:
// AlbumSortType.ALBUM,
// OrderType.ASC_OR_SMALLER
List<AlbumModel> something = await OnAudioQuery().queryAlbums();
List<AlbumModel> something = await _audioQuery.queryAlbums();
}
```

Expand All @@ -213,7 +210,7 @@ Now `[QueryArtworkWidget]` support all Android versions.
// DEFAULT:
// ArtistSortType.ARTIST,
// OrderType.ASC_OR_SMALLER
List<ArtistModel> something = await OnAudioQuery().queryArtists();
List<ArtistModel> something = await _audioQuery.queryArtists();
}
```

Expand All @@ -223,7 +220,7 @@ Now `[QueryArtworkWidget]` support all Android versions.
// DEFAULT:
// PlaylistSortType.NAME,
// OrderType.ASC_OR_SMALLER
List<PlaylistModel> something = await OnAudioQuery().queryPlaylists();
List<PlaylistModel> something = await _audioQuery.queryPlaylists();
}
```

Expand All @@ -233,16 +230,15 @@ Now `[QueryArtworkWidget]` support all Android versions.
// DEFAULT:
// GenreSortType.NAME,
// OrderType.ASC_OR_SMALLER
List<GenreModel> something = await OnAudioQuery().queryGenres();
List<GenreModel> something = await _audioQuery.queryGenres();
}
```

#### queryArtwork
**Note: Only works in Android >= Q/10**
```dart
someName() async {
// DEFAULT: ArtworkFormat.JPEG, 200 and false
Uint8List something = await OnAudioQuery().queryArtwork(
Uint8List something = await _audioQuery.queryArtwork(
SongId,
ArtworkType.AUDIO,
...,
Expand All @@ -256,21 +252,60 @@ Or you can use a basic and custom Widget.
#### queryWithFilters
```dart
someName() async {
// DEFAULT: Args.TITLE and false
// ArgsTypes: AudiosArgs, AlbumsArgs, PlaylistsArgs, ArtistsArgs, GenresArgs
List<dynamic> something = await OnAudioQuery().queryWithFilters(
// Here we'll search for a [song](WithFiltersType.AUDIOS) using his
// [artist](AudiosArgs.ARTIST)
List<dynamic> something = await _audioQuery.queryWithFilters(
// The [text] to search
"Sam Smith",
WithFiltersType.ARTISTS,
);
// The type of search you want.
// All types:
// * WithFiltersType.AUDIOS
// * WithFiltersType.ALBUMS
// * WithFiltersType.PLAYLISTS
// * WithFiltersType.ARTISTS
// * WithFiltersType.GENRES
WithFiltersType.AUDIOS,
// This method has [args] as parameter. With this value you can create
// a more 'advanced' search.
args: AudiosArgs.ARTIST,
);
// Other example:
// Here we'll search for a [song](WithFiltersType.AUDIOS) using his
// [album](AudiosArgs.ALBUM)
List<dynamic> something = await _audioQuery.queryWithFilters(
// The [text] to search
"In the Lonely Hour",
// The type of search you want.
// All types:
// * WithFiltersType.AUDIOS
// * WithFiltersType.ALBUMS
// * WithFiltersType.PLAYLISTS
// * WithFiltersType.ARTISTS
// * WithFiltersType.GENRES
WithFiltersType.AUDIOS,
// This method has [args] as parameter. With this value you can create
// a more 'advanced' search.
args: AudiosArgs.ALBUM,
);
// After getting the result from [queryWithFilters], convert this list using:
List<TypeModel> convertedList = something.toTypeModel();
// Example:
List<SongModel> convertedSongs = something.toArtistModel();
List<SongModel> convertedSongs = something.toSongModel();
}
```

ArgsTypes: [AudiosArgs](https://shorturl.at/lvwCJ), [AlbumsArgs](https://shorturl.at/iuOTY), [PlaylistsArgs](https://shorturl.at/ovyB5), [ArtistsArgs](https://shorturl.at/yMY06) and [GenresArgs](https://shorturl.at/bitKP)

## Gif Examples:
| <img src="https://user-images.githubusercontent.com/76869974/129740857-33f38b27-06a3-4959-bb31-2ae97d6b66ff.gif"/> | <img src="https://user-images.githubusercontent.com/76869974/129741012-1215b292-d700-466f-9c41-552df0ad5e89.gif"/> | <img src="https://user-images.githubusercontent.com/76869974/129741188-e6803432-24d7-4e39-bfde-cc6765e13663.gif"/> | <img src="https://user-images.githubusercontent.com/76869974/129741151-b820edc9-ddbf-4446-b67a-6e254cb5a46d.gif"/> |
|:---:|:---:|:---:|:---:|
| <img src="https://user-images.githubusercontent.com/76869974/129763885-c0cb3871-39af-45fa-aebf-ebf4113effa2.gif"/> | <img src="https://user-images.githubusercontent.com/76869974/129763519-497cab72-6a95-42fd-8237-3f83e954ea50.gif"/> | <img src="https://user-images.githubusercontent.com/76869974/129763577-9037d16f-f940-4bcb-ba37-879a0eecf2ac.gif"/> | <img src="https://user-images.githubusercontent.com/76869974/129763551-726512a9-bc10-4c75-a167-8928f0c0c212.gif"/> |
| Songs | Albums | Playlists | Artists |

## LICENSE:

* [LICENSE](https://github.com/LucasPJS/on_audio_query/blob/main/on_audio_query/LICENSE)
Expand Down
51 changes: 51 additions & 0 deletions on_audio_query/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,54 @@
## [2.3.0] - [09.25.2021]
### Features
#### Android/IOS/Web
- **[Added]** `[numOfSongs]` to `[PlaylistModel]` and `[GenreModel]`.
- **[Added]** `Playlist` and `Artist` to `ArtworkType`.

#### Android/IOS
- **[Added]** `quality` to `queryArtwork`.

#### Android
- **[Added]** `[isAudioBook]`, `[Genre]` and `[GenreId]` to `[SongModel]`.
- Re-**[Added]** to `[SongModel]`:
- `[isAlarm]`.
- `[isMusic]`.
- `[isNotification]`.
- `[isPodcast]`.
- `[isRingtone]`.

### Fixes
#### Android
- **[Fixed]** wrong value returning from `[id]` when using `[ArtistModel]`.
- **[Fixed]** wrong value returning from `[id]` when using `[GenreModel]`.
- **[Fixed]** no value returning from `[queryAudiosFrom]` when using `ARTIST_ID`.

### Documentation
- Updated `README` documentation.
- Updated `OnAudioQuery` and `OnAudioQueryExample` documentation to support new `[Flutter 2.5]`.

### Changes
- **[Changed]** wrong name `DATA_ADDED` to `DATE_ADDED` for both `[SongSortType]` and `[PlaylistSortType]`. - [#27](https://github.com/LucasPJS/on_audio_query/issues/27)

### ⚠ Important Changes
#### Dart
- The parameter `args` from `[queryWithFilters]` is no longer required.

#### @Deprecated
- `[DEFAULT]` from `[SongSortType]`.
- `[DEFAULT]` from `[PlaylistSortType]`.
- `[DEFAULT]` from `[ArtistSortType]`.
- `[DEFAULT]` from `[AlbumSortType]`.
- `[DEFAULT]` from `[GenreSortType]`.
- `[ARTIST_KEY]` from `[ArtistSortType]`.
- `[ARTIST_NAME]` from `[ArtistSortType]`.
- `[ALBUM_NAME]` from `[AlbumSortType]`.
- `[GENRE_NAME]` from `[GenreSortType]`.
- `[DATA_ADDED]` from `[SongSortType]`.
- `[DATA_ADDED]` from `[PlaylistSortType]`.

<!-- Deleted files: [audios_only_type.dart] and [songs_by_type.dart] -->
<!-- Changed files: [queryArtworkWidget.dart] to [query_artwork_widget.dart] -->

## [2.2.0] - [08.25.2021]
### Features
#### IOS
Expand Down
36 changes: 30 additions & 6 deletions on_audio_query/DEPRECATED.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
## [2.0.0] - [06.23.2021] -> [X.X.X] - [XX.XX.2021]
## [2.3.0] - [09.25.2021] -> [X.X.X] - [XX.XX.2021]
### Deprecated
- `[DEFAULT]` from `[SongSortType]`.
- Use `[TITLE]` instead.
- `[DEFAULT]` from `[PlaylistSortType]`.
- Use `[PLAYLIST]` instead.
- `[DEFAULT]` from `[ArtistSortType]`.
- Use `[ARTIST]` instead.
- `[DEFAULT]` from `[AlbumSortType]`.
- Use `[ALBUM]` instead.
- `[DEFAULT]` from `[GenreSortType]`.
- Use `[GENRE]` instead.
- `[ARTIST_KEY]` from `[ArtistSortType]`.
- `[ARTIST_NAME]` from `[ArtistSortType]`.
- Use `[ARTIST]` instead.
- `[ALBUM_NAME]` from `[AlbumSortType]`.
- Use `[ALBUM]` instead.
- `[GENRE_NAME]` from `[GenreSortType]`.
- Use `[GENRE]` instead.
- `[DATA_ADDED]` from `[SongSortType]`.
- Use `[DATE_ADDED]` instead.
- `[DATA_ADDED]` from `[PlaylistSortType]`.
- Use `[DATE_ADDED]` instead.

## [2.0.0] - [06.23.2021] -> [2.3.0] - [09.23.2021]
### Deprecated
- `[albumName]` from `[AlbumModel]`.
- Use `[album]` instead.
Expand Down Expand Up @@ -32,11 +56,11 @@
- `[release]` from `[DeviceModel]`.
- `[code]` from `[DeviceModel]`.
- `[year]` from `[SongModel]`.
- `[is_alarm]` from `[SongModel]`.
- `[is_music]` from `[SongModel]`.
- `[is_notification]` from `[SongModel]`.
- `[is_ringtone]` from `[SongModel]`.
- `[is_podcast]` from `[SongModel]`.
- ~~`[is_alarm]` from `[SongModel]`~~.
- ~~`[is_music]` from `[SongModel]`~~.
- ~~`[is_notification]` from `[SongModel]`~~.
- ~~`[is_ringtone]` from `[SongModel]`~~.
- ~~`[is_podcast]` from `[SongModel]`~~.
- `[file_parent]` from `[SongModel]`.
- `[path]` from `[querySongs]`.
- `[artwork]` from `[SongModel]`.
Expand Down
9 changes: 9 additions & 0 deletions on_audio_query/PLATFORMS.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@ Here you'll see a extra information about every method/type etc..
| `albumId` | `✔️` | `✔️` | `✔️` | <br>
| `artist` | `✔️` | `✔️` | `✔️` | <br>
| `artistId` | `✔️` | `✔️` | `✔️` | <br>
| `genre` | `✔️` | `✔️` | `✔️` | <br>
| `genreId` | `✔️` | `✔️` | `✔️` | <br>
| `bookmark` | `✔️` | `✔️` | `` | <br>
| `composer` | `✔️` | `✔️` | `` | <br>
| `dateAdded` | `✔️` | `✔️` | `` | <br>
Expand All @@ -210,6 +212,12 @@ Here you'll see a extra information about every method/type etc..
| `title` | `✔️` | `✔️` | `✔️` | <br>
| `track` | `✔️` | `✔️` | `✔️` | <br>
| `fileExtension` | `✔️` | `✔️` | `✔️` | <br>
| `is_alarm` | `✔️` | `` | `` | <br>
| `is_audiobook` | `✔️` | `` | `` | <br>
| `is_music` | `✔️` | `` | `` | <br>
| `is_notification` | `✔️` | `` | `` | <br>
| `is_podcast` | `✔️` | `` | `` | <br>
| `is_ringtone` | `✔️` | `` | `` | <br>

### AlbumModel

Expand Down Expand Up @@ -249,6 +257,7 @@ Here you'll see a extra information about every method/type etc..
|--------------|-----------------|-----------------|-----------------|
| `id` | `✔️` | `✔️` | `✔️` | <br>
| `genre` | `✔️` | `✔️` | `✔️` | <br>
| `numOfSongs` | `✔️` | `✔️` | `✔️` | <br>

### DeviceModel

Expand Down
Loading

0 comments on commit 0265015

Please sign in to comment.