Skip to content

Commit

Permalink
Update 2.4.0 - Fixed #37 and Closes #35
Browse files Browse the repository at this point in the history
Add a better 'query' method to `queryWithFilters`. (✔️)
Fix IOS error when using `queryArtwork`. (✔️)
  • Loading branch information
Lucas Pinheiro committed Sep 28, 2021
1 parent 04b3089 commit 8d560c4
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 6 deletions.
15 changes: 15 additions & 0 deletions on_audio_query/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
## [2.4.0] - [09.28.2021]
### Features
#### Android
- **[Added]** a better 'search' method to `[queryWithFilters]`, now the query uses 'contains' when 'querying'. - [#35](https://github.com/LucasPJS/on_audio_query/issues/35)

### Fixes
#### IOS
- **[Fixed]** error with wrong `[MPMediaQuery]` type and wrong value from `[jpegData]`. - [#37](https://github.com/LucasPJS/on_audio_query/issues/37)

#### Documentation
- Updated broken `README` links. - [#36](https://github.com/LucasPJS/on_audio_query/issues/36)

### Documentation
- Updated `README` documentation.

## [2.3.1] - [09.27.2021]
### Features
#### Android/Web
Expand Down
2 changes: 1 addition & 1 deletion on_audio_query/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,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.3.1
on_audio_query: ^2.4.0
```
### Request Permission:
Expand Down
2 changes: 1 addition & 1 deletion on_audio_query/README.pt-BR.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ NOTE: Fique à vontade para ajudar nas traduções
Adicione o seguinte codigo para seu `pubspec.yaml`:
```yaml
dependencies:
on_audio_query: ^2.3.1
on_audio_query: ^2.4.0
```
#### Solicitar Permissões:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class OnWithFiltersQuery : ViewModel() {
withType = checkWithFiltersType(call.argument<Int>("withType")!!)

// The [args] are converted to [String] before send to [MethodChannel].
argsVal = call.argument<String>("argsVal")!! + "%"
argsVal = "%" + call.argument<String>("argsVal")!! + "%"

// A dynamic [projection] to every type of "query".
projection = checkProjection(withType)
Expand Down
4 changes: 2 additions & 2 deletions on_audio_query/ios/Classes/query/OnArtworkQuery.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class OnArtworkQuery {
cursor = MPMediaQuery.playlists()
case 3:
filter = MPMediaPropertyPredicate.init(value: id, forProperty: MPMediaItemPropertyArtistPersistentID)
cursor = MPMediaQuery.artist()
cursor = MPMediaQuery.artists()
default:
break
}
Expand Down Expand Up @@ -84,7 +84,7 @@ class OnArtworkQuery {
DispatchQueue.global(qos: .userInitiated).async {
var tempArtwork: Data?
var tempItem: MPMediaItem?
let fixedQuality = Double(quality) / 100.0
let fixedQuality = CGFloat(Double(quality) / 100.0)

// If [uri] is 0: artwork is from [Song]
// If [uri] is 1, 2 or 3: artwork is from [Album], [Playlist] or [Artist]
Expand Down
2 changes: 1 addition & 1 deletion on_audio_query/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: on_audio_query
description: Flutter Plugin used to query audios/songs infos [title, artist, album, etc..] from device storage.
version: 2.3.1
version: 2.4.0
homepage: https://github.com/LucasPJS/on_audio_query/tree/main/on_audio_query
# pub.dev: https://pub.dev/packages/on_audio_query
# ========
Expand Down

0 comments on commit 8d560c4

Please sign in to comment.