Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
o-ifeanyi committed Sep 29, 2020
1 parent 6247ad5 commit d8db861
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
11 changes: 4 additions & 7 deletions lib/models/Provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -105,23 +105,20 @@ class ProviderClass extends ChangeNotifier {
Future<Map<String, dynamic>> songInfo(String file) async {
var audioTagger = Audiotagger();
var info;
var fileInfo;
var date;
try {
info = await audioTagger.readTagsAsMap(
path: file,
);
fileInfo = File(file);
date = fileInfo.lastAccessedSync();
date = File(file).lastAccessedSync();
} catch (e) {
debugPrint(e.toString());
}
return {
'path': file,
'title':
info != null && info['title'] != ''
? info['title']
: file.split('/').last.split('.mp3').first,
'title': info != null && info['title'] != ''
? info['title']
: file.split('/').last.split('.mp3').first,
'artist': info != null && info['artist'] != ''
? info['artist']
: 'Unknown artist',
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.0+5
version: 1.0.0+6

environment:
sdk: ">=2.7.0 <3.0.0"
Expand Down

0 comments on commit d8db861

Please sign in to comment.