1361 Commits

Author SHA1 Message Date
Antic1tizen One
117572eb7c Jump to song in queue if picked just one (#624)
* Bump gradle versions needed for build

Android Studio already refuses to build it as-is,
so alter the versions required.

* Rename mode -> action for better readability

* Fix incorrect description on getByPos from timeline

* Jump to song in queue if picked one. Implements #604
2017-07-02 14:24:11 +02:00
Adrian Ulrich
023f0ef37f Workaround for samsung devices.
Looks like Samsunb broke getExternalMediaDirs() on 5.x as it tends to return a null File sometimes.

This code checks for it and falls back to the old case on total failure.
2017-06-26 19:38:06 +02:00
Adrian Ulrich
f88f96d615 default to Notification.PRIORITY_HIGH 2017-06-24 13:05:02 +02:00
Adrian Ulrich
ab91bda772 convert unixtime to string 2017-06-21 21:53:10 +02:00
Adrian Ulrich
345e45533c handle KEYCODE_SEARCH in FullPlaybackActivity 2017-06-21 21:00:11 +02:00
Adrian Ulrich
94b7566881 Handle KEYCODE_SEARCH 2017-06-19 19:07:11 +02:00
Adrian Ulrich
b9f0d2db88 force use of index on left joins to song-contributors.
SQLite versions on Android 4.x fail to pick up the index, resulting in a full table scan which is pretty horrible for performance.
We therefore change the views to force sqlite using the index.
2017-06-19 18:55:29 +02:00
Adrian Ulrich
7612febbab improve media dirs detection on newer android releases.
use getExternalMediaDirs() if available instead of guessing the path to the sd-card.
2017-06-18 18:23:08 +02:00
Adrian Ulrich
012b53e1ea also blacklist .tmp and .bin files 2017-06-10 12:38:01 +02:00
Adrian Ulrich
3481503633 Support for adding any content:// style URI 2017-06-10 12:31:26 +02:00
Adrian Ulrich
efb107b063 Fix context menues inside SlidingView for Android 7.x 2017-06-09 23:13:49 +02:00
Adrian Ulrich
c2ed38f0af Fix out of bounds error.
We might call timeline.add() with an invalid position if we skipped a song due to being unfilled.
Use 'added' instead of 'j' to calculate the queue position.
2017-06-09 09:37:03 +02:00
Adrian Ulrich
e74180f62b Display total amount of play time in stats. 2017-06-08 15:13:38 +02:00
Adrian Ulrich
db02f11963 Minor design tweaks. 2017-06-08 14:56:07 +02:00
Adrian Ulrich
a1252fd2d6 bump DB version and trigger a full clean 2017-06-08 14:01:57 +02:00
Adrian Ulrich
d6b1da50fb Fix renames
We failed to fully remove any orphaned artists, albums references, this could result in duplicate items showing up in the songs view.
2017-06-08 11:18:02 +02:00
Adrian Ulrich
981b22764f Nuke invalid song references
If a song somehow ends up with multiple artist, album entries, the view will show the song multiple times (each possible combination).

This is - confusing - and such a song should not exist. We are now deleting such entries during cleanups.
2017-06-07 21:53:38 +02:00
Adrian Ulrich
57992bad25 Add background circle to play button 2017-06-07 14:41:08 +02:00
Adrian Ulrich
f980395e3b Allow newlines in tags 2017-06-07 12:27:05 +02:00
Adrian Ulrich
3a421e7a39 Add missing cursor != null check.
Samsung seems to return a null cursor instead of throwing a SecurityException.
2017-05-31 18:37:59 +02:00
Adrian Ulrich
e0b0232621 draw note as default cover 2017-05-10 21:46:37 +02:00
Adrian Ulrich
dce63a6473 Sort by disc,track for mtime and playcount
Songs with the same mtime are likely in the same album, so sorting by disc and track doesn't hurt, especially as we sort by disc,track by default anyway when returning songs.
We also do the same for playcount sortings because we can.
2017-05-01 09:20:51 +02:00
Adrian Ulrich
6096bed5e6 fix shuffle for 'play as next'
The old code did not use the correct offsets, we now make sure to
pass the correct (= changed) range to the shuffle function.
2017-04-24 19:49:36 +02:00
Adrian Ulrich
303f9d2375 implement KEEP_SCREEN_ON 2017-04-24 19:16:43 +02:00
Adrian Ulrich
b792afcd7b Do not show dragger for filesystem view.
The icon already indicates the purpose of the row
2017-04-24 19:02:57 +02:00
Adrian Ulrich
f04a2f1186 Catch strange SecurityException.
No idea how people manage to hit this, but it seems to be a thing on Samsung phones.

Sample stacktrace:
java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/audio/media from pid=12655, uid=10269 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission()
	at android.os.Parcel.readException(Parcel.java:1620)
	at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:183)
	at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135)
	at android.content.ContentProviderProxy.query(ContentProviderNative.java:421)
	at android.content.ContentResolver.query(ContentResolver.java:502)
	at android.content.ContentResolver.query(ContentResolver.java:445)
	at ch.blinkenlights.android.vanilla.MediaUtils.getAndroidMediaIds(MediaUtils.java:591)
	at ch.blinkenlights.android.vanilla.PlaybackService.scrobbleBroadcast(PlaybackService.java:1108)
	at ch.blinkenlights.android.vanilla.PlaybackService.broadcastChange(PlaybackService.java:1064)
	at ch.blinkenlights.android.vanilla.PlaybackService.handleMessage(PlaybackService.java:1543)
	at android.os.Handler.dispatchMessage(Handler.java:98)
	at android.os.Looper.loop(Looper.java:148)
	at android.os.HandlerThread.run(HandlerThread.java:61)

