Skip to content

Commit

Permalink
no results found in mixedAPI search
Browse files Browse the repository at this point in the history
  • Loading branch information
HemantKArya committed May 14, 2024
1 parent 134830c commit 41d60a2
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ jobs:
run: jarsigner --verify --verbose build/app/outputs/flutter-apk/app-release.apk

- name: Rename APK file
run: mv build/app/outputs/flutter-apk/app-release.apk build/app/outputs/flutter-apk/bloomee_tunes_v2.7.12+${{github.run_number}}.apk
run: mv build/app/outputs/flutter-apk/app-release.apk build/app/outputs/flutter-apk/bloomee_tunes_v2.7.13+${{github.run_number}}.apk

- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: Release
path: |
build/app/outputs/flutter-apk/bloomee_tunes_v2.7.12+${{github.run_number}}.apk
build/app/outputs/flutter-apk/bloomee_tunes_v2.7.13+${{github.run_number}}.apk
- name: Create Release
uses: ncipollo/release-action@v1
with:
artifacts: "build/app/outputs/flutter-apk/bloomee_tunes_v2.7.12+${{github.run_number}}.apk"
tag: v2.7.12+${{github.run_number}}
artifacts: "build/app/outputs/flutter-apk/bloomee_tunes_v2.7.13+${{github.run_number}}.apk"
tag: v2.7.13+${{github.run_number}}
token: ${{secrets.SECRET_KEY}}
7 changes: 7 additions & 0 deletions lib/repository/MixedAPI/mixed_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ class MixedAPI {
.fetchSongSearchResults(searchQuery: songName, count: 2);
String? ytTitle;
String? jsTitle;

if (ytItems.isEmpty &&
(jsItems.isEmpty || jsItems['songs'].toList().isEmpty)) {
log("No results found!", name: "MixedAPI");
return null;
}

var jsItem;
var ytItem;
int idx = 0;
Expand Down
4 changes: 2 additions & 2 deletions lib/utils/external_list_importer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,8 @@ class ExternalMediaImporter {
"Got Spotify track: ${mediaItem.title}");
return mediaItem;
} else {
log("Failed to import track", name: "Spotify Importer");
SnackbarService.showMessage("Failed to import Spotify track");
log("Not found or failed to import.", name: "Spotify Importer");
SnackbarService.showMessage("Not found or failed to import.");
}
}
} catch (e) {
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/url_checker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ String? extractSpotifyTrackId(String url) {
}
}
} catch (e) {
log(e.toString());
log(e.toString(), name: 'extractSpotifyTrackId');
}
return null;
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 2.7.12+0
version: 2.7.13+0

environment:
sdk: '>=3.0.6 <4.0.0'
Expand Down

0 comments on commit 41d60a2

Please sign in to comment.