Note that this happens WHILE we play a song - so claiming to not have READ_EXTERNAL_STORAGE privileges seems to be - strange.
2017-04-22 18:37:35 +02:00
Adrian Ulrich
df49dd1a49 fix possible NPE
We register ourselfs as a callback receiver BEFORE the adapter has been created.
This crash is unlikely but happens once in a while according to the play store.
2017-04-22 18:30:25 +02:00
Adrian Ulrich
46a8d0b602 improve full rescans to include skip and playcounts, also makes things nicer to read. 2017-04-22 18:13:21 +02:00
Adrian Ulrich
4f509303de preserve playcounts during updates 2017-04-22 17:26:38 +02:00
Adrian Ulrich
50ae82446e Nag if user tries to edit directories
But start scan only if it changed
2017-04-22 17:02:05 +02:00
Adrian Ulrich
0c3e000624 disable context menu for 'up' row 2017-04-22 16:27:38 +02:00
Adrian Ulrich
00268d1b36 implement 'one level up' also for filebrowser adapter 2017-04-22 15:41:29 +02:00
Adrian Ulrich
9e993957dd use existing contstant string for file 2017-04-22 15:24:44 +02:00
Adrian Ulrich
bbb74e9534 Make the folder picker somewhat nicer 2017-04-22 14:10:15 +02:00
Adrian Ulrich
191787d1e1 fix icon regexp 2017-04-22 13:58:37 +02:00
Adrian Ulrich
3fd4c28386 restore saved state of extra info on slide changes 2017-04-15 12:45:30 +02:00
Adrian Ulrich
84c7cb1e84 add infos about the disc number if present 2017-04-15 12:30:09 +02:00
Adrian Ulrich
a697e2a827 index disc number for ID3v2 correctly 2017-04-15 12:11:21 +02:00
Adrian Ulrich
848dba0abc simulate existence of default storage dir 2017-04-14 21:05:55 +02:00
Adrian Ulrich
b809aa0f32 cleanup FolderPickerAdapter 2017-04-14 20:55:57 +02:00
Adrian Ulrich
21ce9c1d57 Merge indexer-select branch.
This adds the ability to include and exclude media folders.
2017-04-14 16:49:28 +02:00
Adrian Ulrich
58068fb9ca Hide homefolder option in context menu if slide is expanded 2017-04-13 15:11:21 +02:00
Adrian Ulrich
c5294347ed add missing check for plugins 2017-04-12 20:13:12 +02:00
Adrian Ulrich
08330cdb84 Use DSLV for FolderPicker 2017-04-10 19:58:49 +02:00
Adrian Ulrich
1b88ebdc84 Make filebrowser code a little bit nicer. 2017-04-09 18:26:52 +02:00
Adrian Ulrich
4cb857371f Make add_to_playlist in fullplaybackview *also* a submenu 2017-04-09 17:55:52 +02:00
Adrian Ulrich
fee64685bd Use a progress bar in scanprefs 2017-04-08 12:43:42 +02:00
Adrian Ulrich
9e929ebb08 cleanup some old sorting code
* No need to call loadSortOrder()
* All adapters are now sortable
2017-04-08 11:32:57 +02:00
Alex Bikadorov
10878de963 Implement sorting for files tab (#577)
* Added new translation strings for file sort dialog

* Implemented sorting for the file system adapter

With new abstract class SortableAdapter as new base class for FileSystemAdapter
and MediaAdapter.

Usable sorting modes are:
 - filename
 - file size
 - file modification time
 - file extension
* reversed

Closes #305

* Code improvements for sorted file system adapter
2017-04-08 11:27:54 +02:00
Adrian Ulrich
55a5ff6aa0 implement 'more from folder' 2017-04-03 20:34:48 +02:00