Compare commits

...

606 Commits

Author SHA1 Message Date
Óscar García Amor 90205fe0fb
Update README.md 2022-07-08 18:49:07 +02:00
Óscar García Amor 2165ce75b3
Merge branch 'develop' of github.com:ultrasonic/ultrasonic into develop 2022-07-08 12:42:04 +02:00
Óscar García Amor 8b3ee0a8d6
Migrate to GitLab 2022-07-08 12:41:53 +02:00
birdbird 695b2df63f
Merge pull request #750 from ultrasonic/offline/trackDao
Finish offline ID3 support
2022-07-08 09:20:40 +02:00
tzugen 798d795e81
Add Album list support in Offline 2022-07-07 19:20:40 +02:00
tzugen ecfce59e0f
Add clearer warning to ID3 offline setting 2022-07-07 18:53:36 +02:00
tzugen de0cb7713b
Improve offline support for Compilations 2022-07-06 15:35:34 +02:00
tzugen 78bfab3753
Conditionally hide offline Id3 Setting 2022-07-06 12:26:48 +02:00
tzugen b955d77152
Make Id3 offline dependent on Id3 2022-07-06 11:16:53 +02:00
tzugen b11694d6a2
Fix logic whether to showArtistPicture 2022-07-06 11:16:52 +02:00
tzugen 31a1fdace1
Formatting 2022-07-06 11:16:52 +02:00
tzugen 5b03b632fd
Fix three tests. 2022-07-06 11:16:52 +02:00
tzugen 152b1d261a
Fix two tests. 2022-07-06 11:16:52 +02:00
tzugen 53a1a5545a
Formatting.
Disable line length check in detekt. It's being guarded by KtLint already.
2022-07-06 11:16:52 +02:00
tzugen ad54db5bcb
Make Ids composite of Item Id + Server Id 2022-07-06 11:16:52 +02:00
tzugen 177329abcf
Add Migration 2022-07-06 11:16:52 +02:00
tzugen 241e51015f
Clean & formatting
Update room 2.4.0 -> 2.4.2
2022-07-06 11:16:52 +02:00
tzugen 60dbe70ca5
Add code to Downloader 2022-07-06 11:16:52 +02:00
tzugen 8490f7115d
Add Offline support for tracks 2022-07-06 11:16:52 +02:00
tzugen ee67f4c744
Add track Dao 2022-07-06 11:16:52 +02:00
tzugen 3a3bd10fdb
Add AlbumDao, rename getArtist to getAlbumsOfArtist 2022-07-06 11:16:52 +02:00
birdbird 3445576dc9
Merge pull request #775 from ultrasonic/seekBar
Add more values to preload count
2022-07-06 10:46:56 +02:00
tzugen 8c40f662a1
Add more values to preload count 2022-07-06 08:49:29 +02:00
birdbird 6c6227ce41
Merge pull request #770 from Maxmystere/notification/add-rating
Add song rating to notification
2022-07-05 19:31:18 +02:00
tzugen 240a2fa8f6
Fix a bug that the musicService was incorrectly cached... 2022-07-05 19:21:07 +02:00
tzugen 7de775dc26
Formatting 2022-07-05 18:38:26 +02:00
birdbird d034fc9c71
Update AutoMediaBrowserCallback.kt 2022-07-05 18:34:24 +02:00
birdbird 05ada9297d
Update MediaNotificationProvider.kt 2022-07-05 18:18:02 +02:00
Maxence G aa6c037b20
Remove useless request 2022-07-04 18:55:07 +02:00
Maxence G b8c924be27
MainThreadExecutor to Kotlin 2022-07-04 18:42:14 +02:00
Maxence G 0929a6a1bd
Lint 2022-07-03 18:40:58 +02:00
Maxence G fefee74a66
Use MainThreadExecutor 2022-07-03 18:38:29 +02:00
Maxence G 37e3ce09c1
Update notification on Rating change 2022-07-03 18:23:22 +02:00
Maxence G 16b3fcad32
Final lint 2022-07-02 21:58:45 +02:00
Maxence G d6aebd9989
Lint 2022-07-02 21:51:28 +02:00
Maxence G 3f408600cb
Add const for custom SessionCommands
Improve rating call
2022-07-02 21:47:32 +02:00
Maxence G 9014b47b74
Add song rating to notification 2022-07-02 01:27:12 +02:00
tzugen ac489ae8b9
Merge pull request #764 from ultrasonic/hmpr
Merge update build tools #755 by Holger Müller
2022-06-22 13:40:15 +02:00
tzugen e7f8fa21cb
Merge update build tools #755 by Holger Müller
Squashed commit of the following:

commit 4491c65b1b
Merge: 51ff716f 77865a14
Author: tzugen <67737443+tzugen@users.noreply.github.com>
Date:   Tue Jun 21 20:50:05 2022 +0200

    Merge branch 'develop' into gradle-update

commit 51ff716ff5
Author: Holger Müller <github@euhm.de>
Date:   Tue Jun 21 20:38:52 2022 +0200

    fixed lint warning

commit 18c31a5704
Author: Holger Müller <github@euhm.de>
Date:   Tue Jun 21 20:38:35 2022 +0200

    fixed lint warning

commit 603654c262
Author: Holger Müller <github@euhm.de>
Date:   Tue Jun 21 20:37:51 2022 +0200

    API is > lollipop ... target removed

commit b38a7211de
Author: Holger Müller <github@euhm.de>
Date:   Tue Jun 21 20:37:07 2022 +0200

    new created after fixes

commit 4929a526f7
Author: tzugen <tzugen@riseup.net>
Date:   Tue Jun 21 10:43:16 2022 +0200

    Disable ObsoleteLintCustomCheck

commit d0c30f0b6b
Author: tzugen <tzugen@riseup.net>
Date:   Tue Jun 21 10:14:06 2022 +0200

    Update more libs

commit e2fa447bbf
Merge: d4ead495 ff9c7b24
Author: tzugen <67737443+tzugen@users.noreply.github.com>
Date:   Tue Jun 21 09:47:03 2022 +0200

    Merge branch 'develop' into gradle-update

commit d4ead49548
Merge: 2dac6a7e 9a73d72f
Author: Holger Müller <github@euhm.de>
Date:   Tue Jun 21 08:50:42 2022 +0200

    merged with develop branch

commit 2dac6a7e01
Author: Holger Müller <github@euhm.de>
Date:   Mon Jun 20 21:45:22 2022 +0200

    update to android image tag 2022.06.1

commit f3dc259c39
Author: Holger Müller <github@euhm.de>
Date:   Mon Jun 20 20:56:37 2022 +0200

    rebuild lint-baseline.xml

commit c71bc1212a
Author: Holger Müller <github@euhm.de>
Date:   Mon Jun 20 20:55:00 2022 +0200

    removed unneeded cast

commit eca136dabe
Author: Holger Müller <github@euhm.de>
Date:   Fri Jun 17 23:58:37 2022 +0200

    commit signed

commit 540f476334
Author: Holger Müller <github@euhm.de>
Date:   Fri Jun 17 23:40:59 2022 +0200

    commit signed

    Signed-off-by: Holger Müller <github@euhm.de>

commit 986bd013a4
Author: Holger Müller <github@euhm.de>
Date:   Fri Jun 17 23:27:20 2022 +0200

    push to latest gradle version, set targetSdk to 33

Signed-off-by: tzugen <tzugen@riseup.net>
2022-06-22 13:35:19 +02:00
tzugen b1c3cabfef
Update README.md (#766) 2022-06-21 22:23:10 +02:00
tzugen 77865a143d
Enable schema export (needed for AutoMigration generator) (#757)
* Enable schema export (needed for AutoMigration generator)
* Add Schema folder to GIT
2022-06-21 10:07:03 +02:00
Óscar García Amor ff9c7b2435
Merge pull request #761 from ultrasonic/fix_#759
Fix #759 , a crash when the artist name was empty.
2022-06-21 08:52:54 +02:00
Óscar García Amor 737563bf6b
Merge branch 'develop' into fix_#759 2022-06-21 08:24:52 +02:00
tzugen 9a73d72fa4
Merge pull request #762 from ultrasonic/tzugen-patch-1
Update CONTRIBUTING.md
2022-06-21 06:38:35 +02:00
tzugen 98ce519014
Merge branch 'develop' into tzugen-patch-1 2022-06-20 23:05:21 +02:00
tzugen 83fc54d332
Merge pull request #758 from Maxmystere/media3-beta01
Upgrade to media3-beta01
2022-06-20 23:04:02 +02:00
Maxence G a2b9c6b9a3
Final final version good v3.2 2022-06-20 19:54:26 +02:00
Maxence G 5ae56d26c5
Merge branch 'media3-beta01' of github.com:Maxmystere/ultrasonic into media3-beta01 2022-06-20 19:50:15 +02:00
Maxence G 4efb6dcb58
Up lint 2022-06-20 19:49:17 +02:00
tzugen 8a90e98989
Update CONTRIBUTING.md 2022-06-20 19:35:46 +02:00
tzugen 46a8f4640d
Fix #759 , a crash when the artist name was empty. 2022-06-20 10:12:45 +02:00
tzugen ab41966943
Readd comment 2022-06-20 09:49:49 +02:00
tzugen 00d7ce326c
Rm comment 2022-06-20 09:48:28 +02:00
Maxence G bc4b0aa832
final fix checkstyle v2 2022-06-19 23:51:18 +02:00
Maxence G 23fd336ffd
Fix lint 2022-06-19 23:46:01 +02:00
Maxence G b57a973510
Fix static analysis 2022-06-19 23:29:07 +02:00
Maxence G 8796006ced
Fix checkstyle 2022-06-19 23:24:23 +02:00
Maxence G 545b65921e
Put Previous/Play/Next in compact notification 2022-06-19 19:43:55 +02:00
Maxence G cf367ead92
Add back notification icon 2022-06-19 18:40:04 +02:00
Maxence G 9961213f09
Upgrade to media3-beta01 2022-06-19 18:21:33 +02:00
tzugen 5deb7d4d58
Merge pull request #749 from ultrasonic/ready/removeJacoco
Remove Jacoco, closes #751
2022-06-18 22:37:12 +02:00
tzugen 5f31eaaffe
Merge branch 'develop' into ready/removeJacoco 2022-06-18 15:36:46 +02:00
tzugen cad6477cd9
Merge pull request #754 from hmueller01/target-sdk-31
Target sdk 31 into develop
2022-06-17 18:14:22 +02:00
tzugen b440821ea8
Tweak backup rules 2022-06-17 13:36:41 +02:00
Holger Müller 8663b9d50e
Target SDK 31 2022-06-17 13:27:30 +02:00
Óscar García Amor 2bae243be0
Merge branch 'develop' into ready/removeJacoco 2022-06-17 10:29:46 +02:00
Óscar García Amor 139e810186
Include beta tags on builds 2022-06-17 09:46:37 +02:00
tzugen 66443ba018
Remove Jacoco 2022-06-16 16:40:59 +02:00
tzugen f8b78a47d2
Merge pull request #748 from ultrasonic/tzugen-patch-1
Typo
2022-06-16 16:31:04 +02:00
tzugen 4cda114f4c
Typo 2022-06-16 16:22:37 +02:00
tzugen d8b5b774ee
Merge pull request #726 from ultrasonic/media3-flat
Implement Media3
2022-06-16 13:47:36 +02:00
tzugen b6730f5a93
Reset widget on manual exit as well. 2022-06-08 10:02:04 +02:00
tzugen 87c160610f
Clear widget when service is being shutdown 2022-06-08 09:17:14 +02:00
tzugen 70f8b75019
Completely stop and release the player on dismissing the app. 2022-06-07 16:18:26 +02:00
tzugen 147d7cd46e
Fix reappearing notification 2022-06-07 16:00:51 +02:00
tzugen 59e37e62a6
Call stopForeground(yes) 2022-06-07 13:30:33 +02:00
tzugen 1e571e165c
Don't ecit the process, and reinit Koin on resume 2022-06-06 22:12:16 +02:00
tzugen 5e0dd14c4f
Shutdown service on exit button press 2022-05-31 20:53:58 +02:00
tzugen 53ae0cd232
Update copyright 2022-05-31 10:18:23 +02:00
tzugen 608f86ac5f
Always call prepare before starting playback,
otherwise resuming playback is difficult when the session was dismissed...
2022-05-30 16:24:24 +02:00
tzugen 669b51c0d2
Merge remote-tracking branch 'origin/develop' into media3-flat 2022-05-30 16:11:59 +02:00
tzugen 6e1478d896
Pause playback when swiping away... 2022-05-30 16:10:54 +02:00
Nite d9e4b8b3d3
Merge pull request #737 from i-do-cpp/develop
Support HTTP basic authentication
2022-05-17 17:49:07 +02:00
Nite f790e29add
Fixed AndroidManifest to receive Bluetooth events
Set parallel downloads to 2 so the third thread can stream for playback
2022-05-10 18:15:37 +02:00
Nite faf07f2887
Fixed not closed connection in CachedDataSource 2022-05-06 18:51:12 +02:00
i-do-cpp 057644f592
Support HTTP basic authentication 2022-05-05 20:41:04 +02:00
tzugen 926081f84c
Add exported attributes, fix lint 2022-05-04 11:59:48 +02:00
tzugen 4a00494647
Readd Headphone plug and Bluetooth listeners 2022-05-04 11:52:45 +02:00
Nite 34e0178db3
Fixed Lint errors 2022-05-02 20:47:38 +02:00
Nite cbe3992b01
Fixed Notification Ids to be different for Downloader and Player
Fixed multiple start of periodic CheckDownloads
2022-05-02 20:46:01 +02:00
Nite 46846bd5c9
Incremented max playlist size
Fixed DownloadService start
Minor fixes
2022-04-24 08:44:36 +02:00
tzugen 707339b88b
Try to fix the mess :) 2022-04-22 21:03:57 +02:00
tzugen 827654c0c1
Create lock before launching the coroutine,
return always a copy of the list and not the real one.
2022-04-21 20:24:43 +02:00
tzugen 1d236aa6e3
RM unused PlayerState.kt 2022-04-21 14:52:11 +02:00
tzugen 9cdba9a27a
Ensure main thread usage in Rx subscription. 2022-04-21 14:42:24 +02:00
tzugen 7ba599f58c
Remove throttle again, causes calls from wrong thread... 2022-04-21 14:39:16 +02:00
tzugen 2e1e627b7a
- Set Wake mode flag according to Offline status
- Use Rx to trigger CheckDownloads()
- Fix #680 by listening to PositionDiscontinuity
- Throttle RxEvents
2022-04-21 10:45:37 +02:00
tzugen d550eabf88
Always call prepare on adding items 2022-04-21 10:12:05 +02:00
tzugen dda86b42c7
Fix prefs 2022-04-20 22:54:59 +02:00
tzugen b6e890b26c
Cleanup 2022-04-20 22:07:50 +02:00
tzugen c2ac1d436f
Use previous values for channel id 2022-04-20 21:56:30 +02:00
tzugen 2aaa3c2119
Fix de(serilization) 2022-04-20 21:40:22 +02:00
tzugen 5d4aff1f21
Cleanup restore 2022-04-20 20:58:10 +02:00
tzugen 6115ac995f
Remove legacyPlayerState 2022-04-20 20:58:10 +02:00
tzugen 647435fe55
launch restore on Main Thread 2022-04-20 20:57:51 +02:00
tzugen 81d24f6cbb
Cleanup MediaPlayerLifecycleSupport.kt 2022-04-20 17:06:30 +02:00
tzugen 69c78f4c37
Enable StrictMode logging, rm unused prefs 2022-04-20 13:15:22 +02:00
tzugen 3691428a68
Squashed commit of the following:
commit 7a8f20ade7
Author: Holger Müller <github@euhm.de>
Date:   Fri Apr 8 23:21:15 2022 +0200

    make build working with target sdk 31

commit 5890c32b7e
Author: Holger Müller <github@euhm.de>
Date:   Fri Apr 8 22:57:23 2022 +0200

    make build working with target sdk 31

commit 1c7c4839b3
Merge: 48b0cdea 92ef78a3
Author: Holger Müller <github@euhm.de>
Date:   Fri Apr 8 21:55:14 2022 +0200

    Merge remote-tracking branch 'upstream/media3-flat' into media3-flat

commit 48b0cdea83
Merge: 9101980c 3ca25ed1
Author: Holger Müller <github@euhm.de>
Date:   Fri Apr 8 19:58:55 2022 +0200

    Merge remote-tracking branch 'upstream/media3-flat' into media3-flat

commit 9101980cb6
Merge: 515690ab 97798446
Author: Holger Müller <github@euhm.de>
Date:   Fri Apr 8 17:07:54 2022 +0200

    Merge remote-tracking branch 'upstream/media3-flat' into media3-flat

commit 515690abac
Author: Holger Müller <github@euhm.de>
Date:   Thu Apr 7 08:55:42 2022 +0200

    made button off mode better visible
2022-04-17 06:58:39 +02:00
tzugen 788538ee6a
Squashed commit of the following:
commit c7d9af4529
Author: Holger Müller <github@euhm.de>
Date:   Sat Apr 16 17:56:41 2022 +0200

    fixed CI failure

commit 59e18bc5c0
Author: Holger Müller <github@euhm.de>
Date:   Sat Apr 16 17:42:49 2022 +0200

    removed unused dataSourceFactory, commented debug output
2022-04-17 06:55:24 +02:00
tzugen 762aeec5d3
Cleanup 2022-04-16 21:20:10 +02:00
tzugen a3a0c7f41d
Minor 2022-04-16 11:23:05 +02:00
tzugen 1564379bd1
Fix a bunch of problems with the DataSources 2022-04-16 00:04:52 +02:00
tzugen 7d33770fd6
Add some more logging calls 2022-04-12 17:12:17 +02:00
tzugen 728afad00c
Merge remote-tracking branch 'origin/develop' into media3-flat 2022-04-12 17:04:35 +02:00
Óscar García Amor f121e297df
Fix publish github signed apk CI step (again) 2022-04-11 11:58:57 +02:00
Óscar García Amor 3f2cfb131a
Fix publish github signed apk CI step 2022-04-11 11:40:01 +02:00
Óscar García Amor b8b4b81726
Fix sign release apk CI step 2022-04-11 11:27:02 +02:00
Óscar García Amor 383089a409
Improve CI pipeline 2022-04-11 11:07:29 +02:00
Óscar García Amor 8d8a5f05ea
Bump version to 3.2.0 2022-04-11 10:12:52 +02:00
Óscar García Amor 46a2e5d67b
Update translations 2022-04-11 09:50:17 +02:00
tzugen 92ef78a36a
Move alpha value to const val. 2022-04-08 21:28:14 +02:00
tzugen e5021959c3
Fix a small bug in togglePlayPause() 2022-04-08 21:24:04 +02:00
tzugen 3ca25ed1c6
Rework ActiveServer handling.
Remove blocking call on setting the server.
Implement offline server display more cleanly.
Reconfigure the SourceFactory when the active server has changed
2022-04-08 18:08:56 +02:00
tzugen 6da83db9df
Set memory to 3.2g 2022-04-08 18:07:13 +02:00
tzugen 9779844620
Solve more simple... 2022-04-07 15:29:24 +02:00
tzugen f936ad690c
Remove GC logging 2022-04-07 15:27:52 +02:00
tzugen 5230ce011d
Make full body logging an optional debug setting. 2022-04-07 15:15:08 +02:00
Holger Müller a98c9e2ffd
fixed copy paste error with repeat button 2022-04-06 21:05:44 +02:00
tzugen 0128a8b29d
Fix memory settings 2022-04-06 21:00:27 +02:00
tzugen 41f5520f1f
Remove unused resources & update lint baseline 2022-04-05 22:52:02 +02:00
tzugen fd34199c27
Remove unused resources 2022-04-05 22:45:51 +02:00
tzugen bb77216eff
Format 2022-04-05 22:33:04 +02:00
tzugen e1f4ee15d5
Fix Widget 2022-04-05 22:24:06 +02:00
tzugen d0959ffcb5
AppWidget to Kotlin 2022-04-05 21:56:25 +02:00
tzugen 4c22c8b41b
Formating / detekt 2022-04-05 21:56:13 +02:00
tzugen ba1a1c5538
Use grayed out shuffle and repeat buttons.
Fix removing and resorting playlist.
2022-04-05 21:41:27 +02:00
tzugen 7742f67796
Add pref switch for HW offload 2022-04-05 20:58:11 +02:00
tzugen 1a69507e34
Remove a bunch of now unused prefs 2022-04-05 10:21:46 +02:00
tzugen 46fb7664c3
Fix insertAfterCurrent, Fix getUri 2022-04-05 10:10:24 +02:00
tzugen dd65a12b53
Migrate AutoMediaBrowser 2022-04-05 00:05:52 +02:00
tzugen 2f7f47783a
Enable HW playback for better performance 2022-04-05 00:05:52 +02:00
tzugen b1c2d020b5
Fix a bug in MetadataParser (unrelated to media3) 2022-04-04 18:27:59 +02:00
tzugen 5dc9fda7a4
Detekt fixes 2022-04-04 18:18:52 +02:00
tzugen 1313fb6c0c
Split Cache into dedicated datasource 2022-04-04 17:59:12 +02:00
tzugen 5966dd7299
Remove gapless setting 2022-04-04 17:43:02 +02:00
tzugen 1703f02aad
Remove unused file 2022-04-04 00:01:26 +02:00
tzugen 922022ab03
Switch to Media3 2022-04-03 23:59:18 +02:00
tzugen bfc11f9924
Don't manage ID manually, but use autoGenerate to ensure uniqueness
(across the lifetime of the db)
2022-04-03 23:54:52 +02:00
tzugen e77b5abd3e
Merge pull request #719 from ultrasonic/AlbumTrackCachePrepare
Add migration path for coming DB change
2022-03-31 12:20:27 +02:00
tzugen 988bf62acf
try was missing a catch block. 2022-03-30 16:16:59 +02:00
tzugen 1a46f7e2c6
Make it clear which ID the OfflineServer has (-1)
Also provide migration path to future version
2022-03-28 23:57:37 +02:00
tzugen 1d88c585c4
Remove migration function from 2020.
All regular users will have run the migration by now.
2022-03-28 23:57:37 +02:00
tzugen 287169649a
Merge pull request #722 from ultrasonic/ready/OnlyRename
Cleanup terminology surrounding entry vs track vs song.
2022-03-28 23:56:22 +02:00
tzugen 020f67d5e6
Merge branch 'develop' into ready/OnlyRename 2022-03-28 23:06:21 +02:00
Óscar García Amor fcc57ae316
[skip ci] Replace Airsonic with Airsonic-Advanced 2022-03-28 15:39:52 +02:00
tzugen 0fd17bfe8c
Merge pull request #721 from ultrasonic/ready/cleanupPref
Cleanup an unused preference
2022-03-28 13:20:20 +02:00
tzugen 0c016bff41
Remove unused strings 2022-03-27 20:14:18 +02:00
tzugen 12435ed9ec
Cleanup an unused preference 2022-03-27 20:09:49 +02:00
tzugen c2226ba202
Fix older detekt issues in DownloadFile and regenerate Baselinefile 2022-03-27 16:40:09 +02:00
tzugen 892b441c0d
Move Track and Album to their own files 2022-03-27 16:39:35 +02:00
tzugen e53da92dac
Unify terminology also by renaming DownloadFile.song -> DownloadFile.track 2022-03-27 16:39:35 +02:00
tzugen 2de59b2206
Rename MusicDirectory.Entry to Track to make more clear what it is 2022-03-27 16:39:35 +02:00
tzugen 34c13d7908
Merge pull request #711 from ultrasonic/shareStyles
Don't exclude the whole .idea folder
2022-03-27 15:41:14 +02:00
tzugen 88918bd839
Keep the whole .idea directory ignored. 2022-03-27 15:24:33 +02:00
tzugen f49063664b
Add weak warning for code which is not formatted according to the official style guide.
This only run in newly added/modified files.
2022-03-27 15:22:43 +02:00
tzugen 126efd35c6
Include official kotlin code style 2022-03-27 15:22:43 +02:00
tzugen a6a052781d
Don't exclude the whole .idea folder
https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
2022-03-27 15:22:43 +02:00
tzugen 107b01fd91
Merge pull request #710 from hmueller01/detailed-media-info
Add detailed song information to Now Playing
2022-03-23 13:06:22 +01:00
tzugen d05ac1489e
Merge branch 'develop' into detailed-media-info 2022-03-23 11:48:04 +01:00
Holger Müller fc94d28862
satisfy CI checker
Signed-off-by: Holger Müller <github@euhm.de>
2022-03-22 08:50:35 +01:00
Holger Müller 8bec74e66a
replaced visibility by isVisible thanks to @tzugen
Signed-off-by: Holger Müller <github@euhm.de>
2022-03-22 08:26:24 +01:00
Holger Müller acf6c5a681
removed untranslatable string from all languages
Signed-off-by: Holger Müller <github@euhm.de>
2022-03-22 08:09:53 +01:00
tzugen 81a21ce8b7
Merge pull request #708 from hmueller01/config-text-update
updated settings.download_transition
2022-03-21 23:40:43 +01:00
Holger Müller cf86101de2
updated settings.download_transition 2022-03-21 22:54:41 +01:00
Nite 5a44fcfe29
Merge pull request #713 from ultrasonic/update_circleci_img
Update CircleCi Image, it started to throw a warning:
2022-03-21 19:27:40 +01:00
Nite 2aa5174fbd
Merge branch 'develop' into update_circleci_img 2022-03-21 19:09:25 +01:00
Nite cf7cef9831
Merge pull request #653 from ultrasonic/draft/okhttp
Update OkHttp to 4.9.1
2022-03-21 19:07:50 +01:00
Nite 423957d954
Merge branch 'develop' into draft/okhttp 2022-03-21 18:51:00 +01:00
Holger Müller 0944bd2217
removed unused import to satisfy CI checker
Signed-off-by: Holger Müller <github@euhm.de>
2022-03-21 18:43:10 +01:00
Holger Müller 7b750c692c
shorten onCurrentChanged() to 60 lines to not fail CI LongMethod
Signed-off-by: Holger Müller <github@euhm.de>
2022-03-21 18:38:27 +01:00
Holger Müller c247e930c4
reworks requested by @ogarcia
Signed-off-by: Holger Müller <github@euhm.de>
2022-03-21 18:04:55 +01:00
tzugen 44d68a71da
Merge pull request #712 from ultrasonic/addLocaleChooser
Add locale chooser
2022-03-21 11:23:10 +01:00
tzugen 7a51c271ba
Merge branch 'develop' into addLocaleChooser 2022-03-21 10:00:28 +01:00
Óscar García Amor 4d91068535
Merge pull request #714 from ultrasonic/wordingAlert
Reword alert for better help
2022-03-21 09:56:25 +01:00
tzugen fe3b713241
Tweak wording 2022-03-21 09:47:46 +01:00
Holger Müller 2f5704548c
implemented @tzugen way to show the song details
Signed-off-by: Holger Müller <github@euhm.de>
2022-03-20 22:05:59 +01:00
tzugen 17850980e1
Remove traditional german variant 2022-03-20 13:35:11 +01:00
tzugen 34d2b45d71
Add Res Config 2022-03-20 13:12:47 +01:00
tzugen 555ef5b7ff
Differentiate chinese variants 2022-03-20 13:10:40 +01:00
tzugen c269243a0d
Complete traditional strings 2022-03-20 09:14:47 +01:00
tzugen 2d8b93301f
Add traditional german variant 2022-03-20 09:09:14 +01:00
tzugen e4a41de3ef
Reword alert for better help 2022-03-20 07:57:50 +01:00
tzugen f0447105d2
Fix methods in integration tests 2022-03-19 18:39:13 +01:00
tzugen 65c4f2b100
Update CircleCi Image, it started to throw a warning:
https://discuss.circleci.com/t/legacy-convenience-image-deprecation/41034
2022-03-19 17:44:12 +01:00
tzugen f6f9683a9c
Migrate some old calls 2022-03-19 17:39:59 +01:00
tzugen c2d62e8688
Disable language split in bundle 2022-03-19 17:36:46 +01:00
tzugen e153565086
Update Okhttp, Jackson and retrofit 2022-03-19 17:07:16 +01:00
tzugen f30a582c7b
Add locale chooser 2022-03-19 17:00:16 +01:00
Holger Müller cc5f29ca98
fixed failed ultrasonic:ktlintMainSourceSetCheck
Signed-off-by: Holger Müller <github@euhm.de>
2022-03-19 14:51:39 +01:00
Holger Müller 8f18192c36
fixed failed ultrasonic:ktlintMainSourceSetCheck
Signed-off-by: Holger Müller <github@euhm.de>
2022-03-19 14:38:10 +01:00
Holger Müller ae2055e324
add detailed song information to Now Playing
Signed-off-by: Holger Müller <github@euhm.de>
2022-03-18 20:46:38 +01:00
Nite dee4675715
Merge pull request #706 from hmueller01/fix-debug-file-size2
fixed output of debug file size (in MB)
2022-03-15 12:26:46 +01:00
Nite e8c31db90f
Merge branch 'develop' into fix-debug-file-size2 2022-03-15 11:33:44 +01:00
Nite 34fb63c783
Merge pull request #707 from nitehu/fix/search2-result-artist
Fixed Search result to return Artist correctly when ID3 tags are turned off
2022-03-15 11:32:55 +01:00
Nite 9ee03aae2f
Merge branch 'develop' into fix/search2-result-artist 2022-03-15 11:08:24 +01:00
Nite ebfc06c423
Fixed tests 2022-03-15 10:52:22 +01:00
Nite 0587f4d837
Merge pull request #705 from hmueller01/strings-update
updated english language
2022-03-15 10:39:41 +01:00
Nite 6bfd06c6a0
Updated Search2 Artist result to use Index instead of Artist
(As needed for listing the Artist's albums afterwards)
2022-03-15 10:31:38 +01:00
Óscar García Amor 6442bae882
Merge branch 'develop' into strings-update 2022-03-15 09:15:40 +01:00
Nite c81c685800
Merge pull request #699 from omgcem/fix-context-menu-track
Updated references to context_menu_track to correctly identify events
2022-03-15 09:11:27 +01:00
Holger Müller 5941e5ab87
fixed output of debug file size (in MB) 2022-03-12 15:40:21 +01:00
Holger Müller cf52d76698
updated english language 2022-03-12 15:35:45 +01:00
Cem Eren 273ac8f9b8
Reused existing functions for track actions
Updated existing functions with additional parameter so they can be used
by context menu but added default value function so that existing calls
on buttons can remain without parameters being passed in.
2022-03-11 19:35:18 +01:00
Nite 465c211017
Merge branch 'develop' into fix-context-menu-track 2022-03-09 16:57:31 +01:00
Nite 4fbedc3d2b
Merge pull request #695 from ultrasonic/improve-template
Improve issue template adding server info
2022-03-09 16:56:55 +01:00
Cem Eren 0961f56a7d
Corrected style violation 2022-03-06 00:19:25 +01:00
Cem Eren eb0fa67431
Updated references to context_menu_track to correctly identify events
Additionally updated event handler to correctly play, queue, pin and
download songs now that events are triggering correctly.
2022-03-05 00:10:20 +01:00
Óscar García Amor 3d65c0a90c
Improve issue template adding server info 2022-02-25 08:44:05 +01:00
Nite 7dd479c0d2
Merge pull request #691 from blastrock/fix-play-all
TrackCollectionFragment: fix play all button
2022-02-20 13:46:32 +01:00
Nite b5bfd87fcc
Merge branch 'develop' into fix-play-all 2022-02-19 21:30:36 +01:00
Philippe Daouadi d03b633eeb
TrackCollectionFragment: fix play all button
The button would not work because the entries are actually of the Album
type instead of Entry.

Signed-off-by: Philippe Daouadi <philippe@ud2.org>
2022-02-19 18:30:59 +01:00
Nite 4ee4b70e09
Merge pull request #692 from nitehu/hide-keyboard
Fixed Search and Edit Server to hide the keyboard when navigating away
2022-02-19 14:32:47 +01:00
Nite 8675f25668
Fixed Search and Edit Server to hide the keyboard when navigating away 2022-02-19 13:54:25 +01:00
Nite 00dc87d5df
Merge pull request #690 from nitehu/fix-about
Made About text scrollable, fixed title
2022-02-19 11:45:43 +01:00
Nite b7d1e4acf6
Made About text scrollable, fixed title 2022-02-19 11:26:13 +01:00
Óscar García Amor baa0c92c7a
Bump version to 3.1.1 2022-02-17 08:34:15 +01:00
Nite 7c9d51f758
Merge pull request #689 from nitehu/update-gradle
Updated Gradle to fix R8 bug with Kotlin 1.6
2022-02-16 19:20:11 +01:00
Nite 9bf7e99abd
Fixed Lint 2022-02-16 19:04:27 +01:00
Nite b5e606455e
Updated Gradle to fix R8 bug with Kotlin 1.6 2022-02-16 18:33:07 +01:00
Óscar García Amor e2ddb35ce3
Bump version to 3.1.0 2022-02-15 09:50:25 +01:00
Óscar García Amor 9581a17bd9
Update translations 2022-02-15 09:17:08 +01:00
Óscar García Amor 3fbf47dedf
Mark URL strings from about screen as not translatable 2022-02-15 08:42:39 +01:00
Óscar García Amor 87aea4847c
Merge pull request #684 from nitehu/redesign-about
Redesigned the About fragment - removed WebView
2022-02-14 09:11:30 +01:00
Nite f210a6e363
Redesigned the About fragment - removed WebView 2022-02-13 19:42:34 +01:00
Nite a9ee09bc2f
Merge pull request #665 from ultrasonic/dependabot/gradle/org.jetbrains.kotlinx-kotlinx-coroutines-android-1.6.0-native-mt
Bump kotlinx-coroutines-android from 1.5.2-native-mt to 1.6.0-native-mt
2022-02-08 20:19:17 +01:00
Nite bf96f36cb4
Merge branch 'develop' into dependabot/gradle/org.jetbrains.kotlinx-kotlinx-coroutines-android-1.6.0-native-mt 2022-02-08 19:57:01 +01:00
Nite da69fb9f1f
Merge pull request #648 from ultrasonic/dependabot/gradle/versions.kotlin-1.6.10
Bump versions.kotlin from 1.5.31 to 1.6.10
2022-02-08 19:30:18 +01:00
Nite 5962cc2add
Merge branch 'develop' into dependabot/gradle/versions.kotlin-1.6.10
Added temporary fix for Koin bug
2022-02-08 18:18:58 +01:00
Nite 0d4b400105
Merge pull request #630 from ultrasonic/ready/LRUCache
Convert LRUCache to Kotlin
2022-02-05 13:29:10 +01:00
Nite ca9ba68a5e
Merge branch 'develop' into ready/LRUCache 2022-02-05 11:54:38 +01:00
Nite d00a30940e
Merge pull request #678 from nitehu/revert-to-server-color
Add back server coloring feature
2022-02-05 11:24:37 +01:00
Nite 586bc51a9c
Revert "Merge pull request #667 from ultrasonic/patchBranch"
This reverts commit 41a462708d, reversing
changes made to fd239e8e72.
2022-02-05 11:06:20 +01:00
Óscar García Amor a53d5378bf
Bump version to 3.0.1 2022-02-04 09:30:53 +01:00
Óscar García Amor 4778d18fb9
Update translations 2022-02-04 09:00:35 +01:00
Óscar García Amor 2ff944d77d
Merge branch 'develop' into ready/LRUCache 2022-02-04 08:47:42 +01:00
Nite 462719ccd1
Merge pull request #671 from ultrasonic/dependabot/gradle/versions.mockito-4.3.1
Bump versions.mockito from 4.1.0 to 4.3.1
2022-02-01 17:50:12 +01:00
Nite e39f232732
Merge branch 'develop' into dependabot/gradle/org.jetbrains.kotlinx-kotlinx-coroutines-android-1.6.0-native-mt 2022-02-01 17:21:54 +01:00
dependabot[bot] ca89d4b55e
Bump versions.mockito from 4.1.0 to 4.3.1
Bumps `versions.mockito` from 4.1.0 to 4.3.1.

Updates `mockito-core` from 4.1.0 to 4.3.1
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v4.1.0...v4.3.1)

Updates `mockito-inline` from 4.1.0 to 4.3.1
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v4.1.0...v4.3.1)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.mockito:mockito-inline
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-01 11:01:45 +00:00
Óscar García Amor 3558479278
Improve generation of signed apk in CI 2022-01-19 09:39:26 +01:00
dependabot[bot] c66ea1c437
Bump kotlinx-coroutines-android from 1.5.2-native-mt to 1.6.0-native-mt
Bumps [kotlinx-coroutines-android](https://github.com/Kotlin/kotlinx.coroutines) from 1.5.2-native-mt to 1.6.0-native-mt.
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/commits)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-android
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-18 10:37:26 +00:00
Óscar García Amor 23d0783164
Bump version to 3.0.0 2022-01-18 11:36:39 +01:00
Óscar García Amor 22c9db59c3
Ignore Unused Quantity 2022-01-18 11:23:19 +01:00
Óscar García Amor 121bcde18a
Update translations 2022-01-18 10:55:58 +01:00
Óscar García Amor 41a462708d
Merge pull request #667 from ultrasonic/patchBranch
Deactivate custom color and set DB to version 3
2022-01-18 10:53:17 +01:00
Nite 5e24c3ab40
Fixed text visibility 2022-01-14 19:36:05 +01:00
tzugen f68b46678a
Deactivate custom color and set DB to version 3 2022-01-13 19:22:44 +01:00
tzugen fd239e8e72
Merge pull request #660 from ultrasonic/develop_migrations
Fix database migrations
2022-01-12 07:17:40 +01:00
tzugen 10892f7527
Merge branch 'develop' into develop_migrations 2022-01-11 09:12:36 +01:00
Óscar García Amor e2a6a32b76
Merge pull request #659 from ultrasonic/ic_empty
More tiny and pretty ic_empty icon
2021-12-27 12:36:21 +01:00
Óscar García Amor 0dd666415d
Merge branch 'develop' into ic_empty 2021-12-27 12:18:13 +01:00
Óscar García Amor 8f43f69a66
Don't push translations from master 2021-12-27 11:16:14 +01:00
Óscar García Amor 193fe5ac3a
Add missing database migrations 2021-12-24 20:00:10 +01:00
Óscar García Amor 3588bb9380
Merge pull request #657 from ultrasonic/mainScroll
Scrolling / Database
2021-12-24 18:18:51 +01:00
Óscar García Amor 95b78a3c11
More tiny and pretty ic_empty icon 2021-12-24 17:18:57 +01:00
tzugen 9f5bc85cf2
Fallback to destructive migration on downgrade 2021-12-23 10:26:04 +01:00
tzugen 5a02467ee8
Use binding 2021-12-22 13:36:47 +01:00
tzugen 4a996f8edc
Fix Scroll in MainFragment 2021-12-22 13:26:58 +01:00
tzugen 8d5675f461
Merge pull request #656 from ultrasonic/randomReload
Don't clear random list when appending
2021-12-22 12:42:55 +01:00
tzugen a5e8daa912
Don't clear random list when appending 2021-12-21 23:44:18 +01:00
tzugen c2b23c4001
Merge pull request #655 from ultrasonic/fixIndex1
Create a correctly typed list from getMusicDirectory()
2021-12-21 23:20:44 +01:00
tzugen 10b83805a9
Create a correctly typed list from getMusicDirectory() 2021-12-21 13:31:58 +01:00
Óscar García Amor fbf5a63396
Avoid lint errors if a language has an unused quantity 2021-12-21 10:42:54 +01:00
Óscar García Amor bb370bfc44
Fix lint errors 2021-12-21 10:27:11 +01:00
Óscar García Amor 2153650d8b
Update translations 2021-12-21 09:26:42 +01:00
tzugen 987fbbe02a
Bump cache version 2021-12-20 22:39:20 +01:00
tzugen b958dcabe4
Move versions file to gradle dir 2021-12-20 22:15:07 +01:00
tzugen d66de5955b
Merge pull request #652 from nitehu/fix/isUri
Updated custom cache location handling to remove isUri
2021-12-20 22:02:36 +01:00
tzugen 1eca5a756e
Use new toml file for version declaration 2021-12-20 21:59:57 +01:00
tzugen dd92d00be5
Update Gradle and Gradle Plugin 2021-12-20 20:44:24 +01:00
tzugen 7531a4d4aa
Suppress some warnings 2021-12-20 20:20:08 +01:00
tzugen 82f45bd5dd
Set compileSdk to 31 2021-12-20 19:49:44 +01:00
tzugen c0ef964a3e
Run KtlintFormat 2021-12-20 19:41:55 +01:00
Nite 34e232a43a
Fixed default for cache directory selector 2021-12-20 19:39:44 +01:00
tzugen 65347a20fa
Update room 2021-12-20 19:39:20 +01:00
tzugen 7f42ed6a37
Update ktlint as well 2021-12-20 19:37:04 +01:00
dependabot[bot] 95f37ba2e2
Bump versions.kotlin from 1.5.31 to 1.6.10
Bumps `versions.kotlin` from 1.5.31 to 1.6.10.

Updates `kotlin-gradle-plugin` from 1.5.31 to 1.6.10
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.6.10/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.31...v1.6.10)

Updates `kotlin-stdlib` from 1.5.31 to 1.6.10
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.6.10/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.31...v1.6.10)

Updates `kotlin-reflect` from 1.5.31 to 1.6.10
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.6.10/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.31...v1.6.10)

Updates `kotlin-test-junit` from 1.5.31 to 1.6.10
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.6.10/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.31...v1.6.10)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-gradle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.jetbrains.kotlin:kotlin-reflect
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.jetbrains.kotlin:kotlin-test-junit
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-20 17:51:46 +00:00
tzugen fa434342d9
Covert LRUCache to Kotlin 2021-12-20 18:45:04 +01:00
Nite 17e49ff49e
Updated custom cache location handling to remove isUri
Fixed DownloadFileCache contained DownloadFiles with old cache path
2021-12-20 13:15:45 +01:00
Nite adf72d6460
Merge pull request #649 from ultrasonic/ready/dialogs
Unify error dialog handling
2021-12-20 09:52:51 +01:00
Nite 505405e87f
Fixed comment 2021-12-20 09:33:50 +01:00
Nite a3ad17692b
Merge branch 'develop' into ready/dialogs 2021-12-20 09:22:39 +01:00
Nite 5c3e2f6e37
Merge pull request #642 from ultrasonic/ready/removeMergeAdapter
Remove MergeAdapter and SackOfViewsAdapter
2021-12-20 09:22:04 +01:00
Nite 941fbd907f
Merge branch 'develop' into ready/removeMergeAdapter 2021-12-20 08:56:31 +01:00
Nite 095cf4ef4a
Merge pull request #641 from ultrasonic/ready/removeFeatureStorage
Remove feature storage
2021-12-20 08:56:00 +01:00
tzugen 3be480a9a2
Add error message to cache location picker
Fixes #643
2021-12-18 18:19:15 +01:00
tzugen 5bfa0044ab
Introduce prepopulated Info and Error Dialog.Builders,
and thereby unify dialog handling across the code base
2021-12-18 18:13:43 +01:00
tzugen 6b1fc7575a
Use material icons for info and error dialogs 2021-12-18 16:43:51 +01:00
tzugen 6fcea86097
Remove feature storage 2021-12-18 15:02:53 +01:00
tzugen 28d5e5043f
Remove MergeAdapter and SackOfViewsAdapter 2021-12-18 14:55:18 +01:00
tzugen eb2aeabd5d
Merge pull request #615 from ultrasonic/api30
Update the File code to use Storage Access Framework in order to support API 30
2021-12-18 14:53:44 +01:00
tzugen a0da791b28
Minor fixes 2021-12-18 14:33:04 +01:00
tzugen f4554ff29e
Fix messed up indentation in StreamProxy 2021-12-16 19:02:33 +01:00
tzugen 9acc5121a4
Regenerate lint baseline 2021-12-16 18:55:35 +01:00
Nite 107146c8d9
Minor cleanup, added comments 2021-12-16 14:18:54 +01:00
Nite d51544f927
Added lazy initialization of DownloadFile status for better SAF performance
Minor fixes
2021-12-15 17:44:19 +01:00
Nite 66e7732ec2
Removed remaining DocumentFile uses
Fixed lint issues
2021-12-12 17:06:11 +01:00
Nite fa4214a0ac
Moved from DocumentFile to DocumentsContract
Added separate handling for the old java File paths
2021-12-12 13:00:53 +01:00
Nite 34c5ced32e
Refactored to use DocumentFile instead of FSAF 2021-12-10 21:28:46 +01:00
Nite 90638e5fd7
Merge branch 'develop' into api30 2021-12-10 11:00:59 +01:00
tzugen 6730713763
Merge pull request #640 from ultrasonic/dependabot/gradle/io.gitlab.arturbosch.detekt-detekt-gradle-plugin-1.19.0
Bump detekt-gradle-plugin from 1.18.1 to 1.19.0
2021-12-09 20:02:23 +01:00
dependabot[bot] 38fa4964f8
Bump detekt-gradle-plugin from 1.18.1 to 1.19.0
Bumps [detekt-gradle-plugin](https://github.com/detekt/detekt) from 1.18.1 to 1.19.0.
- [Release notes](https://github.com/detekt/detekt/releases)
- [Commits](https://github.com/detekt/detekt/compare/v1.18.1...v1.19.0)

---
updated-dependencies:
- dependency-name: io.gitlab.arturbosch.detekt:detekt-gradle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-09 18:53:14 +00:00
tzugen b85230c056
Merge pull request #638 from ultrasonic/dependabot/gradle/versions.mockito-4.1.0
Bump versions.mockito from 4.0.0 to 4.1.0
2021-12-09 19:50:32 +01:00
dependabot[bot] fb85fb4e82
Bump versions.mockito from 4.0.0 to 4.1.0
Bumps `versions.mockito` from 4.0.0 to 4.1.0.

Updates `mockito-core` from 4.0.0 to 4.1.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v4.0.0...v4.1.0)

Updates `mockito-inline` from 4.0.0 to 4.1.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v4.0.0...v4.1.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.mockito:mockito-inline
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-09 18:07:14 +00:00
Nite 8c716da213
Merge pull request #635 from ultrasonic/draft/refactor-lists
Completely overhaul list display
2021-12-09 19:06:26 +01:00
tzugen 80e587c1aa
Add scrollbar to playlist view,
implement SectionedAdapter for Artists
2021-12-08 17:52:31 +01:00
tzugen e337177715
Style fixes 2021-12-07 00:06:41 +01:00
tzugen d8cdc81424
Increase touch area of drag handler.
Also use new tintable color for drag drawable
2021-12-07 00:04:53 +01:00
tzugen 351ad914e7
Fix constraints in track details 2021-12-06 23:49:09 +01:00
Nite 0d24c87eef
- Fixed track item layout when track number is missing
- Fixed Rx unsubscribing
- Fixed drag handle usage in playlist
2021-12-06 19:23:22 +01:00
tzugen de04f4cbe6
Fix the alignment of the status text,
add transparency when dragging a song,
remove wrong context menu
2021-12-05 21:29:32 +01:00
tzugen 026aa79572
Remove special casing of SongsForGenre and thereby fix it.
Also prevent jumping in the random albums list and
don't refresh the album list on back navigation
2021-12-05 21:07:08 +01:00
tzugen 6daa17efd5
Show folder header in Artist list 2021-12-05 14:05:42 +01:00
tzugen f2948cd3db
Various fixes & cleanups 2021-12-02 13:20:08 +01:00
tzugen 2ac1ea3f89
Shorten INTENT Constants names 2021-11-30 21:23:54 +01:00
tzugen f1e789ea9b
Fixed search, put compareTo method into Interface 2021-11-30 21:21:04 +01:00
tzugen bdac092eff
Make SearchResults expandable,
finish music folder support,
change Service interface of AlbumList to return listOf(Album)
2021-11-30 00:47:03 +01:00
tzugen aa33d7c882
Cleanup nested functions on OfflineMusicService and make it return the correct MusicDirectory type 2021-11-29 20:14:11 +01:00
tzugen 775f56c6fa
Fix header glitch 2021-11-29 19:00:28 +01:00
tzugen 2f0ff384d0
Various fixes
* Work on folder selector,
* Make current play queue drag&droppable
* Fix album view in offline mode
2021-11-29 15:09:51 +01:00
tzugen 82d90a6aee
Fix context menus.
Also cleanup files, rename layouts
2021-11-28 19:13:25 +01:00
tzugen b33fe2d451
Add nice looking empty list view
Also fix shouldRetry() in the Downloader
2021-11-28 19:13:25 +01:00
tzugen 4e37a2483c
Add an MusicDirectory.Album model to represent the APIAlbum model
It became necessary in order to have different types for Tracks vs Albums,
instead of just differentiating by isDirectory: Boolean.

Also:
* Fix Album display in SearchFragment.kt
* Use same ids in all lists
2021-11-28 19:13:24 +01:00
tzugen 5dfb66eec2
Implement singular selection for Bookmarks 2021-11-28 19:13:24 +01:00
tzugen ad793e27a5
Remove viewRefresh setting 2021-11-28 19:13:24 +01:00
tzugen 2086a6cac5
Unify play next and play last icons,
style fixes
2021-11-28 19:13:24 +01:00
tzugen eeb2d13d96
Delete a bunch of now-unused classes
Also run KtLint
2021-11-28 19:13:24 +01:00
tzugen f8a87f7c85
BookmarksFragment is now based on TrackCollectionFragment
Also start SearchFragment.kt
2021-11-28 19:13:24 +01:00
tzugen 7640f4c4aa
Start migration of Album and Artist 2021-11-25 18:43:50 +01:00
tzugen d243ae1b44
Use RecycleView inside PlayerFragment 2021-11-25 18:43:46 +01:00
tzugen 6277ee73c0
Simplify and fix download status display 2021-11-25 18:43:46 +01:00
tzugen 7a2dbf65d9
Fix jumping downloads in Download view 2021-11-25 18:43:31 +01:00
tzugen 19d014709f
Don't create DownloadFile instances unnecessarily 2021-11-25 16:53:25 +01:00
tzugen d0e39efc50
Migrate DownloadsFragment to new system 2021-11-25 16:53:25 +01:00
tzugen e81b1ef8c2
Add a HeaderView binder 2021-11-25 16:53:25 +01:00
tzugen 5f716f5008
Use MultiTypeAdapter as a backend for RecyclerView stuff 2021-11-25 16:53:22 +01:00
Nite 5cf914f555
Added file caches to speed up SAF
Updated settings page with default music cache path reset
Fixed a bunch of bugs
2021-11-23 20:22:31 +01:00
Nite 5c7cde2349
Merged develop into api30 2021-11-19 20:34:03 +01:00
Nite 3f570636dd
Merge changes 2021-11-19 19:09:27 +01:00
Nite 1d0bb944e1
Implemented Storage Access Framework as Music Cache 2021-11-19 18:43:52 +01:00
Nite 5fac1b74a3
Merge pull request #629 from ultrasonic/ready/rm-viewflipper
Remove MyViewFlipper.java
2021-11-18 21:13:12 +01:00
Nite d84a0a3929
Merge branch 'develop' into ready/rm-viewflipper 2021-11-18 20:30:20 +01:00
Nite f3ac843a9c
Merge pull request #628 from ultrasonic/ready/rm-silentbackground
Remove Silentbackground Task
2021-11-18 20:27:41 +01:00
tzugen cddbe72752
Remove network communication from main thread 2021-11-18 19:54:49 +01:00
tzugen 744282f10a
Prevent overlap in very long song titles 2021-11-18 19:07:35 +01:00
tzugen 51d6a23208
Provide Scope differently 2021-11-18 19:07:35 +01:00
tzugen a327a5b390
Update detekt-baseline 2021-11-18 19:07:35 +01:00
tzugen 36b581e3c1
Rename UncaughtExceptionHandler 2021-11-18 19:07:35 +01:00
tzugen 1ed9360bc7
CommunicationError to Object with static methods 2021-11-18 19:07:34 +01:00
tzugen ed152fa52a
Remove SilentBackgroundTask.kt 2021-11-18 19:07:34 +01:00
Nite 45e9728e0f
Merge pull request #626 from ultrasonic/cachecleaner
Migrate CacheCleaner to Coroutine
2021-11-18 18:17:30 +01:00
tzugen b1cb70764c
Remove MyViewFlipper.java
It was a workaround for a bug in Android 2, which is fixed in Android 3 and later.
2021-11-16 20:00:27 +01:00
tzugen 00cd4fce44
Migrate CacheCleaner to Coroutine 2021-11-16 18:01:04 +01:00
tzugen 97eb753413
Merge pull request #622 from nitehu/refactor-events
Refactor events
2021-11-16 15:23:13 +01:00
tzugen 00781ba7de
Add a comment 2021-11-16 14:56:39 +01:00
Nite d6f908b80c
Merge branch 'develop' into refactor-events 2021-11-15 18:20:56 +01:00
Nite e019ec788d
Fixed subscription 2021-11-15 18:20:26 +01:00
tzugen f73457298d
Move file methods to FileUtil.kt 2021-11-13 18:16:05 +01:00
tzugen c9e276dc76
API 30 2021-11-13 18:16:03 +01:00
Nite 28ef67a210
Merge pull request #625 from ultrasonic/style
Small style fixes
2021-11-10 18:27:36 +01:00
tzugen bb36116d70
Add .ifNotNull extension function as a more readable alternative to ?.let 2021-11-09 22:20:41 +01:00
tzugen 8830d76497
Make public playlist immutable (only Downloader can touch it)
Remove external usage of playlist_revision
2021-11-09 20:46:44 +01:00
tzugen 61f23fa948
Update lint 2021-11-09 18:45:00 +01:00
tzugen 92adcf47bd
Tweak drop shadow 2021-11-09 18:09:50 +01:00
tzugen 7e3cb19bac
Visually align song details.
* Also cleanup unused layout and color files
2021-11-09 18:09:50 +01:00
tzugen dc312d4592
Update dependencies.gradle 2021-11-09 18:09:50 +01:00
dependabot[bot] 435376b48b
Bump lifecycle-viewmodel-ktx from 2.2.0 to 2.4.0
Bumps lifecycle-viewmodel-ktx from 2.2.0 to 2.4.0.

---
updated-dependencies:
- dependency-name: androidx.lifecycle:lifecycle-viewmodel-ktx
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-09 18:09:50 +01:00
Nite 69825b28bb
Merged player state and track changes into a single event 2021-11-08 20:38:05 +01:00
Nite 66df5b1daf
Merge branch 'develop' into refactor-events 2021-11-05 19:26:45 +01:00
Nite 38979bf9d4
Merge pull request #617 from ultrasonic/dependabot/gradle/androidx.lifecycle-lifecycle-viewmodel-ktx-2.4.0
Bump lifecycle-viewmodel-ktx from 2.2.0 to 2.3.0
2021-11-05 19:23:55 +01:00
Nite 68549992f4
Merge branch 'develop' into dependabot/gradle/androidx.lifecycle-lifecycle-viewmodel-ktx-2.4.0 2021-11-05 19:09:35 +01:00
Nite 2e482e02a2
Merge pull request #618 from ultrasonic/dependabot/gradle/androidx.core-core-ktx-1.7.0
Bump core-ktx from 1.5.0 to 1.6.0
2021-11-05 19:09:11 +01:00
Nite bf18c43d73
Merge branch 'develop' into dependabot/gradle/androidx.core-core-ktx-1.7.0 2021-11-05 18:43:24 +01:00
Nite 7fe4845305
Merge pull request #619 from ultrasonic/dependabot/gradle/org.mockito.kotlin-mockito-kotlin-4.0.0
Bump mockito-kotlin from 3.2.0 to 4.0.0
2021-11-05 18:31:36 +01:00
dependabot[bot] c29b8ebe0e
Bump mockito-kotlin from 3.2.0 to 4.0.0
Bumps [mockito-kotlin](https://github.com/mockito/mockito-kotlin) from 3.2.0 to 4.0.0.
- [Release notes](https://github.com/mockito/mockito-kotlin/releases)
- [Commits](https://github.com/mockito/mockito-kotlin/compare/3.2.0...4.0.0)

---
updated-dependencies:
- dependency-name: org.mockito.kotlin:mockito-kotlin
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-05 17:16:07 +00:00
Nite 3bacabe480
Merge pull request #623 from ultrasonic/network
Use modern network APIs
2021-11-05 18:15:16 +01:00
tzugen aac73cd6d7
Further cleanup maxBitrate function 2021-11-03 12:59:06 +01:00
tzugen a66d07ae84
Use modern network APIs 2021-11-03 12:23:53 +01:00
Nite 210ae35ee0
Merge pull request #620 from ultrasonic/cc
CacheCleaner to Kotlin
2021-11-02 22:29:57 +01:00
Nite 4e3102f131
Fixed condition for directory listing
Minor cleanup
2021-11-02 22:19:09 +01:00
Nite eba42b82dc
Merge branch 'develop' into cc 2021-11-02 21:33:53 +01:00
Nite a34fc809d9
Merge pull request #616 from ultrasonic/rm-globalscope
Remove global scope use
2021-11-02 21:32:21 +01:00
Nite ffb2d59886
Updated Events to ReactiveX
Minor fixes
2021-11-02 17:45:01 +01:00
tzugen a6e76e9d53
Ktlint 2021-11-02 09:07:38 +01:00
tzugen c4e2c786d1
Fix flags 2021-11-02 09:05:51 +01:00
tzugen 050161bbb0
API 30 2021-11-01 17:10:46 +01:00
tzugen f085a8ab65
Transform CacheCleaner to Kotlin 2021-11-01 14:26:32 +01:00
tzugen dfb3561965
Remove custom Pair implementation 2021-11-01 14:20:57 +01:00
tzugen 8c99c84a90
Default arguments 2021-11-01 14:14:12 +01:00
tzugen 4fb4ab18da
Unused argument 2021-11-01 14:13:25 +01:00
tzugen e6624ada9a
Unnecesary null-check 2021-11-01 14:12:35 +01:00
tzugen a58e541ccc
Update dependencies.gradle 2021-11-01 13:05:26 +01:00
tzugen 416bc57eea
1.6.0 2021-11-01 12:28:04 +01:00
dependabot[bot] 34c3936513
Bump core-ktx from 1.5.0 to 1.7.0
Bumps core-ktx from 1.5.0 to 1.7.0.

---
updated-dependencies:
- dependency-name: androidx.core:core-ktx
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-01 11:03:00 +00:00
dependabot[bot] aece29559e
Bump lifecycle-viewmodel-ktx from 2.2.0 to 2.4.0
Bumps lifecycle-viewmodel-ktx from 2.2.0 to 2.4.0.

---
updated-dependencies:
- dependency-name: androidx.lifecycle:lifecycle-viewmodel-ktx
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-01 11:02:54 +00:00
tzugen e32b3461c9
Remove global scope use 2021-10-31 19:18:20 +01:00
Nite fec2d78d30
Merge branch 'develop' into refactor-events 2021-10-31 17:20:03 +01:00
Nite 7ed91db250
Merge pull request #612 from ultrasonic/prefs
Cleanup a bunch of preference setters and getter by using the new utility class
2021-10-31 17:10:38 +01:00
Nite 7c43d01f8e
Fixed nullable parameters 2021-10-31 16:54:37 +01:00
Nite 5eaf9cccb1
Started refactoring events to ReactiveX 2021-10-31 15:22:15 +01:00
tzugen bd23f54783
Remove Build switches for Lollipop 2021-10-30 16:07:47 +02:00
tzugen 5fe1921ca5
Cleanup issues 2021-10-30 15:59:51 +02:00
tzugen e5f7ca6310
Convert SettingsFragment to Kotlin 2021-10-30 15:40:43 +02:00
tzugen 4d42c0d9d2
Use lambdas in SettingsFragment, remove Consumer class. 2021-10-30 15:28:53 +02:00
tzugen e19d43d6b3
Better wording 2021-10-30 15:16:17 +02:00
tzugen 2d9a212b5c
Cleanup a bunch of preference setters and getters by using the new utility class 2021-10-30 15:14:15 +02:00
Nite f0c02f5551
Merge pull request #611 from ultrasonic/downloader-ld
Rename DownloadQueueSerializer to PlaybackstateSerializer
2021-10-28 17:16:24 +02:00
tzugen 7c956566a0
Merge branch 'develop' into downloader-ld 2021-10-28 11:44:22 +02:00
Nite ada780ab25
Merge pull request #599 from nitehu/navigation-servers
Moved server selector and settings to the Navigation menu
2021-10-28 10:38:35 +02:00
Nite 70e42fb443
Fixed default foreground color 2021-10-28 10:00:23 +02:00
tzugen c83a9778fc
Tweak layout 2021-10-28 09:36:46 +02:00
Nite 6636d6a558
Minor fixes 2021-10-28 07:38:43 +02:00
Nite 7ccb9d055c
Fixed lint 2021-10-28 07:30:31 +02:00
Nite 9782e18b6e
Updated looks of navigation header 2021-10-28 07:28:31 +02:00
tzugen eb2e6ada0a
Tweaked selected color, added circle to offline icon 2021-10-25 20:16:19 +02:00
Nite cef1153f89
Merge branch 'develop' into navigation-servers 2021-10-24 22:34:56 +02:00
tzugen fea515a526
Replace consumer use with a lambda 2021-10-23 16:54:00 +02:00
tzugen c44257f569
Fix a minor warning 2021-10-23 16:49:56 +02:00
tzugen 939cd8583c
Semantically rename DownloadQueueSerializer to PlaybackStateSerializer 2021-10-23 16:39:58 +02:00
tzugen 7d2923230c
Merge pull request #604 from ultrasonic/downloader-ld
Implement a Download view
2021-10-23 16:31:42 +02:00
tzugen ece53f7687
Add a comment 2021-10-23 16:13:05 +02:00
Nite 2847a51674
Fixed autoplay
Fixed uncaught exception
Fixed playlist loading from file
2021-10-23 16:09:49 +02:00
tzugen 24092ce465
Remove unneccessary call to checkDownloads() which were interferring with AutoPlay somehow. 2021-10-23 15:58:33 +02:00
tzugen 6f676d20b0
Update baseline to remove closed issues 2021-10-23 15:58:33 +02:00
tzugen 1d5b335f97
Add Download Fragment which show active downloads 2021-10-23 15:58:32 +02:00
tzugen 9bc19ec044
Semantic rename 2021-10-23 15:58:32 +02:00
tzugen 0bcf51a409
Implement LiveData in Downloader.kt
Minor: Also remove a suppress comment
2021-10-23 15:58:32 +02:00
Nite f58c361e4e
Fixed navigation on welcome screen
Fixed navigation after selecting new server
Fixed color for new server
Fixed typo
2021-10-21 17:55:19 +02:00
Nite 949e7e58ba
Merge branch 'develop' into navigation-servers 2021-10-20 19:48:41 +02:00
Nite 77a2dcf935
Merge pull request #595 from ultrasonic/dependabot/gradle/versions.mockito-4.0.0
Bump versions.mockito from 3.12.4 to 4.0.0
2021-10-20 19:45:51 +02:00
dependabot[bot] 974099630a
Bump versions.mockito from 3.12.4 to 4.0.0
Bumps `versions.mockito` from 3.12.4 to 4.0.0.

Updates `mockito-core` from 3.12.4 to 4.0.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v3.12.4...v4.0.0)

Updates `mockito-inline` from 3.12.4 to 4.0.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v3.12.4...v4.0.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:production
  update-type: version-update:semver-major
- dependency-name: org.mockito:mockito-inline
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-20 17:09:12 +00:00
Nite 2197959507
Merge pull request #607 from ultrasonic/pref_delegate
Use delegate for Settings, reduces Boilerplate code
2021-10-20 19:07:39 +02:00
tzugen 62bade916f
Use delegate for Settings, reduces Boilerplate code 2021-10-18 17:32:12 +02:00
Nite ccf39661ab
Cleaned up warnings in FilePickerAdapter 2021-10-15 16:35:27 +02:00
Nite 7c66bc7ec8
Implemented navigation header coloring based on selected server 2021-10-15 16:26:06 +02:00
Nite 477f6f5d7c
Merge remote-tracking branch 'remotes/upstream/develop' into navigation-servers 2021-10-15 13:52:50 +02:00
Nite 784c65f96d
Merge pull request #600 from ultrasonic/permission_failed
Migrate Permission utitlity to Kotlin, increase min SDK to 17
2021-10-14 21:35:51 +02:00
Nite 16b2a99631
Fixed lint errors 2021-10-14 20:26:21 +02:00
Nite 427034053c
Merge branch 'develop' into permission_failed 2021-10-14 19:45:44 +02:00
Nite 6905c68898
Merge pull request #603 from ultrasonic/gradle72
Update Gradle and ktlint
2021-10-14 18:05:01 +02:00
Nite 2b40577d4b
Merge branch 'develop' into gradle72 2021-10-14 17:43:13 +02:00
Nite 23cca33d5a
Started implementing server colors 2021-10-14 17:17:32 +02:00
Óscar García Amor 62986ca79d
Fix lint errors 2021-10-14 10:02:22 +02:00
Óscar García Amor e2cff64e4e
Bump version to 2.24.0 2021-10-14 09:35:57 +02:00
Óscar García Amor 704f78366a
Merge branch 'master' into develop 2021-10-14 09:19:39 +02:00
Óscar García Amor e426081d1d
Update translations 2021-10-14 09:04:08 +02:00
tzugen bc43cc6874
Update Gradle config to remove deprecated attrs.
Deactivate xml reporting (not used currently)
2021-10-13 19:06:42 +02:00
tzugen 83f4ecb15a
Prepare a number of layouts for RTL and thereby fix a lot of lint messages 2021-10-13 18:51:11 +02:00
tzugen fbdf6d846b
Cleanup dead code paths 2021-10-13 18:51:11 +02:00
tzugen d1e636f553
Fix some new lint issues 2021-10-13 18:51:11 +02:00
tzugen d7cd68c39e
Makes more sense to update to 17 instead of 16. 2021-10-13 18:51:11 +02:00
tzugen b892b7b8d3
Migrate PermissionUtil to Kotlin
- Set min SDK to 16 (was 14), because READ_EXTERNAL_STORAGE is minimum 16
- Add new shortcut to Settings.kt class
- Use showDialog util function
2021-10-13 18:51:04 +02:00
tzugen 5c9b149bec
Update Gradle and ktlint 2021-10-13 18:48:56 +02:00
tzugen ec4f57b5b6
Merge pull request #602 from ultrasonic/fix_npe
Fix NPE
2021-10-13 18:45:41 +02:00
tzugen 87c2e44ab8
Fix NPE 2021-10-13 15:10:06 +02:00
tzugen 910a05d49d
Merge pull request #596 from nitehu/feature/share-on-server
Added option whether to create a share on the server when sharing songs
2021-10-13 15:05:16 +02:00
Nite b44e0517ce
Updated Settings for sharing 2021-10-12 21:09:19 +02:00
Nite 5a3eb6482a
Added option whether to create a share on the server when sharing songs 2021-10-12 21:09:19 +02:00
Nite 7a6f993602
Merge pull request #594 from nitehu/playback_complete
Added PlaybackComplete intent when a song playback is completed
2021-10-12 17:10:58 +02:00
Nite 2f98bf9ae0
Merge branch 'develop' into playback_complete 2021-10-12 16:47:59 +02:00
tzugen 855f111cb2
Merge pull request #593 from nitehu/fix/album_list
Fixed album lists
2021-10-12 15:36:52 +02:00
tzugen aea2e6baef
Style fix 2021-10-12 15:16:40 +02:00
Nite eff1a714e2
Fixed album lists in landscape mode
Fixed starring on album lists
Fixed reading starred state on the Subsonic API
2021-10-12 15:16:40 +02:00
Nite f752307a38
Changed navigation header colors 2021-10-11 19:43:01 +02:00
Nite 86f2aa1656
Fixed lint 2021-10-11 17:43:17 +02:00
Nite 256f785d39
Updated navigation header style 2021-10-11 17:31:32 +02:00
Nite 62150b77d3
Removed strings 2021-10-10 15:03:57 +02:00
Nite 652f85b070
Removed unused strings 2021-10-10 14:41:16 +02:00
Nite 381e29b2d1
Fixed lint issues 2021-10-10 14:15:03 +02:00
Nite 4b4853374c
Moved server selector to the navigation menu 2021-10-10 14:03:53 +02:00
Óscar García Amor 7091967fa5
Merge pull request #592 from ultrasonic/dependabot-q
Run dependabot monthly
2021-10-08 08:39:47 +02:00
Óscar García Amor c3df5ead37
Merge branch 'develop' into dependabot-q 2021-10-08 08:27:35 +02:00
Nite a3128c5f7f
Fixed lint 2021-10-07 18:02:23 +02:00
Nite 221f218856
Added PlaybackComplete intent when a song playback is completed 2021-10-07 17:51:19 +02:00
Nite ed59136fa6
Merge pull request #588 from ultrasonic/dependabot/gradle/androidx.constraintlayout-constraintlayout-2.1.1
Bump constraintlayout from 2.1.0 to 2.1.1
2021-10-04 18:55:43 +02:00
dependabot[bot] 0da22ef75b
Bump constraintlayout from 2.1.0 to 2.1.1
Bumps [constraintlayout](https://github.com/androidx/constraintlayout) from 2.1.0 to 2.1.1.
- [Release notes](https://github.com/androidx/constraintlayout/releases)
- [Commits](https://github.com/androidx/constraintlayout/commits)

---
updated-dependencies:
- dependency-name: androidx.constraintlayout:constraintlayout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-04 16:45:36 +00:00
tzugen 6b24e0ae4b
Run dependabot monthly
Now that our dependencies are up-to-date,
run dependabot only once per month, and also ignore patch releases,
in order to avoid frequent PRs that all require a review by us.
2021-10-04 18:45:33 +02:00
Nite 90e269525e
Merge pull request #587 from ultrasonic/dependabot/gradle/org.junit.vintage-junit-vintage-engine-5.8.1
Bump junit-vintage-engine from 5.8.0 to 5.8.1
2021-10-04 18:45:02 +02:00
dependabot[bot] 1d26d9ba3a
Bump junit-vintage-engine from 5.8.0 to 5.8.1
Bumps [junit-vintage-engine](https://github.com/junit-team/junit5) from 5.8.0 to 5.8.1.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.8.0...r5.8.1)

---
updated-dependencies:
- dependency-name: org.junit.vintage:junit-vintage-engine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-04 15:45:21 +00:00
Nite d89ae50ef4
Merge pull request #586 from ultrasonic/dependabot/gradle/versions.kotlin-1.5.31
Bump versions.kotlin from 1.5.30 to 1.5.31
2021-10-04 17:44:47 +02:00
dependabot[bot] e77a8e67a8
Bump versions.kotlin from 1.5.30 to 1.5.31
Bumps `versions.kotlin` from 1.5.30 to 1.5.31.

Updates `kotlin-gradle-plugin` from 1.5.30 to 1.5.31
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.5.31/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.30...v1.5.31)

Updates `kotlin-stdlib` from 1.5.30 to 1.5.31
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.5.31/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.30...v1.5.31)

Updates `kotlin-reflect` from 1.5.30 to 1.5.31
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.5.31/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.30...v1.5.31)

Updates `kotlin-test-junit` from 1.5.30 to 1.5.31
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.5.31/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.30...v1.5.31)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-gradle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-reflect
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-test-junit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-04 15:34:50 +00:00
tzugen a7a895af96
Merge pull request #583 from ultrasonic/download-metadata
Download metadata
2021-10-04 15:06:21 +02:00
tzugen 35a0dd761d
Fix a bug where newly added Artists were not cached correctly 2021-10-04 11:20:52 +02:00
Nite fda746905d
Merged changes from develop 2021-09-24 21:12:02 +02:00
Nite 2237b476dc
Merge pull request #585 from nitehu/fix/avrcp_compatibility
Added setting to disable Now Playing List sending for incompatible bluetooth devices
2021-09-24 20:29:43 +02:00
Nite b640805559
Moved settings related properties from Util to their own class 2021-09-24 18:20:53 +02:00
Nite d4ce10ebfa
fixed lint error 2021-09-23 16:00:20 +02:00
Nite be49145aa8
Created different notification when Ultrasonic is only downloading files
Fixed null check
2021-09-23 15:51:53 +02:00
Nite 01aa1fe887
Moved kotlin files to their place 2021-09-21 15:20:56 +02:00
Nite 77f857b1c6
Added setting to disable Now Playing List sending for incompatible bluetooth devices 2021-09-17 16:45:33 +02:00
tzugen 02129a8fd0
Remove unused strings 2021-09-15 21:34:48 +02:00
tzugen ecc7e870f1
Save Artists in Offline database 2021-09-15 20:51:42 +02:00
tzugen 28097bf325
Optimize Imageloader to not create empty MusicDirectory.Entries 2021-09-15 20:46:05 +02:00
tzugen 611539be55
Handle WifiLock in Download manager class, instead of creating an individual lock per task.
Also only stop the executor when done.
2021-09-15 20:46:05 +02:00
tzugen 5ff4d21abc
Merge FileUtil functions into a single class. 2021-09-15 20:46:05 +02:00
tzugen ec49775d7e
Convert FileUtil to Kotlin 2021-09-15 20:46:05 +02:00
tzugen c48c41284e
Migrate Constants to Kotlin, update a copyright notice. 2021-09-15 20:46:05 +02:00
tzugen ba745a5f9a
Run download task inside service 2021-09-15 20:46:05 +02:00
Nite 8ab903c7d2
Merge pull request #582 from ultrasonic/dependabot/gradle/org.junit.vintage-junit-vintage-engine-5.8.0
Bump junit-vintage-engine from 5.7.1 to 5.8.0
2021-09-15 19:09:48 +02:00
dependabot[bot] ac3635a8f4
Bump junit-vintage-engine from 5.7.1 to 5.8.0
Bumps [junit-vintage-engine](https://github.com/junit-team/junit5) from 5.7.1 to 5.8.0.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.7.1...r5.8.0)

---
updated-dependencies:
- dependency-name: org.junit.vintage:junit-vintage-engine
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-15 14:32:46 +00:00
Nite 546039fd5e
Merge pull request #574 from ultrasonic/dependabot/gradle/org.jetbrains.kotlinx-kotlinx-coroutines-android-1.5.2-native-mt
Bump kotlinx-coroutines-android from 1.5.1-native-mt to 1.5.2-native-mt
2021-09-15 16:31:15 +02:00
dependabot[bot] 86a772f115
Bump kotlinx-coroutines-android from 1.5.1-native-mt to 1.5.2-native-mt
Bumps [kotlinx-coroutines-android](https://github.com/Kotlin/kotlinx.coroutines) from 1.5.1-native-mt to 1.5.2-native-mt.
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/commits)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-android
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-15 14:12:46 +00:00
Nite d3c7fcf7e7
Merge pull request #573 from ultrasonic/dependabot/gradle/io.gitlab.arturbosch.detekt-detekt-gradle-plugin-1.18.1
Bump detekt-gradle-plugin from 1.18.0 to 1.18.1
2021-09-15 16:03:40 +02:00
Nite 1f5de82004
Merge branch 'develop' into dependabot/gradle/io.gitlab.arturbosch.detekt-detekt-gradle-plugin-1.18.1 2021-09-15 15:35:59 +02:00
Óscar García Amor a64fe47353
Bump version to 2.23.1 2021-09-13 11:09:50 +02:00
Óscar García Amor 8928980bae
Update translations 2021-09-13 11:04:29 +02:00
tzugen 950691daab
Merge pull request #572 from nitehu/changeDragHandle
Moved drag handle to the left in the Now Playing list
2021-09-12 09:27:32 +02:00
Nite ee1e4548e3
Fixed lint errors 2021-09-12 09:18:49 +02:00
Nite 07f334a7fd
Moved drag handle to the left in the Now Playing list
Updated drag handle to the dotted version
2021-09-12 09:18:49 +02:00
Nite 5ef3ced111
Fixed media session null checks 2021-09-12 08:54:08 +02:00
Óscar García Amor 4ce5cfcb8e
Merge pull request #578 from nitehu/readme
Added link to the wiki for enabling Ultrasonic with Android Auto
2021-09-10 12:40:47 +02:00
Nite 25fd2f4772
Added link to the wiki for enabling Ultrasonic with Android Auto 2021-09-10 12:04:37 +02:00
dependabot[bot] 008520fbd0
Bump detekt-gradle-plugin from 1.18.0 to 1.18.1
Bumps [detekt-gradle-plugin](https://github.com/detekt/detekt) from 1.18.0 to 1.18.1.
- [Release notes](https://github.com/detekt/detekt/releases)
- [Commits](https://github.com/detekt/detekt/compare/v1.18.0...v1.18.1)

---
updated-dependencies:
- dependency-name: io.gitlab.arturbosch.detekt:detekt-gradle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-06 11:05:46 +00:00
Nite 225bb78263
Merge pull request #571 from nitehu/fix/MediaSessionNull
Fixed media session null checks
2021-09-05 09:59:37 +02:00
Nite 84d28178bf
Fixed media session null checks 2021-09-05 09:34:38 +02:00
Nite f29db522d4
Merge pull request #567 from ultrasonic/semanticDownloadView
Use semantically correct API endpoint when streaming/downloading.
2021-09-03 20:26:58 +02:00
Nite 9f1315b6dc
Merge branch 'develop' into semanticDownloadView 2021-09-01 18:19:55 +02:00
Nite 9f02ee95a4
Merge pull request #568 from ultrasonic/downloader
Rework Downloader
2021-09-01 18:14:58 +02:00
tzugen d08a38ea1c
Small fixes 2021-08-28 11:43:33 +02:00
tzugen ad81f3bf6d
Use semantically correct API endpoint when streaming/downloading.
Fixes #257
2021-08-28 11:39:32 +02:00
tzugen 594e94eea7
Finish 2021-08-28 11:29:47 +02:00
tzugen f9aac1ca43
Add parallel downloading, better priority handling 2021-08-28 11:29:47 +02:00
tzugen b8eddb2d24
Rename .java to .kt 2021-08-28 11:29:47 +02:00
tzugen e0df24182e
Add nullability annotation 2021-08-28 11:29:47 +02:00
tzugen 029f0fa4da
Merge pull request #559 from Maxmystere/Improve-Offline-Support
Add better offline Support
2021-08-27 12:08:14 +02:00
tzugen 662cb1728b
Fix a number of minor warnings in Util.kt 2021-08-27 11:50:31 +02:00
tzugen e8baea6195
Convert MainFragment to Kotlin 2021-08-26 22:58:40 +02:00
tzugen e00137a635
Rename .java to .kt 2021-08-26 22:58:39 +02:00
tzugen d83cf0917c
Fix compiler warning 2021-08-26 22:58:39 +02:00
Maxence G (Hello-Fluffy) 0a2e7358fa
Fix CI 2021-08-26 22:58:39 +02:00
Maxence G (Hello-Fluffy) 7eb3d01ae8
Limit GetSongs if length is too short 2021-08-26 22:58:39 +02:00
Maxence G (Hello-Fluffy) a23e5ff794
Add better offline Support 2021-08-26 22:58:39 +02:00
tzugen 6aa3124ee9
Merge pull request #565 from ultrasonic/dependabot/gradle/versions.kotlin-1.5.30
Bump versions.kotlin from 1.5.21 to 1.5.30
2021-08-26 20:59:07 +02:00
dependabot[bot] 413707e482
Bump versions.kotlin from 1.5.21 to 1.5.30
Bumps `versions.kotlin` from 1.5.21 to 1.5.30.

Updates `kotlin-gradle-plugin` from 1.5.21 to 1.5.30
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.21...v1.5.30)

Updates `kotlin-stdlib` from 1.5.21 to 1.5.30
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.21...v1.5.30)

Updates `kotlin-reflect` from 1.5.21 to 1.5.30
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.21...v1.5.30)

Updates `kotlin-test-junit` from 1.5.21 to 1.5.30
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.21...v1.5.30)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-gradle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-reflect
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-test-junit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-26 17:51:07 +00:00
tzugen e753d95ed3
Merge pull request #564 from ultrasonic/translations
Translations
2021-08-26 19:04:40 +02:00
tzugen 0579bd9754
Merge remote-tracking branch 'origin/master' into develop 2021-08-26 18:54:33 +02:00
Nite bb1451b800
Merge pull request #563 from ultrasonic/dependabot/gradle/versions.mockito-3.12.4
Bump versions.mockito from 3.11.2 to 3.12.4
2021-08-26 16:50:15 +02:00
dependabot[bot] 01be4c7148
Bump versions.mockito from 3.11.2 to 3.12.4
Bumps `versions.mockito` from 3.11.2 to 3.12.4.

Updates `mockito-core` from 3.11.2 to 3.12.4
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v3.11.2...v3.12.4)

Updates `mockito-inline` from 3.11.2 to 3.12.4
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v3.11.2...v3.12.4)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.mockito:mockito-inline
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-26 14:15:03 +00:00
Nite cb51c0b723
Merge pull request #551 from ultrasonic/dependabot/gradle/androidx.constraintlayout-constraintlayout-2.1.0
Bump constraintlayout from 2.0.4 to 2.1.0
2021-08-26 16:13:25 +02:00
tzugen 0a39891b93
Break up CI steps and only build release (and not debug) in last steps 2021-08-26 12:07:00 +02:00
tzugen 7e82efddad
Break up CI steps and only build release (and not debug) in last steps 2021-08-26 11:58:20 +02:00
Óscar García Amor 6202484df7
Bump version to 2.23.0 2021-08-26 11:04:21 +02:00
Óscar García Amor 4a10b76067
Update translations 2021-08-26 10:29:20 +02:00
dependabot[bot] 9ea0246032
Bump constraintlayout from 2.0.4 to 2.1.0
Bumps [constraintlayout](https://github.com/androidx/constraintlayout) from 2.0.4 to 2.1.0.
- [Release notes](https://github.com/androidx/constraintlayout/releases)
- [Commits](https://github.com/androidx/constraintlayout/compare/2.0.4...2.1.0)

---
updated-dependencies:
- dependency-name: androidx.constraintlayout:constraintlayout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-25 14:29:08 +00:00
Nite bd34345c12
Merge pull request #558 from ultrasonic/video-cleanup
Video call can be static
2021-08-25 16:28:22 +02:00
Nite 2655a4a606
Merge branch 'develop' into video-cleanup 2021-08-25 14:27:05 +02:00
tzugen 059f6d8f32
Merge pull request #537 from SaintDubious/AndroidAuto2
Added Android Auto support
2021-08-20 21:07:45 +02:00
tzugen 27971cb426
Merge remote-tracking branch 'origin/develop' into AndroidAuto2 2021-08-20 20:57:00 +02:00
tzugen a051d4d040
Clean up Util.kt after conversion
(currentSong was assigned but never actually used)
2021-08-20 20:53:17 +02:00
tzugen 8b15c9a57f
Merge pull request #556 from ultrasonic/dependabot/gradle/io.gitlab.arturbosch.detekt-detekt-gradle-plugin-1.18.0
Bump detekt-gradle-plugin from 1.17.1 to 1.18.0
2021-08-18 11:23:21 +02:00
tzugen 54f39be7ca
Video call can be static 2021-08-18 09:09:08 +02:00
tzugen 3afb86c22c
Video call can be static 2021-08-18 09:07:57 +02:00
dependabot[bot] d01030b61d
Bump detekt-gradle-plugin from 1.17.1 to 1.18.0
Bumps [detekt-gradle-plugin](https://github.com/detekt/detekt) from 1.17.1 to 1.18.0.
- [Release notes](https://github.com/detekt/detekt/releases)
- [Commits](https://github.com/detekt/detekt/compare/v1.17.1...v1.18.0)

---
updated-dependencies:
- dependency-name: io.gitlab.arturbosch.detekt:detekt-gradle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-16 11:04:34 +00:00
Nite fc2e4b7ae4
Merge branch 'develop' into AndroidAuto2 2021-08-02 10:41:38 +02:00
Nite 6e6cf3a86a
Merge pull request #546 from ultrasonic/dependabot/gradle/versions.kotlin-1.5.21
Bump versions.kotlin from 1.5.20 to 1.5.21
2021-08-02 10:01:34 +02:00
dependabot[bot] 43a806a699
Bump versions.kotlin from 1.5.20 to 1.5.21
Bumps `versions.kotlin` from 1.5.20 to 1.5.21.

Updates `kotlin-gradle-plugin` from 1.5.20 to 1.5.21
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.20...v1.5.21)

Updates `kotlin-stdlib` from 1.5.20 to 1.5.21
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.20...v1.5.21)

Updates `kotlin-reflect` from 1.5.20 to 1.5.21
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.20...v1.5.21)

Updates `kotlin-test-junit` from 1.5.20 to 1.5.21
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.20...v1.5.21)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-gradle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-reflect
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-test-junit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-02 07:03:36 +00:00
Nite c64420c11f
Merge pull request #545 from ultrasonic/dependabot/gradle/org.jetbrains.kotlinx-kotlinx-coroutines-android-1.5.1-native-mt
Bump kotlinx-coroutines-android from 1.5.0-native-mt to 1.5.1-native-mt
2021-08-02 09:02:45 +02:00
dependabot[bot] adca273d3f
Bump kotlinx-coroutines-android from 1.5.0-native-mt to 1.5.1-native-mt
Bumps [kotlinx-coroutines-android](https://github.com/Kotlin/kotlinx.coroutines) from 1.5.0-native-mt to 1.5.1-native-mt.
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/commits)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-android
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-02 06:32:43 +00:00
Nite 2703a4f35b
Merge pull request #543 from ultrasonic/dependabot/gradle/versions.kluent-1.68
Bump versions.kluent from 1.64 to 1.68
2021-08-02 08:31:49 +02:00
Nite 9546bdeab5
Fixed playing single track in empty playlist 2021-07-19 15:31:52 +02:00
James Wells 961c726da8
restore previous code 2021-07-18 16:14:43 -04:00
Nite c9f2050c46
Suppress detekt LongMethod 2021-07-18 13:23:20 +02:00
Nite 982639d2c7
Fixed lint errors
Added comments
2021-07-18 13:17:29 +02:00
Nite cf05d3c781
Implemented Media Browsing 2021-07-18 11:33:39 +02:00
Nite f50d6f13f4
Started implementing Media Browser
Added root menus, playlists and artists
2021-07-16 17:29:21 +02:00
Nite 635ea2f55e
Merge branch 'develop' into AndroidAuto2 2021-07-16 07:39:33 +02:00
Nite 51dbdfb39a
Implemented track detail display in the playlist
Fixed playback position disappearing when paused
2021-07-14 16:09:52 +02:00
Nite 56af9e4bf2
Moved MediaSession handling to its own class
Fixed queue and position handling on Now Playing screen
2021-07-13 19:25:37 +02:00
Nite 83c6b76d0a
Updated Android Auto to use MediaPlayerService separately
Added some missing features found in the docs
2021-07-12 16:13:34 +02:00
dependabot[bot] ba323fa9ac
Bump versions.kluent from 1.64 to 1.68
Bumps `versions.kluent` from 1.64 to 1.68.

Updates `kluent` from 1.64 to 1.68
- [Release notes](https://github.com/MarkusAmshove/Kluent/releases)
- [Changelog](https://github.com/MarkusAmshove/Kluent/blob/master/CHANGELOG.md)
- [Commits](https://github.com/MarkusAmshove/Kluent/commits)

Updates `kluent-android` from 1.64 to 1.68
- [Release notes](https://github.com/MarkusAmshove/Kluent/releases)
- [Changelog](https://github.com/MarkusAmshove/Kluent/blob/master/CHANGELOG.md)
- [Commits](https://github.com/MarkusAmshove/Kluent/commits)

---
updated-dependencies:
- dependency-name: org.amshove.kluent:kluent
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.amshove.kluent:kluent-android
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-12 11:05:39 +00:00
Nite ea3b055288
Merge pull request #541 from ultrasonic/dependabot/gradle/com.karumi-dexter-6.2.3
Bump dexter from 6.2.2 to 6.2.3
2021-07-09 14:05:43 +02:00
dependabot[bot] 6558f871ca
Bump dexter from 6.2.2 to 6.2.3
Bumps [dexter](https://github.com/karumi/Dexter) from 6.2.2 to 6.2.3.
- [Release notes](https://github.com/karumi/Dexter/releases)
- [Commits](https://github.com/karumi/Dexter/compare/6.2.2...6.2.3)

---
updated-dependencies:
- dependency-name: com.karumi:dexter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-09 11:22:42 +00:00
Nite ee76c661a1
Merge pull request #540 from ultrasonic/dependabot/gradle/com.google.android.material-material-1.4.0
Bump material from 1.3.0 to 1.4.0
2021-07-09 13:21:48 +02:00
dependabot[bot] 808eafc85d
Bump material from 1.3.0 to 1.4.0
Bumps [material](https://github.com/material-components/material-components-android) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/material-components/material-components-android/releases)
- [Commits](https://github.com/material-components/material-components-android/compare/1.3.0...1.4.0)

---
updated-dependencies:
- dependency-name: com.google.android.material:material
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-09 09:56:48 +00:00
Nite 649a702ebb
Merge pull request #539 from ultrasonic/dependabot/gradle/org.robolectric-robolectric-4.6.1
Bump robolectric from 4.5.1 to 4.6.1
2021-07-09 11:56:04 +02:00
dependabot[bot] 090d7f8ab7
Bump robolectric from 4.5.1 to 4.6.1
Bumps [robolectric](https://github.com/robolectric/robolectric) from 4.5.1 to 4.6.1.
- [Release notes](https://github.com/robolectric/robolectric/releases)
- [Commits](https://github.com/robolectric/robolectric/compare/robolectric-4.5.1...robolectric-4.6.1)

---
updated-dependencies:
- dependency-name: org.robolectric:robolectric
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-09 09:23:02 +00:00
Nite 1938b3bb4b
Merge pull request #538 from ultrasonic/dependabot/gradle/com.android.tools.build-gradle-4.2.2
Bump gradle from 4.2.0 to 4.2.2
2021-07-09 11:22:25 +02:00
dependabot[bot] e60ac32c3f
Bump gradle from 4.2.0 to 4.2.2
Bumps gradle from 4.2.0 to 4.2.2.

---
updated-dependencies:
- dependency-name: com.android.tools.build:gradle
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-09 07:18:46 +00:00
Nite 6791f0631a
Merge pull request #534 from ultrasonic/dependabot/gradle/versions.kotlin-1.5.20
Bump versions.kotlin from 1.5.10 to 1.5.20
2021-07-09 09:17:52 +02:00
James Wells db0669098c
Another Attempt at Auto 2021-07-04 16:42:18 -04:00
James Wells 04de4544ee
merge develop 2021-07-04 15:41:56 -04:00
dependabot[bot] 62189dce5c
Bump versions.kotlin from 1.5.10 to 1.5.20
Bumps `versions.kotlin` from 1.5.10 to 1.5.20.

Updates `kotlin-gradle-plugin` from 1.5.10 to 1.5.20
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.5.20/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.10...v1.5.20)

Updates `kotlin-stdlib` from 1.5.10 to 1.5.20
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.5.20/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.10...v1.5.20)

Updates `kotlin-reflect` from 1.5.10 to 1.5.20
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.5.20/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.10...v1.5.20)

Updates `kotlin-test-junit` from 1.5.10 to 1.5.20
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.5.20/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.5.10...v1.5.20)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-gradle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-reflect
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-test-junit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-29 16:55:34 +00:00
tzugen 69c9739db0
Merge pull request #445 from tzugen/database-4
Implement a room database for better offline support
2021-06-29 18:54:53 +02:00
tzugen b546f2c2fb
The Tests actually caught an error :)
If shortcuts were set, these were added as duplicates to the list.
2021-06-29 18:01:26 +02:00
tzugen fe9b2f9700
Update Baseline file 2021-06-29 18:01:26 +02:00
tzugen dbdb59bbff
Add a Room database for Artists, Indexes and MusicFolders.
* There is one database for each Server
* Index items are saved with a "musicFolderId" prop, which makes it possible to filter the database by musicFolder without necessarily having to query the server for it.
* Databases for new Servers are created on the fly
* If the user removes a server, the respective database is deleted.
2021-06-29 18:01:26 +02:00
tzugen fa94cd24da
Export schema 2021-06-29 18:01:26 +02:00
tzugen c99c4478f2
Remove file storage code from RESTAPI class 2021-06-29 18:01:26 +02:00
tzugen 67f2d1f9a8
Merge pull request #535 from ultrasonic/dependabot/gradle/versions.mockito-3.11.2
Bump versions.mockito from 3.11.0 to 3.11.2
2021-06-29 13:46:44 +02:00
dependabot[bot] f15891cbdd
Bump versions.mockito from 3.11.0 to 3.11.2
Bumps `versions.mockito` from 3.11.0 to 3.11.2.

Updates `mockito-core` from 3.11.0 to 3.11.2
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v3.11.0...v3.11.2)

Updates `mockito-inline` from 3.11.0 to 3.11.2
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v3.11.0...v3.11.2)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.mockito:mockito-inline
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-29 09:52:14 +00:00
James Wells 4ff167e497
merge develop 2021-06-22 20:08:49 -04:00
James Wells 793c4a6ca7
working version 2021-06-19 00:05:19 -04:00
James Wells 3853fce818
Merge branch 'develop' into AndroidAuto 2021-06-18 22:52:56 -04:00
James Wells 8855d19113
Merge branch 'develop' into AndroidAuto 2021-06-10 19:19:29 -04:00
James Wells e95b2ce09c
refactored a bit, and some cleanup 2021-06-06 18:28:46 -04:00
James Wells be4ffc2c7e
Merge branch 'develop' into AndroidAuto 2021-06-06 16:36:33 -04:00
James Wells e666498f13
Initial Test of Android Auto 2021-05-28 20:40:00 -04:00
438 changed files with 19353 additions and 23405 deletions

View File

@ -1,23 +1,33 @@
version: 3
version: 2.1
parameters:
memory-config:
type: string
default: "-Xmx3200m -Xms256m -XX:MaxMetaspaceSize=1g"
memory-config-debug:
type: string
default: "-Xmx3200m -Xms256m -XX:MaxMetaspaceSize=1g -verbose:gc -Xlog:gc*"
jobs:
build:
docker:
- image: circleci/android:api-29
- image: cimg/android:2022.06.1
working_directory: ~/ultrasonic
environment:
JVM_OPTS: -Xmx3200m
JVM_OPTS: << pipeline.parameters.memory-config >>
JAVA_TOOL_OPTIONS: << pipeline.parameters.memory-config >>
GRADLE_OPTS: << pipeline.parameters.memory-config >>
steps:
- checkout
- restore_cache:
keys:
- v1-ultrasonic-{{ .Branch }}-{{ checksum "dependencies.gradle" }}
- v1-ultrasonic-{{ .Branch }}
- v1-ultrasonic
- v2-ultrasonic-{{ .Branch }}-{{ checksum "gradle/libs.versions.toml" }}
- v2-ultrasonic-{{ .Branch }}
- v2-ultrasonic
- run:
name: configure gradle.properties for CI building
command: |
sed -i '/^org.gradle.jvmargs/d' gradle.properties
sed -i 's/^org.gradle.daemon=true/org.gradle.daemon=false/g' gradle.properties
cat gradle.properties
- run:
name: checkstyle
command: ./gradlew -Pqc ktlintCheck
@ -25,34 +35,34 @@ jobs:
name: static analysis
command: ./gradlew -Pqc detekt
- run:
name: build
name: build debug
command: ./gradlew assembleDebug
- run:
name: unit-tests
command: |
./gradlew ciTest testDebugUnitTest
./gradlew jacocoFullReport
- run:
name: lint
command: ./gradlew :ultrasonic:lintRelease
- run:
name: assemble release build
command: ./gradlew build assembleRelease
name: build
command: ./gradlew buildRelease
- run:
name: assemble release
command: ./gradlew assembleRelease
- save_cache:
paths:
- ~/.gradle
key: v1-ultrasonic-{{ .Branch }}-{{ checksum "dependencies.gradle" }}
key: v2-ultrasonic-{{ .Branch }}-{{ checksum "gradle/libs.versions.toml" }}
- store_artifacts:
path: ultrasonic/build/reports
destination: reports
- store_artifacts:
path: subsonic-api/build/reports
destination: reports
- store_artifacts:
path: build/reports/jacoco/jacocoFullReport/
push_translations:
docker:
- image: circleci/python:3.6
- image: cimg/python:3.6
working_directory: ~/ultrasonic
steps:
- checkout
@ -72,15 +82,19 @@ jobs:
tx push -s
generate_signed_apk:
docker:
- image: circleci/android:api-28
- image: cimg/android:2022.06.1
working_directory: ~/ultrasonic
environment:
JVM_OPTS: << pipeline.parameters.memory-config >>
JAVA_TOOL_OPTIONS: << pipeline.parameters.memory-config >>
GRADLE_OPTS: << pipeline.parameters.memory-config >>
steps:
- checkout
- restore_cache:
keys:
- v1-ultrasonic-{{ .Branch }}-{{ checksum "dependencies.gradle" }}
- v1-ultrasonic-{{ .Branch }}
- v1-ultrasonic
- v2-ultrasonic-{{ .Branch }}-{{ checksum "gradle/libs.versions.toml" }}
- v2-ultrasonic-{{ .Branch }}
- v2-ultrasonic
- run:
name: decrypt ultrasonic-keystore
command: openssl aes-256-cbc -K ${ULTRASONIC_KEYSTORE_KEY} -iv ${ULTRASONIC_KEYSTORE_IV} -in ultrasonic-keystore.enc -out ultrasonic-keystore -d
@ -90,23 +104,24 @@ jobs:
- run:
name: sign release apk
command: |
export PATH="${JAVA_HOME}/bin:${PATH}"
mkdir -p /tmp/ultrasonic-release
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ~/ultrasonic/ultrasonic-keystore -storepass ${ULTRASONIC_KEYSTORE_STOREPASS} -keypass ${ULTRASONIC_KEYSTORE_KEYPASS} ultrasonic/build/outputs/apk/release/ultrasonic-release-unsigned.apk ultrasonic
jarsigner -verify ultrasonic/build/outputs/apk/release/ultrasonic-release-unsigned.apk
${ANDROID_HOME}/build-tools/27.0.0/zipalign -v 4 ultrasonic/build/outputs/apk/release/ultrasonic-release-unsigned.apk /tmp/ultrasonic-release/ultrasonic-${CIRCLE_TAG}.apk
${ANDROID_HOME}/build-tools/32.0.0/zipalign -v 4 ultrasonic/build/outputs/apk/release/ultrasonic-release-unsigned.apk /tmp/ultrasonic-release/ultrasonic-${CIRCLE_TAG}.apk
${ANDROID_HOME}/build-tools/32.0.0/apksigner sign --verbose --ks ~/ultrasonic/ultrasonic-keystore --ks-pass pass:${ULTRASONIC_KEYSTORE_STOREPASS} --key-pass pass:${ULTRASONIC_KEYSTORE_KEYPASS} /tmp/ultrasonic-release/ultrasonic-${CIRCLE_TAG}.apk
${ANDROID_HOME}/build-tools/32.0.0/apksigner verify --verbose /tmp/ultrasonic-release/ultrasonic-${CIRCLE_TAG}.apk
- persist_to_workspace:
root: /tmp/ultrasonic-release
paths:
- ultrasonic-*.apk
- ultrasonic-*.apk*
publish_github_signed_apk:
docker:
- image: circleci/golang
- image: cimg/go:1.18
steps:
- attach_workspace:
at: /tmp/ultrasonic-release
- run:
name: install ghr
command: go get -v github.com/tcnksm/ghr
command: go install -v github.com/tcnksm/ghr@latest
- run:
name: publish release on github tag
command: ghr -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} ${CIRCLE_TAG} /tmp/ultrasonic-release
@ -122,11 +137,10 @@ workflows:
branches:
only:
- develop
- master
- generate_signed_apk:
filters:
tags:
only: /^[0-9]+(\.[0-9]+)*/
only: /^[0-9]+(\.[0-9]+)*(-beta\.[0-9]+)?/
branches:
ignore: /.*/
- publish_github_signed_apk:
@ -134,7 +148,7 @@ workflows:
- generate_signed_apk
filters:
tags:
only: /^[0-9]+(\.[0-9]+)*/
only: /^[0-9]+(\.[0-9]+)*(-beta\.[0-9]+)?/
branches:
ignore: /.*/

View File

@ -8,4 +8,8 @@ updates:
- package-ecosystem: "gradle" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
interval: "monthly"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-patch"]

1
.gitignore vendored
View File

@ -39,6 +39,7 @@ captures/
*.iml
.idea/
# Keystore files
*.jks

View File

@ -0,0 +1,128 @@
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<JetCodeStyleSettings>
<option name="PACKAGES_TO_USE_STAR_IMPORTS">
<value />
</option>
<option name="NAME_COUNT_TO_USE_STAR_IMPORT" value="2147483647" />
<option name="NAME_COUNT_TO_USE_STAR_IMPORT_FOR_MEMBERS" value="2147483647" />
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</JetCodeStyleSettings>
<codeStyleSettings language="XML">
<option name="FORCE_REARRANGE_MODE" value="1" />
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
</indentOptions>
<arrangement>
<rules>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:android</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:id</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:name</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>name</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>style</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
<order>ANDROID_ATTRIBUTE_ORDER</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>.*</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
</rules>
</arrangement>
</codeStyleSettings>
<codeStyleSettings language="kotlin">
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</codeStyleSettings>
</code_scheme>
</component>

View File

@ -0,0 +1,5 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
</state>
</component>

6
.idea/compiler.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="11" />
</component>
</project>

View File

@ -0,0 +1,6 @@
<component name="CopyrightManager">
<copyright>
<option name="notice" value="&amp;#36;file.fileName&#10;Copyright (C) 2009-&amp;#36;today.year Ultrasonic developers&#10;&#10;Distributed under terms of the GNU GPLv3 license." />
<option name="myName" value="Default" />
</copyright>
</component>

View File

@ -0,0 +1,7 @@
<component name="CopyrightManager">
<settings default="Default">
<LanguageOptions name="Kotlin">
<option name="fileTypeOverride" value="3" />
</LanguageOptions>
</settings>
</component>

View File

@ -0,0 +1,8 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="Reformat" enabled="true" level="WEAK WARNING" enabled_by_default="true">
<option name="processChangedFilesOnly" value="true" />
</inspection_tool>
</profile>
</component>

4
.idea/misc.xml Normal file
View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK" />
</project>

6
.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

View File

@ -18,18 +18,46 @@ By default Pull Request should be opened against **develop** branch, PR against
### Here are a few guidelines you should follow before submitting:
1. **License Acceptance:** All contributions must be licensed as [GNU GPLv3](LICENSE) to be accepted.
Use `git commit --signoff` to acknowledge this.
2. **App is migrating to [Kotlin](https://kotlinlang.org/) programming language:** new Pull Requests
should be written in this programming language.
3. **No Breakage:** New features or changes to existing ones must not degrade the user experience.
4. **Coding standards:** best-practices should be followed, comment generously, and avoid "clever" algorithms.
Use `git commit --signoff` to acknowledge this.
2. **No Breakage:** New features or changes to existing ones must not degrade the user experience.
3. **Coding standards:** best-practices should be followed, comment generously, and avoid "clever" algorithms.
Refactoring existing messes is great, but watch out for breakage.
5. **No large PR:** Try to limit the scope of PR only to the related issue, so it will be easier to review
4. **No large PR:** Try to limit the scope of PR only to the related issue, so it will be easier to review
and test.
### Pull Request Process
On each Pull Request Github runs a number of checks to make sure there are no problems.
#### Signed commits
Commits must be signed. [See here how to set it up](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits)
#### KtLint
This programm checks if the source code is formatted correctly.
You can run it yourself locally with
`./gradlew -Pqc ktlintFormat`
Running this command will fix common problems and will notify you of problems it couldn't fix automatically.
#### Detekt
Detekt is a static analyser. It helps to find potential bugs in our code.
You can run it yourself locally with
`./gradlew -Pqc detekt`
There is a "baseline" file, in which errors which have been in the code base before are noted.
Sometimes it is necessary to regenerate this file by running:
`./gradlew -Pqc detektBaseline`
#### Lint
Lint looks for general problems in the code or unused resources etc.
You can run it with
`./gradlew -Pqc lintRelease`
If there is a need to regenerate the baseline, remove `ultrasonic/lint-baseline.xml` and rerun the command.
1. Ensure [all commits are signed-off](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/about-commit-signature-verification).
2. Check tests for the new code are added.
3. Check code style is passing.
4. Check code static analysis is passing.

View File

@ -1,20 +1,28 @@
## Problem description
Describe your problem here. Describe what you want to happen, and what happens
if you try to do it. If you have a stack trace or any logs, please format them using
github triple backquote notation
Describe your problem here. Describe what you want to happen, and what
happens if you try to do it. If you have a stack trace or any logs, please
format them using GitHub triple backquote notation.
### Steps to reproduce
Describe how somebody else could observe the same behavior you do. Don't share here any logins and
passwords!
Describe how somebody else could observe the same behavior you do. Don't
share here any logins and passwords!
## System information
### Ultrasonic client
* **Ultrasonic version**: *version of the app*
* **Android version**: *Version of Android OS on the device*
* **Device info**: *Device manufacturer, model*
### Server
* **Server name**: *Airsonic, Ampache, Supysonic...*
* **Server version**: *version of server software*
* **Protocol used**: *http or https (self certificate, letsencrypt...)*
## Additional notes
Include any extra notes here. Otherwise you may remove this section.

View File

@ -1,14 +1,25 @@
# Ultrasonic
[![Build Status](https://circleci.com/gh/ultrasonic/ultrasonic/tree/develop.svg?style=shield&circle-token=:circle-token)](https://circleci.com/gh/ultrasonic)
[![Codecov branch](https://img.shields.io/codecov/c/github/ultrasonic/ultrasonic/develop.svg)]()
[![ktlint](https://img.shields.io/badge/code%20style-%E2%9D%A4-FF4081.svg)](https://ktlint.github.io/)
# WE HAVE MOVED
Ultrasonic is free and open-source music streaming Android client for [Subsonic](http://www.subsonic.org/) [API](http://www.subsonic.org/pages/api.jsp) (version 1.7.0 or higher) compatible servers.
Ultrasonic code is now hosted in [GitLab][ultrasonic].
- New Web: https://ultrasonic.gitlab.io
- New Git: https://gitlab.com/ultrasonic/ultrasonic
- New bugtracker: https://gitlab.com/ultrasonic/ultrasonic/-/issues
- New releases: https://gitlab.com/ultrasonic/ultrasonic/-/packages
[ultrasonic]: https://gitlab.com/ultrasonic/ultrasonic
# Ultrasonic
Ultrasonic is free and open-source music streaming Android client for
[Subsonic][subsonic] [API][subapi] (version 1.7.0 or higher) compatible
servers.
## Help wanted
We currently don't have that much time to spend developing Subsonic, so any
contributions or active developers are always welcomed.
Have a look at [CONTRIBUTING](CONTRIBUTING.md) to get started.
## Download
@ -16,22 +27,26 @@ App is available to download at following stores:
[<img src="https://play.google.com/intl/en_us/badges/images/generic/en-play-badge.png" alt="Get it on Google Play" height="70">](https://play.google.com/store/apps/details?id=org.moire.ultrasonic)
[<img src="https://f-droid.org/badge/get-it-on.png" alt="Get it on F-Droid" height="70">](https://f-droid.org/packages/org.moire.ultrasonic/)
[<img src="https://ultrasonic.github.io/assets/img/get-it-on-github.png" alt="Get it on GitHub" height="70">](https://github.com/ultrasonic/ultrasonic/releases)
[<img src="https://ultrasonic.gitlab.io/assets/img/get-it-on-gitlab.png" alt="Get it on GitLab" height="70">](https://gitlab.com/ultrasonic/ultrasonic/-/releases)
**Warning**: All three versions (Google Play, F-Droid and the APKs) are not
compatible (not signed by the same key)! You must uninstall one to install
the other, which will delete all your data.
If you want to use the version downloaded from F-Droid or from GitLab with
**Android Auto**, you must enable Unknown Sources as it is described in
[this wiki page][wikiaa].
## Bugs and issues
First, see if your issue havent been yet reported [here](https://github.com/ultrasonic/ultrasonic/issues),
otherwise open [a new issue](https://github.com/ultrasonic/ultrasonic/issues/new).
First, see if your issue havent been yet reported [here][issues], otherwise
open [a new issue][newissue].
### Known (not our) bugs
If you are using *Madsonic 5.1.X* several sections of Ultrasonic will not
work. This is caused by bad implementation of Subsonic API by Madsonic. For
more info about this you can read [this bug](https://github.com/ultrasonic/ultrasonic/issues/129).
more info about this you can read [this bug][madbug].
## Contributing
@ -39,16 +54,29 @@ See [CONTRIBUTING](CONTRIBUTING.md).
## Supported (tested) Subsonic API implementations
- [Subsonic](http://www.subsonic.org/pages/index.jsp)
- [Airsonic](https://github.com/airsonic/airsonic)
- [Supysonic](https://github.com/spl0k/supysonic)
- [Ampache](https://ampache.org/)
- [Subsonic][subsonic]
- [Airsonic-Advanced][airsonic]
- [Supysonic][supysonic]
- [Ampache][ampache]
Other *Subsonic API* implementations should work as well as long as they follow API
[documentation](http://www.subsonic.org/pages/api.jsp).
Other *Subsonic API* implementations should work as well as long as they
follow API [documentation][subapi].
## License
This software is licensed under the terms of the GNU General Public License version 3 (GPLv3).
This software is licensed under the terms of the GNU General Public License
version 3 (GPLv3).
Full text of the license is available in the [LICENSE](LICENSE) file and [online](https://opensource.org/licenses/gpl-3.0.html).
Full text of the license is available in the [LICENSE](LICENSE) file and
[online][gpl3].
[wikiaa]: https://gitlab.com/ultrasonic/ultrasonic/-/wikis/Using-Ultrasonic-with-Android-Auto
[issues]: https://gitlab.com/ultrasonic/ultrasonic/-/issues
[newissue]: https://gitlab.com/ultrasonic/ultrasonic/-/issues/new
[madbug]: https://gitlab.com/ultrasonic/ultrasonic/-/issues/129
[subsonic]: http://www.subsonic.org/
[subapi]: http://www.subsonic.org/pages/api.jsp
[airsonic]: https://github.com/airsonic-advanced/airsonic-advanced
[supysonic]: https://github.com/spl0k/supysonic
[ampache]: https://ampache.org/
[gpl3]: https://opensource.org/licenses/gpl-3.0.html

View File

@ -1,6 +1,6 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
apply from: 'dependencies.gradle'
apply from: 'gradle/versions.gradle'
ext.bootstrap = [
kotlinModule : "${project.rootDir}/gradle_scripts/kotlin-module-bootstrap.gradle",
@ -13,11 +13,10 @@ buildscript {
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath gradlePlugins.gradle
classpath gradlePlugins.kotlin
classpath gradlePlugins.ktlintGradle
classpath gradlePlugins.detekt
classpath gradlePlugins.jacoco
classpath libs.gradle
classpath libs.kotlin
classpath libs.ktlintGradle
classpath libs.detekt
}
}
@ -44,9 +43,7 @@ allprojects {
}
}
apply from: 'gradle_scripts/jacoco.gradle'
wrapper {
gradleVersion(versions.gradle)
gradleVersion(libs.versions.gradle.get())
distributionType("all")
}

View File

@ -1,12 +0,0 @@
apply from: bootstrap.kotlinModule
dependencies {
api project(':core:domain')
api other.twitterSerial
testImplementation testing.kotlinJunit
testImplementation testing.mockito
testImplementation testing.mockitoInline
testImplementation testing.mockitoKotlin
testImplementation testing.kluent
}

View File

@ -1,14 +0,0 @@
package org.moire.ultrasonic.cache
import java.io.File
/**
* Provides access to generic directories:
* - for temporary caches
* - for permanent data storage
*/
interface Directories {
fun getInternalCacheDir(): File
fun getInternalDataDir(): File
fun getExternalCacheDir(): File?
}

View File

@ -1,75 +0,0 @@
package org.moire.ultrasonic.cache
import com.twitter.serial.serializer.SerializationContext
import com.twitter.serial.serializer.Serializer
import com.twitter.serial.stream.Serial
import com.twitter.serial.stream.bytebuffer.ByteBufferSerial
import java.io.File
typealias DomainEntitySerializer<T> = Serializer<T>
internal const val STORAGE_DIR_NAME = "persistent_storage"
/**
* Provides access to permanent file based storage.
*
* [serverId] is currently active server. Should be unique per server so stored data will not
* interfere with other server data.
*
* Look at [org.moire.ultrasonic.cache.serializers] package for available [DomainEntitySerializer]s.
*/
class PermanentFileStorage(
private val directories: Directories,
private val serverId: String,
private val debug: Boolean = false
) {
private val serializationContext = object : SerializationContext {
override fun isDebug(): Boolean = debug
override fun isRelease(): Boolean = !debug
}
private val serializer: Serial = ByteBufferSerial(serializationContext)
/**
* Stores given [objectToStore] using [name] as a key and [objectSerializer] as serializer.
*/
fun <T> store(
name: String,
objectToStore: T,
objectSerializer: DomainEntitySerializer<T>
) {
val storeFile = getFile(name)
if (!storeFile.exists()) storeFile.createNewFile()
storeFile.writeBytes(serializer.toByteArray(objectToStore, objectSerializer))
}
/**
* Loads object with [name] key using [objectDeserializer] deserializer.
*/
fun <T> load(
name: String,
objectDeserializer: DomainEntitySerializer<T>
): T? {
val storeFile = getFile(name)
if (!storeFile.exists()) return null
return serializer.fromByteArray(storeFile.readBytes(), objectDeserializer)
}
/**
* Clear all files in storage.
*/
fun clearAll() {
val storageDir = getStorageDir()
storageDir.listFiles().forEach { it.deleteRecursively() }
}
private fun getFile(name: String) = File(getStorageDir(), "$name.ser")
private fun getStorageDir(): File {
val mainDir = File(directories.getInternalDataDir(), STORAGE_DIR_NAME)
val serverDir = File(mainDir, serverId)
if (!serverDir.exists()) serverDir.mkdirs()
return serverDir
}
}

View File

@ -1,65 +0,0 @@
@file:JvmMultifileClass
@file:JvmName("DomainSerializers")
package org.moire.ultrasonic.cache.serializers
import com.twitter.serial.serializer.CollectionSerializers
import com.twitter.serial.serializer.ObjectSerializer
import com.twitter.serial.serializer.SerializationContext
import com.twitter.serial.stream.SerializerDefs
import com.twitter.serial.stream.SerializerInput
import com.twitter.serial.stream.SerializerOutput
import org.moire.ultrasonic.cache.DomainEntitySerializer
import org.moire.ultrasonic.domain.Artist
private const val SERIALIZER_VERSION = 1
private val artistSerializer get() = object : ObjectSerializer<Artist>(SERIALIZER_VERSION) {
override fun serializeObject(
context: SerializationContext,
output: SerializerOutput<out SerializerOutput<*>>,
item: Artist
) {
output.writeString(item.id)
.writeString(item.name)
.writeString(item.index)
.writeString(item.coverArt)
.apply {
val albumCount = item.albumCount
if (albumCount != null) writeLong(albumCount) else writeNull()
}
.writeInt(item.closeness)
}
override fun deserializeObject(
context: SerializationContext,
input: SerializerInput,
versionNumber: Int
): Artist? {
if (versionNumber != SERIALIZER_VERSION) return null
val id = input.readString()
val name = input.readString()
val index = input.readString()
val coverArt = input.readString()
val albumCount = if (input.peekType() == SerializerDefs.TYPE_NULL) {
input.readNull()
null
} else {
input.readLong()
}
val closeness = input.readInt()
return Artist(id, name, index, coverArt, albumCount, closeness)
}
}
/**
* Serializer/deserializer for [Artist] domain entity.
*/
fun getArtistsSerializer(): DomainEntitySerializer<Artist> = artistSerializer
private val artistListSerializer = CollectionSerializers.getListSerializer(artistSerializer)
/**
* Serializer/deserializer for list of [Artist] domain entities.
*/
fun getArtistListSerializer(): DomainEntitySerializer<List<Artist>> = artistListSerializer

View File

@ -1,51 +0,0 @@
@file:JvmMultifileClass
@file:JvmName("DomainSerializers")
package org.moire.ultrasonic.cache.serializers
import com.twitter.serial.serializer.ObjectSerializer
import com.twitter.serial.serializer.SerializationContext
import com.twitter.serial.stream.SerializerInput
import com.twitter.serial.stream.SerializerOutput
import org.moire.ultrasonic.cache.DomainEntitySerializer
import org.moire.ultrasonic.domain.Artist
import org.moire.ultrasonic.domain.Indexes
private const val SERIALIZATION_VERSION = 1
private val indexesSerializer get() = object : ObjectSerializer<Indexes>(SERIALIZATION_VERSION) {
override fun serializeObject(
context: SerializationContext,
output: SerializerOutput<out SerializerOutput<*>>,
item: Indexes
) {
val artistListSerializer = getArtistListSerializer()
output.writeLong(item.lastModified)
.writeString(item.ignoredArticles)
.writeObject<MutableList<Artist>>(context, item.shortcuts, artistListSerializer)
.writeObject<MutableList<Artist>>(context, item.artists, artistListSerializer)
}
@Suppress("ReturnCount")
override fun deserializeObject(
context: SerializationContext,
input: SerializerInput,
versionNumber: Int
): Indexes? {
if (versionNumber != SERIALIZATION_VERSION) return null
val artistListDeserializer = getArtistListSerializer()
val lastModified = input.readLong()
val ignoredArticles = input.readString() ?: return null
val shortcutsList = input.readObject(context, artistListDeserializer) ?: return null
val artistsList = input.readObject(context, artistListDeserializer) ?: return null
return Indexes(
lastModified, ignoredArticles, shortcutsList.toMutableList(),
artistsList.toMutableList()
)
}
}
/**
* Get serializer/deserializer for [Indexes] entity.
*/
fun getIndexesSerializer(): DomainEntitySerializer<Indexes> = indexesSerializer

View File

@ -1,51 +0,0 @@
@file:JvmMultifileClass
@file:JvmName("DomainSerializers")
package org.moire.ultrasonic.cache.serializers
import com.twitter.serial.serializer.CollectionSerializers
import com.twitter.serial.serializer.ObjectSerializer
import com.twitter.serial.serializer.SerializationContext
import com.twitter.serial.stream.SerializerInput
import com.twitter.serial.stream.SerializerOutput
import org.moire.ultrasonic.cache.DomainEntitySerializer
import org.moire.ultrasonic.domain.MusicFolder
private const val SERIALIZATION_VERSION = 1
private val musicFolderSerializer = object : ObjectSerializer<MusicFolder>(SERIALIZATION_VERSION) {
override fun serializeObject(
context: SerializationContext,
output: SerializerOutput<out SerializerOutput<*>>,
item: MusicFolder
) {
output.writeString(item.id).writeString(item.name)
}
@Suppress("ReturnCount")
override fun deserializeObject(
context: SerializationContext,
input: SerializerInput,
versionNumber: Int
): MusicFolder? {
if (versionNumber != SERIALIZATION_VERSION) return null
val id = input.readString() ?: return null
val name = input.readString() ?: return null
return MusicFolder(id, name)
}
}
/**
* Serializer/deserializer for [MusicFolder] domain entity.
*/
fun getMusicFolderSerializer(): DomainEntitySerializer<MusicFolder> = musicFolderSerializer
private val musicFolderListSerializer =
CollectionSerializers.getListSerializer(musicFolderSerializer)
/**
* Serializer/deserializer for [List] of [MusicFolder] items.
*/
fun getMusicFolderListSerializer(): DomainEntitySerializer<List<MusicFolder>> =
musicFolderListSerializer

View File

@ -1,42 +0,0 @@
package org.moire.ultrasonic.cache
import com.twitter.serial.util.SerializationUtils
import java.io.File
import org.amshove.kluent.`it returns`
import org.junit.Before
import org.junit.Rule
import org.junit.rules.TemporaryFolder
import org.mockito.kotlin.mock
internal const val INTERNAL_DATA_FOLDER = "data"
internal const val INTERNAL_CACHE_FOLDER = "cache"
internal const val EXTERNAL_CACHE_FOLDER = "external_cache"
/**
* Base test class that inits the storage
*/
abstract class BaseStorageTest {
@get:Rule val tempFileRule = TemporaryFolder()
protected lateinit var mockDirectories: Directories
protected lateinit var storage: PermanentFileStorage
open val serverId: String = ""
@Before
fun setUp() {
mockDirectories = mock<Directories> {
on { getInternalDataDir() } `it returns` tempFileRule.newFolder(INTERNAL_DATA_FOLDER)
on { getInternalCacheDir() } `it returns` tempFileRule.newFolder(INTERNAL_CACHE_FOLDER)
on { getExternalCacheDir() } `it returns` tempFileRule.newFolder(EXTERNAL_CACHE_FOLDER)
}
storage = PermanentFileStorage(mockDirectories, serverId, true)
}
protected val storageDir get() = File(mockDirectories.getInternalDataDir(), STORAGE_DIR_NAME)
protected fun validateSerializedData(index: Int = 0) {
val serializedFileBytes = storageDir.listFiles()[index].readBytes()
SerializationUtils.validateSerializedData(serializedFileBytes)
}
}

View File

@ -1,80 +0,0 @@
package org.moire.ultrasonic.cache
import java.io.File
import org.amshove.kluent.`should be equal to`
import org.amshove.kluent.`should contain`
import org.junit.Test
import org.moire.ultrasonic.cache.serializers.getMusicFolderSerializer
import org.moire.ultrasonic.domain.MusicFolder
/**
* Integration test for [PermanentFileStorage].
*/
class PermanentFileStorageTest : BaseStorageTest() {
override val serverId: String
get() = "some-server-id"
@Test
fun `Should create storage dir if it is not exist`() {
val item = MusicFolder("1", "2")
storage.store("test", item, getMusicFolderSerializer())
storageDir.exists() `should be equal to` true
getServerStorageDir().exists() `should be equal to` true
}
@Test
fun `Should serialize to file`() {
val item = MusicFolder("1", "23")
val name = "some-name"
storage.store(name, item, getMusicFolderSerializer())
val storageFiles = getServerStorageDir().listFiles()
storageFiles.size `should be equal to` 1
storageFiles[0].name `should contain` name
}
@Test
fun `Should deserialize stored object`() {
val item = MusicFolder("some", "nice")
val name = "some-name"
storage.store(name, item, getMusicFolderSerializer())
val loadedItem = storage.load(name, getMusicFolderSerializer())
loadedItem `should be equal to` item
}
@Test
fun `Should overwrite existing stored object`() {
val name = "some-nice-name"
val item1 = MusicFolder("1", "1")
val item2 = MusicFolder("2", "2")
storage.store(name, item1, getMusicFolderSerializer())
storage.store(name, item2, getMusicFolderSerializer())
val loadedItem = storage.load(name, getMusicFolderSerializer())
loadedItem `should be equal to` item2
}
@Test
fun `Should clear all files when clearAll is called`() {
storage.store("name1", MusicFolder("1", "1"), getMusicFolderSerializer())
storage.store("name2", MusicFolder("2", "2"), getMusicFolderSerializer())
storage.clearAll()
getServerStorageDir().listFiles().size `should be equal to` 0
}
@Test
fun `Should return null if serialized file not available`() {
val loadedItem = storage.load("some-name", getMusicFolderSerializer())
loadedItem `should be equal to` null
}
private fun getServerStorageDir() = File(storageDir, serverId)
}

View File

@ -1,57 +0,0 @@
package org.moire.ultrasonic.cache.serializers
import org.amshove.kluent.`should be equal to`
import org.junit.Test
import org.moire.ultrasonic.cache.BaseStorageTest
import org.moire.ultrasonic.domain.Artist
/**
* [Artist] serializers test.
*/
class ArtistSerializerTest : BaseStorageTest() {
@Test
fun `Should correctly serialize Artist object`() {
val item = Artist("id", "name", "index", "coverArt", 1, 0)
storage.store("some-name", item, getArtistsSerializer())
validateSerializedData()
}
@Test
fun `Should correctly deserialize Artist object`() {
val itemName = "some-name"
val item = Artist("id", "name", "index", "coverArt", null, 0)
storage.store(itemName, item, getArtistsSerializer())
val loadedItem = storage.load(itemName, getArtistsSerializer())
loadedItem `should be equal to` item
}
@Test
fun `Should correctly serialize list of Artists`() {
val itemsList = listOf(
Artist(id = "1"),
Artist(id = "2", name = "some")
)
storage.store("some-name", itemsList, getArtistListSerializer())
validateSerializedData()
}
@Test
fun `Should correctly deserialize list of Artists`() {
val name = "some-name"
val itemsList = listOf(
Artist(id = "1"),
Artist(id = "2", name = "some")
)
storage.store(name, itemsList, getArtistListSerializer())
val loadedItems = storage.load(name, getArtistListSerializer())
loadedItems `should be equal to` itemsList
}
}

View File

@ -1,38 +0,0 @@
package org.moire.ultrasonic.cache.serializers
import org.amshove.kluent.`should be equal to`
import org.junit.Test
import org.moire.ultrasonic.cache.BaseStorageTest
import org.moire.ultrasonic.domain.Artist
import org.moire.ultrasonic.domain.Indexes
/**
* Test [Indexes] domain entity serializer.
*/
class IndexesSerializerTest : BaseStorageTest() {
@Test
fun `Should correctly serialize Indexes object`() {
val item = Indexes(
220L, "", mutableListOf(Artist("12")),
mutableListOf(Artist("233", "some"))
)
storage.store("some-name", item, getIndexesSerializer())
validateSerializedData()
}
@Test
fun `Should correctly deserialize Indexes object`() {
val name = "some-name"
val item = Indexes(
220L, "", mutableListOf(Artist("12")),
mutableListOf(Artist("233", "some"))
)
storage.store(name, item, getIndexesSerializer())
val loadedItem = storage.load(name, getIndexesSerializer())
loadedItem `should be equal to` item
}
}

View File

@ -1,57 +0,0 @@
package org.moire.ultrasonic.cache.serializers
import org.amshove.kluent.`should be equal to`
import org.junit.Test
import org.moire.ultrasonic.cache.BaseStorageTest
import org.moire.ultrasonic.domain.MusicFolder
/**
* [MusicFolder] serializers test.
*/
class MusicFolderSerializerTest : BaseStorageTest() {
@Test
fun `Should correctly serialize MusicFolder object`() {
val item = MusicFolder("Music", "Folder")
storage.store("some-name", item, getMusicFolderSerializer())
validateSerializedData()
}
@Test
fun `Should correctly deserialize MusicFolder object`() {
val name = "name"
val item = MusicFolder("some", "none")
storage.store(name, item, getMusicFolderSerializer())
val loadedItem = storage.load(name, getMusicFolderSerializer())
loadedItem `should be equal to` item
}
@Test
fun `Should correctly serialize list of MusicFolders objects`() {
val itemsList = listOf(
MusicFolder("1", "1"),
MusicFolder("2", "2")
)
storage.store("some-name", itemsList, getMusicFolderListSerializer())
validateSerializedData()
}
@Test
fun `Should correctly deserialize list of MusicFolder objects`() {
val name = "some-name"
val itemsList = listOf(
MusicFolder("1", "1"),
MusicFolder("2", "2")
)
storage.store(name, itemsList, getMusicFolderListSerializer())
val loadedItem = storage.load(name, getMusicFolderListSerializer())
loadedItem `should be equal to` itemsList
}
}

View File

@ -1,7 +1,8 @@
apply from: bootstrap.kotlinModule
apply from: bootstrap.androidModule
apply plugin: 'kotlin-kapt'
ext {
jacocoExclude = [
'**/domain/**'
]
dependencies {
implementation libs.roomRuntime
implementation libs.roomKtx
kapt libs.room
}

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.moire.ultrasonic.subsonic.domain">
</manifest>

View File

@ -0,0 +1,38 @@
/*
* Album.kt
* Copyright (C) 2009-2022 Ultrasonic developers
*
* Distributed under terms of the GNU GPLv3 license.
*/
package org.moire.ultrasonic.domain
import androidx.room.ColumnInfo
import androidx.room.Entity
import java.util.Date
@Entity(tableName = "albums", primaryKeys = ["id", "serverId"])
data class Album(
override var id: String,
@ColumnInfo(defaultValue = "-1")
override var serverId: Int = -1,
override var parent: String? = null,
override var album: String? = null,
override var title: String? = null,
override val name: String? = null,
override var discNumber: Int? = 0,
override var coverArt: String? = null,
override var songCount: Long? = null,
override var created: Date? = null,
override var artist: String? = null,
override var artistId: String? = null,
override var duration: Int? = 0,
override var year: Int? = 0,
override var genre: String? = null,
override var starred: Boolean = false,
override var path: String? = null,
override var closeness: Int = 0,
) : MusicDirectory.Child() {
override var isDirectory = true
override var isVideo = false
}

View File

@ -1,30 +1,23 @@
/*
* Artist.kt
* Copyright (C) 2009-2022 Ultrasonic developers
*
* Distributed under terms of the GNU GPLv3 license.
*/
package org.moire.ultrasonic.domain
import java.io.Serializable
import androidx.room.ColumnInfo
import androidx.room.Entity
@Entity(tableName = "artists", primaryKeys = ["id", "serverId"])
data class Artist(
override var id: String? = null,
override var id: String,
@ColumnInfo(defaultValue = "-1")
override var serverId: Int = -1,
override var name: String? = null,
var index: String? = null,
var coverArt: String? = null,
var albumCount: Long? = null,
var closeness: Int = 0
) : Serializable, GenericEntry(), Comparable<Artist> {
companion object {
private const val serialVersionUID = -5790532593784846982L
}
override fun compareTo(other: Artist): Int {
when {
this.closeness == other.closeness -> {
return 0
}
this.closeness > other.closeness -> {
return -1
}
else -> {
return 1
}
}
}
}
override var index: String? = null,
override var coverArt: String? = null,
override var albumCount: Long? = null,
override var closeness: Int = 0
) : ArtistOrIndex(id, serverId)

View File

@ -0,0 +1,45 @@
/*
* ArtistOrIndex.kt
* Copyright (C) 2009-2022 Ultrasonic developers
*
* Distributed under terms of the GNU GPLv3 license.
*/
package org.moire.ultrasonic.domain
import androidx.room.Ignore
@Suppress("LongParameterList")
abstract class ArtistOrIndex(
@Ignore
override var id: String,
@Ignore
open var serverId: Int,
@Ignore
override var name: String? = null,
@Ignore
open var index: String? = null,
@Ignore
open var coverArt: String? = null,
@Ignore
open var albumCount: Long? = null,
@Ignore
open var closeness: Int = 0
) : GenericEntry() {
fun compareTo(other: ArtistOrIndex): Int {
return when {
this.closeness == other.closeness -> {
0
}
this.closeness > other.closeness -> {
-1
}
else -> {
1
}
}
}
override fun compareTo(other: Identifiable) = compareTo(other as ArtistOrIndex)
}

View File

@ -2,7 +2,6 @@ package org.moire.ultrasonic.domain
import java.io.Serializable
import java.util.Date
import org.moire.ultrasonic.domain.MusicDirectory.Entry
data class Bookmark(
val position: Int = 0,
@ -10,7 +9,7 @@ data class Bookmark(
val comment: String,
val created: Date? = null,
val changed: Date? = null,
val entry: Entry
val track: Track
) : Serializable {
companion object {
private const val serialVersionUID = 8988990025189807803L

View File

@ -1,19 +0,0 @@
package org.moire.ultrasonic.domain
abstract class GenericEntry {
// TODO: Should be non-null!
abstract val id: String?
open val name: String? = null
// These are just a formality and will never be called,
// because Kotlin data classes will have autogenerated equals() and hashCode() functions
override operator fun equals(other: Any?): Boolean {
return this === other
}
override fun hashCode(): Int {
var result = id?.hashCode() ?: 0
result = 31 * result + (name?.hashCode() ?: 0)
return result
}
}

View File

@ -1,10 +1,13 @@
package org.moire.ultrasonic.domain
import androidx.room.Entity
import androidx.room.PrimaryKey
import java.io.Serializable
@Entity
data class Genre(
val name: String,
val index: String
@PrimaryKey val index: String,
val name: String
) : Serializable {
companion object {
private const val serialVersionUID = -3943025175219134028L

View File

@ -0,0 +1,19 @@
package org.moire.ultrasonic.domain
import androidx.room.Ignore
abstract class GenericEntry : Identifiable {
@Ignore
open val name: String? = null
}
interface Identifiable : Comparable<Identifiable> {
val id: String
val longId: Long
get() = id.hashCode().toLong()
override fun compareTo(other: Identifiable): Int {
return longId.compareTo(other.longId)
}
}

View File

@ -0,0 +1,24 @@
/*
* Index.kt
* Copyright (C) 2009-2022 Ultrasonic developers
*
* Distributed under terms of the GNU GPLv3 license.
*/
package org.moire.ultrasonic.domain
import androidx.room.ColumnInfo
import androidx.room.Entity
@Entity(tableName = "indexes", primaryKeys = ["id", "serverId"])
data class Index(
override var id: String,
@ColumnInfo(defaultValue = "-1")
override var serverId: Int = -1,
override var name: String? = null,
override var index: String? = null,
override var coverArt: String? = null,
override var albumCount: Long? = null,
override var closeness: Int = 0,
var musicFolderId: String? = null
) : ArtistOrIndex(id, serverId)

View File

@ -1,14 +0,0 @@
package org.moire.ultrasonic.domain
import java.io.Serializable
data class Indexes(
val lastModified: Long,
val ignoredArticles: String,
val shortcuts: MutableList<Artist> = mutableListOf(),
val artists: MutableList<Artist> = mutableListOf()
) : Serializable {
companion object {
private const val serialVersionUID = 8156117238598414701L
}
}

View File

@ -1,92 +1,61 @@
/*
* MusicDirectory.kt
* Copyright (C) 2009-2022 Ultrasonic developers
*
* Distributed under terms of the GNU GPLv3 license.
*/
package org.moire.ultrasonic.domain
import java.io.Serializable
import java.util.Date
class MusicDirectory {
class MusicDirectory : ArrayList<MusicDirectory.Child>() {
var name: String? = null
private val children = mutableListOf<Entry>()
fun addAll(entries: Collection<Entry>) {
children.addAll(entries)
}
fun addFirst(child: Entry) {
children.add(0, child)
}
fun addChild(child: Entry) {
children.add(child)
}
fun findChild(id: String): Entry? = children.lastOrNull { it.id == id }
fun getAllChild(): List<Entry> = children.toList()
@JvmOverloads
fun getChildren(
includeDirs: Boolean = true,
includeFiles: Boolean = true
): List<Entry> {
): List<Child> {
if (includeDirs && includeFiles) {
return children
return toList()
}
return children.filter { it.isDirectory && includeDirs || !it.isDirectory && includeFiles }
return filter { it.isDirectory && includeDirs || !it.isDirectory && includeFiles }
}
data class Entry(
override var id: String,
var parent: String? = null,
var isDirectory: Boolean = false,
var title: String? = null,
var album: String? = null,
var albumId: String? = null,
var artist: String? = null,
var artistId: String? = null,
var track: Int? = 0,
var year: Int? = 0,
var genre: String? = null,
var contentType: String? = null,
var suffix: String? = null,
var transcodedContentType: String? = null,
var transcodedSuffix: String? = null,
var coverArt: String? = null,
var size: Long? = null,
var songCount: Long? = null,
var duration: Int? = null,
var bitRate: Int? = null,
var path: String? = null,
var isVideo: Boolean = false,
var starred: Boolean = false,
var discNumber: Int? = null,
var type: String? = null,
var created: Date? = null,
var closeness: Int = 0,
var bookmarkPosition: Int = 0,
var userRating: Int? = null,
var averageRating: Float? = null
) : Serializable, GenericEntry(), Comparable<Entry> {
fun setDuration(duration: Long) {
this.duration = duration.toInt()
fun getTracks(): List<Track> {
return mapNotNull {
it as? Track
}
}
companion object {
private const val serialVersionUID = -3339106650010798108L
fun getAlbums(): List<Album> {
return mapNotNull {
it as? Album
}
}
override fun compareTo(other: Entry): Int {
when {
this.closeness == other.closeness -> {
return 0
}
this.closeness > other.closeness -> {
return -1
}
else -> {
return 1
}
}
}
abstract class Child : GenericEntry() {
abstract override var id: String
abstract var serverId: Int
abstract var parent: String?
abstract var isDirectory: Boolean
abstract var album: String?
abstract var title: String?
abstract override val name: String?
abstract var discNumber: Int?
abstract var coverArt: String?
abstract var songCount: Long?
abstract var created: Date?
abstract var artist: String?
abstract var artistId: String?
abstract var duration: Int?
abstract var year: Int?
abstract var genre: String?
abstract var starred: Boolean
abstract var path: String?
abstract var closeness: Int
abstract var isVideo: Boolean
}
}

View File

@ -1,9 +1,22 @@
/*
* MusicFolder.kt
* Copyright (C) 2009-2022 Ultrasonic developers
*
* Distributed under terms of the GNU GPLv3 license.
*/
package org.moire.ultrasonic.domain
import androidx.room.ColumnInfo
import androidx.room.Entity
/**
* Represents a top level directory in which music or other media is stored.
*/
@Entity(tableName = "music_folders", primaryKeys = ["id", "serverId"])
data class MusicFolder(
override val id: String,
override val name: String
override val name: String,
@ColumnInfo(defaultValue = "-1")
var serverId: Int
) : GenericEntry()

View File

@ -1,12 +0,0 @@
package org.moire.ultrasonic.domain
enum class PlayerState {
IDLE,
DOWNLOADING,
PREPARING,
PREPARED,
STARTED,
STOPPED,
PAUSED,
COMPLETED
}

View File

@ -1,15 +0,0 @@
package org.moire.ultrasonic.domain
enum class RepeatMode {
OFF {
override operator fun next(): RepeatMode = ALL
},
ALL {
override operator fun next(): RepeatMode = SINGLE
},
SINGLE {
override operator fun next(): RepeatMode = OFF
};
abstract operator fun next(): RepeatMode
}

View File

@ -1,12 +1,10 @@
package org.moire.ultrasonic.domain
import org.moire.ultrasonic.domain.MusicDirectory.Entry
/**
* The result of a search. Contains matching artists, albums and songs.
*/
data class SearchResult(
val artists: List<Artist>,
val albums: List<Entry>,
val songs: List<Entry>
val artists: List<ArtistOrIndex> = listOf(),
val albums: List<Album> = listOf(),
val songs: List<Track> = listOf()
)

View File

@ -1,10 +1,9 @@
package org.moire.ultrasonic.domain
import java.io.Serializable
import org.moire.ultrasonic.domain.MusicDirectory.Entry
data class Share(
override var id: String? = null,
override var id: String,
var url: String? = null,
var description: String? = null,
var username: String? = null,
@ -12,17 +11,22 @@ data class Share(
var lastVisited: String? = null,
var expires: String? = null,
var visitCount: Long? = null,
private val entries: MutableList<Entry> = mutableListOf()
private val tracks: MutableList<Track> = mutableListOf()
) : Serializable, GenericEntry() {
override val name: String?
get() = url?.let { urlPattern.matcher(url).replaceFirst("$1") }
get() {
if (url != null) {
return urlPattern.matcher(url!!).replaceFirst("$1")
}
return null
}
fun getEntries(): List<Entry> {
return entries.toList()
fun getEntries(): List<Track> {
return tracks.toList()
}
fun addEntry(entry: Entry) {
entries.add(entry)
fun addEntry(track: Track) {
tracks.add(track)
}
companion object {

View File

@ -0,0 +1,74 @@
/*
* Track.kt
* Copyright (C) 2009-2022 Ultrasonic developers
*
* Distributed under terms of the GNU GPLv3 license.
*/
package org.moire.ultrasonic.domain
import androidx.room.ColumnInfo
import androidx.room.Entity
import java.io.Serializable
import java.util.Date
@Entity(tableName = "tracks", primaryKeys = ["id", "serverId"])
data class Track(
override var id: String,
@ColumnInfo(defaultValue = "-1")
override var serverId: Int = -1,
override var parent: String? = null,
override var isDirectory: Boolean = false,
override var title: String? = null,
override var album: String? = null,
var albumId: String? = null,
override var artist: String? = null,
override var artistId: String? = null,
var track: Int? = null,
override var year: Int? = null,
override var genre: String? = null,
var contentType: String? = null,
var suffix: String? = null,
var transcodedContentType: String? = null,
var transcodedSuffix: String? = null,
override var coverArt: String? = null,
var size: Long? = null,
override var songCount: Long? = null,
override var duration: Int? = null,
var bitRate: Int? = null,
override var path: String? = null,
override var isVideo: Boolean = false,
override var starred: Boolean = false,
override var discNumber: Int? = null,
var type: String? = null,
override var created: Date? = null,
override var closeness: Int = 0,
var bookmarkPosition: Int = 0,
var userRating: Int? = null,
var averageRating: Float? = null,
override var name: String? = null
) : Serializable, MusicDirectory.Child() {
fun setDuration(duration: Long) {
this.duration = duration.toInt()
}
companion object {
private const val serialVersionUID = -3339106650010798108L
}
fun compareTo(other: Track): Int {
when {
this.closeness == other.closeness -> {
return 0
}
this.closeness > other.closeness -> {
return -1
}
else -> {
return 1
}
}
}
override fun compareTo(other: Identifiable) = compareTo(other as Track)
}

View File

@ -1,30 +1,22 @@
apply from: bootstrap.kotlinModule
dependencies {
api other.retrofit
api other.jacksonConverter
api other.koinCore
api libs.retrofit
api libs.jacksonConverter
api libs.koinCore
implementation(other.jacksonKotlin) {
implementation(libs.jacksonKotlin) {
exclude module: 'kotlin-reflect'
}
implementation other.kotlinReflect // for jackson kotlin, but to use the same version
implementation other.okhttpLogging
implementation other.timber
implementation libs.kotlinReflect // for jackson kotlin, but to use the same version
implementation libs.okhttpLogging
implementation libs.timber
testImplementation testing.kotlinJunit
testImplementation testing.mockito
testImplementation testing.mockitoInline
testImplementation testing.mockitoKotlin
testImplementation testing.kluent
testImplementation testing.mockWebServer
testImplementation testing.apacheCodecs
}
ext {
// Excluding data classes
jacocoExclude = [
'**/models/**',
'**/di/**'
]
testImplementation libs.kotlinJunit
testImplementation libs.mockito
testImplementation libs.mockitoInline
testImplementation libs.mockitoKotlin
testImplementation libs.kluent
testImplementation libs.mockWebServer
testImplementation libs.apacheCodecs
}

View File

@ -8,7 +8,8 @@ import java.util.Locale
import java.util.TimeZone
import okhttp3.mockwebserver.MockResponse
import okhttp3.mockwebserver.MockWebServer
import okio.Okio
import okio.buffer
import okio.source
import org.amshove.kluent.`should be`
import org.amshove.kluent.`should contain`
import org.amshove.kluent.`should not be`
@ -40,12 +41,12 @@ fun MockWebServer.enqueueResponse(resourceName: String) {
}
fun Any.loadJsonResponse(name: String): String {
val source = Okio.buffer(Okio.source(javaClass.classLoader.getResourceAsStream(name)))
val source = javaClass.classLoader.getResourceAsStream(name)!!.source().buffer()
return source.readString(Charset.forName("UTF-8"))
}
fun Any.loadResourceStream(name: String): InputStream {
val source = Okio.buffer(Okio.source(javaClass.classLoader.getResourceAsStream(name)))
val source = javaClass.classLoader.getResourceAsStream(name)!!.source().buffer()
return source.inputStream()
}

View File

@ -2,9 +2,9 @@ package org.moire.ultrasonic.api.subsonic
import org.amshove.kluent.`should be equal to`
import org.junit.Test
import org.moire.ultrasonic.api.subsonic.models.Album
import org.moire.ultrasonic.api.subsonic.models.AlbumListType
import org.moire.ultrasonic.api.subsonic.models.AlbumListType.BY_GENRE
import org.moire.ultrasonic.api.subsonic.models.MusicDirectoryChild
/**
* Integration tests for [SubsonicAPIDefinition] for getAlbumList call.
@ -28,8 +28,8 @@ class SubsonicApiGetAlbumListRequestTest : SubsonicAPIClientTest() {
assertResponseSuccessful(response)
with(response.body()!!.albumList) {
size `should be equal to` 2
this[1] `should be equal to` MusicDirectoryChild(
id = "9997", parent = "9996", isDir = true,
this[1] `should be equal to` Album(
id = "9997", parent = "9996",
title = "Endless Forms Most Beautiful", album = "Endless Forms Most Beautiful",
artist = "Nightwish", year = 2015, genre = "Symphonic Metal",
coverArt = "9997", playCount = 11,

View File

@ -1,8 +1,8 @@
package org.moire.ultrasonic.api.subsonic
import okhttp3.mockwebserver.MockResponse
import org.amshove.kluent.`should be equal to`
import org.amshove.kluent.`should be`
import org.amshove.kluent.`should be equal to`
import org.amshove.kluent.`should not be`
import org.junit.Test

View File

@ -1,8 +1,8 @@
package org.moire.ultrasonic.api.subsonic
import okhttp3.mockwebserver.MockResponse
import org.amshove.kluent.`should be equal to`
import org.amshove.kluent.`should be`
import org.amshove.kluent.`should be equal to`
import org.amshove.kluent.`should not be`
import org.junit.Test

View File

@ -1,7 +1,7 @@
package org.moire.ultrasonic.api.subsonic
import org.amshove.kluent.`should be equal to`
import org.amshove.kluent.`should be`
import org.amshove.kluent.`should be equal to`
import org.amshove.kluent.`should not be`
import org.junit.Test
import org.moire.ultrasonic.api.subsonic.models.MusicDirectory

View File

@ -3,6 +3,7 @@ package org.moire.ultrasonic.api.subsonic
import org.amshove.kluent.`should be equal to`
import org.amshove.kluent.`should not be`
import org.junit.Test
import org.moire.ultrasonic.api.subsonic.models.Album
import org.moire.ultrasonic.api.subsonic.models.Artist
import org.moire.ultrasonic.api.subsonic.models.MusicDirectoryChild
import org.moire.ultrasonic.api.subsonic.models.SearchTwoResult
@ -32,9 +33,8 @@ class SubsonicApiSearchTwoTest : SubsonicAPIClientTest() {
artistList.size `should be equal to` 1
artistList[0] `should be equal to` Artist(id = "522", name = "The Prodigy")
albumList.size `should be equal to` 1
albumList[0] `should be equal to` MusicDirectoryChild(
id = "8867", parent = "522",
isDir = true, title = "Always Outnumbered, Never Outgunned",
albumList[0] `should be equal to` Album(
id = "8867", parent = "522", title = "Always Outnumbered, Never Outgunned",
album = "Always Outnumbered, Never Outgunned", artist = "The Prodigy",
year = 2004, genre = "Electronic", coverArt = "8867", playCount = 0,
created = parseDate("2016-10-23T20:57:27.000Z")

View File

@ -1,8 +1,8 @@
package org.moire.ultrasonic.api.subsonic
import okhttp3.mockwebserver.MockResponse
import org.amshove.kluent.`should be equal to`
import org.amshove.kluent.`should be`
import org.amshove.kluent.`should be equal to`
import org.amshove.kluent.`should not be`
import org.junit.Test

View File

@ -17,8 +17,8 @@ fun Response<out ResponseBody>.toStreamResponse(): StreamResponse {
val contentType = responseBody?.contentType()
if (
contentType != null &&
contentType.type().equals("application", true) &&
contentType.subtype().equals("json", true)
contentType.type.equals("application", true) &&
contentType.subtype.equals("json", true)
) {
val error = SubsonicAPIClient.jacksonMapper.readValue<SubsonicResponse>(
responseBody.byteStream()
@ -40,11 +40,11 @@ fun Response<out ResponseBody>.toStreamResponse(): StreamResponse {
* It creates Exceptions from the results returned by the Subsonic API
*/
@Suppress("ThrowsCount")
fun <T : SubsonicResponse> Response<out T>.throwOnFailure(): Response<out T> {
fun <T : SubsonicResponse> Response<T>.throwOnFailure(): Response<T> {
val response = this
if (response.isSuccessful && response.body()!!.status === SubsonicResponse.Status.OK) {
return this as Response<T>
return this
}
if (!response.isSuccessful) {
throw IOException("Server error, code: " + response.code())

View File

@ -8,6 +8,7 @@ import java.security.cert.X509Certificate
import java.util.concurrent.TimeUnit.MILLISECONDS
import javax.net.ssl.SSLContext
import javax.net.ssl.X509TrustManager
import okhttp3.Credentials
import okhttp3.OkHttpClient
import okhttp3.ResponseBody
import okhttp3.logging.HttpLoggingInterceptor
@ -68,12 +69,24 @@ class SubsonicAPIClient(
.addInterceptor { chain ->
// Adds default request params
val originalRequest = chain.request()
val newUrl = originalRequest.url().newBuilder()
val newUrl = originalRequest.url.newBuilder()
.addQueryParameter("u", config.username)
.addQueryParameter("c", config.clientID)
.addQueryParameter("f", "json")
.build()
chain.proceed(originalRequest.newBuilder().url(newUrl).build())
val newRequestBuilder = originalRequest.newBuilder().url(newUrl)
if (originalRequest.url.username.isNotEmpty() &&
originalRequest.url.password.isNotEmpty()
) {
newRequestBuilder.addHeader(
"Authorization",
Credentials.basic(
originalRequest.url.username,
originalRequest.url.password
)
)
}
chain.proceed(newRequestBuilder.build())
}
.addInterceptor(versionInterceptor)
.addInterceptor(proxyPasswordInterceptor)
@ -83,7 +96,7 @@ class SubsonicAPIClient(
// Create the Retrofit instance, and register a special converter factory
// It will update our protocol version to the correct version, once we made a successful call
val retrofit: Retrofit = Retrofit.Builder()
private val retrofit: Retrofit = Retrofit.Builder()
.baseUrl("${config.baseUrl}/rest/")
.client(okHttpClient)
.addConverterFactory(
@ -109,17 +122,20 @@ class SubsonicAPIClient(
private fun OkHttpClient.Builder.addLogging() {
val loggingInterceptor = HttpLoggingInterceptor(okLogger)
loggingInterceptor.level = HttpLoggingInterceptor.Level.BODY
loggingInterceptor.level = HttpLoggingInterceptor.Level.HEADERS
this.addInterceptor(loggingInterceptor)
}
@SuppressWarnings("TrustAllX509TrustManager", "EmptyFunctionBlock")
private fun OkHttpClient.Builder.allowSelfSignedCertificates() {
val trustManager = object : X509TrustManager {
override fun checkClientTrusted(p0: Array<out X509Certificate>?, p1: String?) {}
override fun checkServerTrusted(p0: Array<out X509Certificate>?, p1: String?) {}
override fun getAcceptedIssuers(): Array<X509Certificate> = emptyArray()
}
val trustManager =
@Suppress("CustomX509TrustManager")
object : X509TrustManager {
@Suppress("TrustAllX509TrustManager")
override fun checkClientTrusted(p0: Array<out X509Certificate>?, p1: String?) {}
@Suppress("TrustAllX509TrustManager")
override fun checkServerTrusted(p0: Array<out X509Certificate>?, p1: String?) {}
override fun getAcceptedIssuers(): Array<X509Certificate> = emptyArray()
}
val sslContext = SSLContext.getInstance("SSL")
sslContext.init(null, arrayOf(trustManager), SecureRandom())

View File

@ -229,6 +229,19 @@ interface SubsonicAPIDefinition {
@Header("Range") offset: Long? = null
): Call<ResponseBody>
@Streaming
@GET("download.view")
fun download(
@Query("id") id: String,
@Query("maxBitRate") maxBitRate: Int? = null,
@Query("format") format: String? = null,
@Query("timeOffset") timeOffset: Int? = null,
@Query("size") videoSize: String? = null,
@Query("estimateContentLength") estimateContentLength: Boolean? = null,
@Query("converted") converted: Boolean? = null,
@Header("Range") offset: Long? = null
): Call<ResponseBody>
@GET("jukeboxControl.view")
fun jukeboxControl(
@Query("action") action: JukeboxAction,

View File

@ -18,7 +18,7 @@ class PasswordHexInterceptor(private val password: String) : Interceptor {
override fun intercept(chain: Chain): Response {
val originalRequest = chain.request()
val updatedUrl = originalRequest.url().newBuilder()
val updatedUrl = originalRequest.url.newBuilder()
.addEncodedQueryParameter("p", passwordHex).build()
return chain.proceed(originalRequest.newBuilder().url(updatedUrl).build())
}

View File

@ -21,7 +21,7 @@ class PasswordMD5Interceptor(private val password: String) : Interceptor {
override fun intercept(chain: Chain): Response {
val originalRequest = chain.request()
val salt = getSalt()
val updatedUrl = originalRequest.url().newBuilder()
val updatedUrl = originalRequest.url.newBuilder()
.addQueryParameter("t", getPasswordMD5Hash(salt))
.addQueryParameter("s", salt)
.build()

View File

@ -19,7 +19,7 @@ internal const val TIMEOUT_MILLIS_PER_OFFSET_BYTE = 0.02
internal class RangeHeaderInterceptor : Interceptor {
override fun intercept(chain: Chain): Response {
val originalRequest = chain.request()
val headers = originalRequest.headers()
val headers = originalRequest.headers
return if (headers.names().contains("Range")) {
val offsetValue = headers["Range"] ?: "0"
val offset = "bytes=$offsetValue-"

View File

@ -18,7 +18,7 @@ internal class VersionInterceptor(
val newRequest = originalRequest.newBuilder()
.url(
originalRequest
.url()
.url
.newBuilder()
.addQueryParameter("v", protocolVersion.restApiVersion)
.build()

View File

@ -5,14 +5,20 @@ import java.util.Calendar
data class Album(
val id: String = "",
val name: String = "",
val parent: String = "",
val album: String = "",
val title: String? = null,
val name: String? = null,
val discNumber: Int = 0,
val coverArt: String = "",
val songCount: Int = 0,
val created: Calendar? = null,
val artist: String = "",
val artistId: String = "",
val songCount: Int = 0,
val duration: Int = 0,
val created: Calendar? = null,
val year: Int = 0,
val genre: String = "",
@JsonProperty("song") val songList: List<MusicDirectoryChild> = emptyList()
val playCount: Int = 0,
@JsonProperty("song") val songList: List<MusicDirectoryChild> = emptyList(),
@JsonProperty("starred") val starredDate: String = ""
)

View File

@ -4,6 +4,6 @@ import com.fasterxml.jackson.annotation.JsonProperty
data class SearchTwoResult(
@JsonProperty("artist") val artistList: List<Artist> = emptyList(),
@JsonProperty("album") val albumList: List<MusicDirectoryChild> = emptyList(),
@JsonProperty("album") val albumList: List<Album> = emptyList(),
@JsonProperty("song") val songList: List<MusicDirectoryChild> = emptyList()
)

View File

@ -3,7 +3,7 @@ package org.moire.ultrasonic.api.subsonic.response
import com.fasterxml.jackson.annotation.JsonProperty
import org.moire.ultrasonic.api.subsonic.SubsonicAPIVersions
import org.moire.ultrasonic.api.subsonic.SubsonicError
import org.moire.ultrasonic.api.subsonic.models.MusicDirectoryChild
import org.moire.ultrasonic.api.subsonic.models.Album
class GetAlbumListResponse(
status: Status,
@ -12,10 +12,10 @@ class GetAlbumListResponse(
) : SubsonicResponse(status, version, error) {
@JsonProperty("albumList") private val albumWrapper = AlbumWrapper()
val albumList: List<MusicDirectoryChild>
val albumList: List<Album>
get() = albumWrapper.albumList
}
private class AlbumWrapper(
@JsonProperty("album") val albumList: List<MusicDirectoryChild> = emptyList()
@JsonProperty("album") val albumList: List<Album> = emptyList()
)

View File

@ -1,5 +1,6 @@
package org.moire.ultrasonic.api.subsonic.models
import java.util.Locale
import org.amshove.kluent.`should be equal to`
import org.amshove.kluent.`should throw`
import org.junit.Test
@ -10,7 +11,7 @@ import org.junit.Test
class AlbumListTypeTest {
@Test
fun `Should create type from string ignoring case`() {
val type = AlbumListType.SORTED_BY_NAME.typeName.toLowerCase()
val type = AlbumListType.SORTED_BY_NAME.typeName.lowercase(Locale.ROOT)
val albumListType = AlbumListType.fromName(type)

View File

@ -1,108 +0,0 @@
ext.versions = [
minSdk : 14,
targetSdk : 29,
compileSdk : 29,
// You need to run ./gradlew wrapper after updating the version
gradle : '7.0',
navigation : "2.3.5",
gradlePlugin : "4.2.0",
androidxcore : "1.5.0",
ktlint : "0.37.1",
ktlintGradle : "9.2.1",
detekt : "1.17.1",
jacoco : "0.8.7",
preferences : "1.1.1",
media : "1.3.1",
androidSupport : "28.0.0",
androidLegacySupport : "1.0.0",
androidSupportDesign : "1.3.0",
constraintLayout : "2.0.4",
multidex : "2.0.1",
room : "2.3.0",
kotlin : "1.5.10",
kotlinxCoroutines : "1.5.0-native-mt",
viewModelKtx : "2.2.0",
retrofit : "2.6.4",
jackson : "2.9.5",
okhttp : "3.12.13",
twitterSerial : "0.1.6",
koin : "3.0.2",
picasso : "2.71828",
sortListView : "1.0.1",
junit4 : "4.13.2",
junit5 : "5.7.1",
mockito : "3.11.0",
mockitoKotlin : "3.2.0",
kluent : "1.64",
apacheCodecs : "1.15",
robolectric : "4.5.1",
dexter : "6.2.2",
timber : "4.7.1",
fastScroll : "2.0.1",
]
ext.gradlePlugins = [
gradle : "com.android.tools.build:gradle:$versions.gradlePlugin",
kotlin : "org.jetbrains.kotlin:kotlin-gradle-plugin:$versions.kotlin",
ktlintGradle : "org.jlleitschuh.gradle:ktlint-gradle:$versions.ktlintGradle",
detekt : "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:$versions.detekt",
jacoco : "org.jacoco:org.jacoco.core:$versions.jacoco",
]
ext.androidSupport = [
core : "androidx.core:core-ktx:$versions.androidxcore",
support : "androidx.legacy:legacy-support-v4:$versions.androidLegacySupport",
design : "com.google.android.material:material:$versions.androidSupportDesign",
annotations : "com.android.support:support-annotations:$versions.androidSupport",
multidex : "androidx.multidex:multidex:$versions.multidex",
constraintLayout : "androidx.constraintlayout:constraintlayout:$versions.constraintLayout",
room : "androidx.room:room-compiler:$versions.room",
roomRuntime : "androidx.room:room-runtime:$versions.room",
roomKtx : "androidx.room:room-ktx:$versions.room",
viewModelKtx : "androidx.lifecycle:lifecycle-viewmodel-ktx:$versions.viewModelKtx",
navigationFragment : "androidx.navigation:navigation-fragment:$versions.navigation",
navigationUi : "androidx.navigation:navigation-ui:$versions.navigation",
navigationFragmentKtx : "androidx.navigation:navigation-fragment-ktx:$versions.navigation",
navigationUiKtx : "androidx.navigation:navigation-ui-ktx:$versions.navigation",
navigationFeature : "androidx.navigation:navigation-dynamic-features-fragment:$versions.navigation",
preferences : "androidx.preference:preference:$versions.preferences",
media : "androidx.media:media:$versions.media",
]
ext.other = [
kotlinStdlib : "org.jetbrains.kotlin:kotlin-stdlib:$versions.kotlin",
kotlinReflect : "org.jetbrains.kotlin:kotlin-reflect:$versions.kotlin",
kotlinxCoroutines : "org.jetbrains.kotlinx:kotlinx-coroutines-android:$versions.kotlinxCoroutines",
retrofit : "com.squareup.retrofit2:retrofit:$versions.retrofit",
gsonConverter : "com.squareup.retrofit2:converter-gson:$versions.retrofit",
jacksonConverter : "com.squareup.retrofit2:converter-jackson:$versions.retrofit",
jacksonKotlin : "com.fasterxml.jackson.module:jackson-module-kotlin:$versions.jackson",
okhttpLogging : "com.squareup.okhttp3:logging-interceptor:$versions.okhttp",
twitterSerial : "com.twitter.serial:serial:$versions.twitterSerial",
koinCore : "io.insert-koin:koin-core:$versions.koin",
koinAndroid : "io.insert-koin:koin-android:$versions.koin",
koinViewModel : "io.insert-koin:koin-android-viewmodel:$versions.koin",
picasso : "com.squareup.picasso:picasso:$versions.picasso",
dexter : "com.karumi:dexter:$versions.dexter",
timber : "com.jakewharton.timber:timber:$versions.timber",
fastScroll : "com.simplecityapps:recyclerview-fastscroll:$versions.fastScroll",
sortListView : "com.github.tzugen:drag-sort-listview:$versions.sortListView",
]
ext.testing = [
junit : "junit:junit:$versions.junit4",
junitVintage : "org.junit.vintage:junit-vintage-engine:$versions.junit5",
kotlinJunit : "org.jetbrains.kotlin:kotlin-test-junit:$versions.kotlin",
mockitoKotlin : "org.mockito.kotlin:mockito-kotlin:$versions.mockitoKotlin",
mockito : "org.mockito:mockito-core:$versions.mockito",
mockitoInline : "org.mockito:mockito-inline:$versions.mockito",
kluent : "org.amshove.kluent:kluent:$versions.kluent",
kluentAndroid : "org.amshove.kluent:kluent-android:$versions.kluent",
mockWebServer : "com.squareup.okhttp3:mockwebserver:$versions.okhttp",
apacheCodecs : "commons-codec:commons-codec:$versions.apacheCodecs",
robolectric : "org.robolectric:robolectric:$versions.robolectric"
]

View File

@ -1,86 +1,26 @@
<?xml version="1.0" ?>
<?xml version='1.0' encoding='UTF-8'?>
<SmellBaseline>
<ManuallySuppressedIssues></ManuallySuppressedIssues>
<ManuallySuppressedIssues/>
<CurrentIssues>
<ID>ComplexCondition:DownloadHandler.kt$DownloadHandler.&lt;no name provided&gt;$!append &amp;&amp; !playNext &amp;&amp; !unpin &amp;&amp; !background</ID>
<ID>ComplexCondition:FilePickerAdapter.kt$FilePickerAdapter$currentDirectory.absolutePath == "/" || currentDirectory.absolutePath == "/storage" || currentDirectory.absolutePath == "/storage/emulated" || currentDirectory.absolutePath == "/mnt"</ID>
<ID>ComplexCondition:LocalMediaPlayer.kt$LocalMediaPlayer$Util.getGaplessPlaybackPreference() &amp;&amp; Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.JELLY_BEAN &amp;&amp; ( playerState === PlayerState.STARTED || playerState === PlayerState.PAUSED )</ID>
<ID>ComplexMethod:DownloadFile.kt$DownloadFile.DownloadTask$override fun execute()</ID>
<ID>ComplexMethod:FilePickerAdapter.kt$FilePickerAdapter$private fun fileLister(currentDirectory: File)</ID>
<ID>ComplexMethod:SongView.kt$SongView$fun setSong(song: MusicDirectory.Entry, checkable: Boolean, draggable: Boolean)</ID>
<ID>ComplexMethod:TrackCollectionFragment.kt$TrackCollectionFragment$private fun enableButtons()</ID>
<ID>ComplexMethod:TrackCollectionFragment.kt$TrackCollectionFragment$private fun updateInterfaceWithEntries(musicDirectory: MusicDirectory)</ID>
<ID>EmptyFunctionBlock:SongView.kt$SongView${}</ID>
<ID>FunctionNaming:ThemeChangedEventDistributor.kt$ThemeChangedEventDistributor$fun RaiseThemeChangedEvent()</ID>
<ID>ImplicitDefaultLocale:DownloadFile.kt$DownloadFile$String.format("DownloadFile (%s)", song)</ID>
<ID>ImplicitDefaultLocale:DownloadFile.kt$DownloadFile.DownloadTask$String.format("Download of '%s' was cancelled", song)</ID>
<ID>ImplicitDefaultLocale:DownloadFile.kt$DownloadFile.DownloadTask$String.format("DownloadTask (%s)", song)</ID>
<ID>ImplicitDefaultLocale:EditServerFragment.kt$EditServerFragment.&lt;no name provided&gt;$String.format( "%s %s", resources.getString(R.string.settings_connection_failure), getErrorMessage(error) )</ID>
<ID>ImplicitDefaultLocale:EditServerFragment.kt$EditServerFragment.&lt;no name provided>$String.format( "%s %s", resources.getString(R.string.settings_connection_failure), getErrorMessage(error) )</ID>
<ID>ImplicitDefaultLocale:FileLoggerTree.kt$FileLoggerTree$String.format("Failed to write log to %s", file)</ID>
<ID>ImplicitDefaultLocale:FileLoggerTree.kt$FileLoggerTree$String.format("Log file rotated, logging into file %s", file?.name)</ID>
<ID>ImplicitDefaultLocale:FileLoggerTree.kt$FileLoggerTree$String.format("Logging into file %s", file?.name)</ID>
<ID>ImplicitDefaultLocale:LocalMediaPlayer.kt$LocalMediaPlayer.BufferTask$String.format("BufferTask (%s)", downloadFile)</ID>
<ID>ImplicitDefaultLocale:LocalMediaPlayer.kt$LocalMediaPlayer.CheckCompletionTask$String.format("CheckCompletionTask (%s)", downloadFile)</ID>
<ID>ImplicitDefaultLocale:ShareHandler.kt$ShareHandler$String.format("%d:%s", timeSpanAmount, timeSpanType)</ID>
<ID>ImplicitDefaultLocale:ShareHandler.kt$ShareHandler.&lt;no name provided&gt;$String.format("%s\n\n%s", Util.getShareGreeting(), result.url)</ID>
<ID>ImplicitDefaultLocale:SongView.kt$SongView$String.format("%02d.", trackNumber)</ID>
<ID>ImplicitDefaultLocale:SongView.kt$SongView$String.format("%s ", bitRate)</ID>
<ID>ImplicitDefaultLocale:SongView.kt$SongView$String.format("%s &gt; %s", suffix, transcodedSuffix)</ID>
<ID>LargeClass:TrackCollectionFragment.kt$TrackCollectionFragment : Fragment</ID>
<ID>LongMethod:DownloadFile.kt$DownloadFile.DownloadTask$override fun execute()</ID>
<ID>LongMethod:EditServerFragment.kt$EditServerFragment$override fun onViewCreated(view: View, savedInstanceState: Bundle?)</ID>
<ID>LongMethod:FilePickerAdapter.kt$FilePickerAdapter$private fun fileLister(currentDirectory: File)</ID>
<ID>LongMethod:LocalMediaPlayer.kt$LocalMediaPlayer$@Synchronized private fun doPlay(downloadFile: DownloadFile, position: Int, start: Boolean)</ID>
<ID>LongMethod:MediaPlayerService.kt$MediaPlayerService$private fun updateMediaSession(currentPlaying: DownloadFile?, playerState: PlayerState)</ID>
<ID>LongMethod:NavigationActivity.kt$NavigationActivity$override fun onCreate(savedInstanceState: Bundle?)</ID>
<ID>LongMethod:ShareHandler.kt$ShareHandler$private fun showDialog( fragment: Fragment, shareDetails: ShareDetails, swipe: SwipeRefreshLayout?, cancellationToken: CancellationToken )</ID>
<ID>LongMethod:SongView.kt$SongView$fun setSong(song: MusicDirectory.Entry, checkable: Boolean, draggable: Boolean)</ID>
<ID>LongMethod:TrackCollectionFragment.kt$TrackCollectionFragment$override fun onContextItemSelected(menuItem: MenuItem): Boolean</ID>
<ID>LongMethod:TrackCollectionFragment.kt$TrackCollectionFragment$override fun onViewCreated(view: View, savedInstanceState: Bundle?)</ID>
<ID>LongMethod:TrackCollectionFragment.kt$TrackCollectionFragment$private fun updateDisplay(refresh: Boolean)</ID>
<ID>LongMethod:TrackCollectionFragment.kt$TrackCollectionFragment$private fun updateInterfaceWithEntries(musicDirectory: MusicDirectory)</ID>
<ID>LongParameterList:ServerRowAdapter.kt$ServerRowAdapter$( private var context: Context, private var data: Array&lt;ServerSetting&gt;, private val model: ServerSettingsModel, private val activeServerProvider: ActiveServerProvider, private val manageMode: Boolean, private val serverDeletedCallback: ((Int) -&gt; Unit), private val serverEditRequestedCallback: ((Int) -&gt; Unit) )</ID>
<ID>LongParameterList:ServerRowAdapter.kt$ServerRowAdapter$( private var context: Context, passedData: Array&lt;ServerSetting>, private val model: ServerSettingsModel, private val activeServerProvider: ActiveServerProvider, private val manageMode: Boolean, private val serverDeletedCallback: ((Int) -> Unit), private val serverEditRequestedCallback: ((Int) -> Unit) )</ID>
<ID>MagicNumber:ActiveServerProvider.kt$ActiveServerProvider$8192</ID>
<ID>MagicNumber:DownloadFile.kt$DownloadFile.DownloadTask$10</ID>
<ID>MagicNumber:DownloadFile.kt$DownloadFile.DownloadTask$60</ID>
<ID>MagicNumber:LocalMediaPlayer.kt$LocalMediaPlayer.&lt;no name provided&gt;$60000</ID>
<ID>MagicNumber:LocalMediaPlayer.kt$LocalMediaPlayer.BufferTask$100000</ID>
<ID>MagicNumber:LocalMediaPlayer.kt$LocalMediaPlayer.BufferTask$1024L</ID>
<ID>MagicNumber:LocalMediaPlayer.kt$LocalMediaPlayer.BufferTask$8</ID>
<ID>MagicNumber:LocalMediaPlayer.kt$LocalMediaPlayer.BufferTask$86400L</ID>
<ID>MagicNumber:LocalMediaPlayer.kt$LocalMediaPlayer.BufferTask$8L</ID>
<ID>MagicNumber:LocalMediaPlayer.kt$LocalMediaPlayer.CheckCompletionTask$5000L</ID>
<ID>MagicNumber:LocalMediaPlayer.kt$LocalMediaPlayer.PositionCache$50L</ID>
<ID>MagicNumber:MediaPlayerService.kt$MediaPlayerService$256</ID>
<ID>MagicNumber:MediaPlayerService.kt$MediaPlayerService$3</ID>
<ID>MagicNumber:MediaPlayerService.kt$MediaPlayerService$4</ID>
<ID>MagicNumber:JukeboxMediaPlayer.kt$JukeboxMediaPlayer$0.05f</ID>
<ID>MagicNumber:JukeboxMediaPlayer.kt$JukeboxMediaPlayer$50</ID>
<ID>MagicNumber:RESTMusicService.kt$RESTMusicService$206</ID>
<ID>MagicNumber:SongView.kt$SongView$3</ID>
<ID>MagicNumber:SongView.kt$SongView$4</ID>
<ID>MagicNumber:SongView.kt$SongView$60</ID>
<ID>MagicNumber:TrackCollectionFragment.kt$TrackCollectionFragment$10</ID>
<ID>NestedBlockDepth:DownloadFile.kt$DownloadFile.DownloadTask$override fun execute()</ID>
<ID>NestedBlockDepth:DownloadHandler.kt$DownloadHandler$private fun downloadRecursively( fragment: Fragment, id: String, name: String?, isShare: Boolean, isDirectory: Boolean, save: Boolean, append: Boolean, autoPlay: Boolean, shuffle: Boolean, background: Boolean, playNext: Boolean, unpin: Boolean, isArtist: Boolean )</ID>
<ID>NestedBlockDepth:MediaPlayerService.kt$MediaPlayerService$private fun setupOnSongCompletedHandler()</ID>
<ID>ReturnCount:CommunicationErrorHandler.kt$CommunicationErrorHandler.Companion$fun getErrorMessage(error: Throwable, context: Context): String</ID>
<ID>ReturnCount:ServerRowAdapter.kt$ServerRowAdapter$ private fun popupMenuItemClick(menuItem: MenuItem, position: Int): Boolean</ID>
<ID>ReturnCount:TrackCollectionFragment.kt$TrackCollectionFragment$override fun onContextItemSelected(menuItem: MenuItem): Boolean</ID>
<ID>TooGenericExceptionCaught:DownloadFile.kt$DownloadFile$e: Exception</ID>
<ID>TooGenericExceptionCaught:FileLoggerTree.kt$FileLoggerTree$x: Throwable</ID>
<ID>TooGenericExceptionCaught:LocalMediaPlayer.kt$LocalMediaPlayer$ex: Exception</ID>
<ID>TooGenericExceptionCaught:LocalMediaPlayer.kt$LocalMediaPlayer$exception: Throwable</ID>
<ID>TooGenericExceptionCaught:LocalMediaPlayer.kt$LocalMediaPlayer$x: Exception</ID>
<ID>TooGenericExceptionCaught:LocalMediaPlayer.kt$LocalMediaPlayer.PositionCache$e: Exception</ID>
<ID>TooGenericExceptionCaught:MediaPlayerService.kt$MediaPlayerService$e: Exception</ID>
<ID>TooGenericExceptionCaught:SongView.kt$SongView$e: Exception</ID>
<ID>TooGenericExceptionCaught:SubsonicUncaughtExceptionHandler.kt$SubsonicUncaughtExceptionHandler$x: Throwable</ID>
<ID>TooGenericExceptionCaught:VideoPlayer.kt$VideoPlayer$e: Exception</ID>
<ID>TooGenericExceptionThrown:DownloadFile.kt$DownloadFile.DownloadTask$throw Exception(String.format("Download of '%s' was cancelled", song))</ID>
<ID>TooManyFunctions:LocalMediaPlayer.kt$LocalMediaPlayer</ID>
<ID>TooManyFunctions:MediaPlayerService.kt$MediaPlayerService : Service</ID>
<ID>TooGenericExceptionCaught:JukeboxMediaPlayer.kt$JukeboxMediaPlayer$x: Throwable</ID>
<ID>TooGenericExceptionCaught:JukeboxMediaPlayer.kt$JukeboxMediaPlayer.TaskQueue$x: Throwable</ID>
<ID>TooGenericExceptionThrown:Downloader.kt$Downloader.DownloadTask$throw RuntimeException( String.format( Locale.ROOT, "Download of '%s' was cancelled", downloadFile.track ) )</ID>
<ID>TooManyFunctions:RESTMusicService.kt$RESTMusicService : MusicService</ID>
<ID>TooManyFunctions:TrackCollectionFragment.kt$TrackCollectionFragment : Fragment</ID>
<ID>UtilityClassWithPublicConstructor:CommunicationErrorHandler.kt$CommunicationErrorHandler</ID>
<ID>UtilityClassWithPublicConstructor:FragmentTitle.kt$FragmentTitle</ID>
</CurrentIssues>
</SmellBaseline>

View File

@ -42,8 +42,8 @@ empty-blocks:
complexity:
active: true
TooManyFunctions:
thresholdInFiles: 20
thresholdInClasses: 20
thresholdInFiles: 25
thresholdInClasses: 25
thresholdInInterfaces: 20
thresholdInObjects: 30
LabeledExpression:
@ -64,19 +64,16 @@ style:
WildcardImport:
active: true
MaxLineLength:
active: true
maxLineLength: 120
excludePackageStatements: false
excludeImportStatements: false
active: false
MagicNumber:
# 100 common in percentage, 1000 in milliseconds
ignoreNumbers: ['-1', '0', '1', '2', '100', '1000']
ignoreNumbers: ['-1', '0', '1', '2', '5', '10', '100', '256', '512', '1000', '1024', '4096']
ignoreEnums: true
ignorePropertyDeclaration: true
UnnecessaryAbstractClass:
active: false
ReturnCount:
max: 3
max: 5
comments:
active: true

View File

@ -0,0 +1,3 @@
Others
- #671: Bump versions.mockito from 4.1.0 to 4.3.1.
- Update translations.

View File

@ -0,0 +1,3 @@
Enhancements
- #683: Rewrite the about and remove the webview.
- #685: Server coloring feature.

View File

@ -0,0 +1,2 @@
Bug fixes
- #688: Connection failure.

View File

@ -0,0 +1,14 @@
Bug fixes
- #673: Disabling "Browse Using ID3 Tags" causes artist search result content to mismatch.
- #679: Keyboard should be hidden when navigating away from Search.
- #686: In landscape mode, the scroll bar is missing in the about text.
- #691: TrackCollectionFragment: fix play all button.
- #698: Track based context menus do not function correctly in most fragments.
Features
- #669: Option to change language.
Enhancements
- #654: Update OkHttp.
- #694: Reword alert for better help.
- #702: Show Downloads on Play.

View File

@ -1 +0,0 @@
Refactor and redesign artist list

View File

@ -1 +0,0 @@
Fall backs to path when comparing tracks and fixes #369

View File

@ -1 +0,0 @@
Refactored the application main menu

View File

@ -1 +0,0 @@
Refactored the application main menu

View File

@ -0,0 +1,3 @@
Enhancements
- #445: Implement a room database for better offline support.
- #537: Added Android Auto support.

View File

@ -0,0 +1,2 @@
Bug fixes
- #571: Fixed media session null checks.

View File

@ -0,0 +1,13 @@
Bug fixes
- #594: Added PlaybackComplete intent when a song playback is completed.
- #593: Fixed album lists.
- #602: Fix NPE.
Enhancements
- #558: Video call can be static.
- #559: Add better offline Support.
- #568: Rework Downloader.
- #567: Use semantically correct API endpoint when streaming/downloading.
- #572: Moved drag handle to the left in the Now Playing list.
- #585: Added setting to disable Now Playing List sending for incompatible bluetooth devices.
- #596: Added option whether to create a share on the server when sharing songs.

View File

@ -0,0 +1,14 @@
Bug fixes
- #609: Weird scrobbling behaviour (offset).
Enhancements
- #599: Moved server selector and settings to the Navigation menu.
- #600: Migrate Permission utitlity to Kotlin, increase min SDK to 17.
- #604: Implement a Download view.
- #613: targetSdkVersion must be 30 or higher.
- #622: Refactor events.
- #641: Remove feature storage.
- #642: Remove MergeAdapter and SackOfViewsAdapter.
- #649: Unify error dialog handling.
- #652: Updated custom cache location handling to remove isUri.
- #662: Improve database migrations.

View File

@ -0,0 +1,3 @@
Otros
- #671: Actualizado versions.mockito de 4.1.0 a 4.3.1.
- Traducciones actualizadas.

View File

@ -0,0 +1,3 @@
Mejoras
- #683: Reescribir el acerca de y eliminar el webview.
- #685: Posibilidad de seleccionar el color del servidor.

View File

@ -0,0 +1,2 @@
Corrección de errores
- #688: Fallo de conexión.

View File

@ -0,0 +1,14 @@
Corrección de errores
- #673: La desactivación de la opción "Examinar mediante etiquetas ID3" hace que el contenido de los resultados de la búsqueda de artistas no coincida.
- #679: El teclado debería estar oculto cuando se navega fuera de la Búsqueda.
- #686: En modo apaisado, falta la barra de desplazamiento en el texto de acerca de.
- #691: TrackCollectionFragment: arreglar el botón de reproducir todo.
- #698: Los menús contextuales basados en pistas no funcionan correctamente en la mayoría de los fragmentos.
Características
- #669: Opción de cambio de idioma.
Mejoras
- #654: Actualización de OkHttp.
- #694: Reformular la alerta para mejorar la ayuda.
- #702: Mostrar descargas al reproducir.

View File

@ -1 +0,0 @@
Refactorizada y rediseñada la lista de artistas

View File

@ -1 +0,0 @@
Cuando un fichero no tiene etiquetas de número de pista lo ordena por orden alfabético. Además hemos arreglado el bug #369

View File

@ -1 +0,0 @@
Refactorizado el menú principal de la aplicación

View File

@ -1 +0,0 @@
Refactorizado el menú principal de la aplicación

View File

@ -0,0 +1,3 @@
Mejoras
- #445: Se implementa una base de datos para un mejor soporte sin conexión.
- #537: Añadido soporte para Android Auto.

View File

@ -0,0 +1,2 @@
Correción de errores
- #571: Se comprueban los valores nulos en la sesión de medios.

View File

@ -0,0 +1,13 @@
Correción de errores
- #594: Agregado un intent de PlaybackComplete cuando se completa la reproducción de una canción.
- #593: Corregidas las listas de álbumes.
- #602: NPE corregido.
Mejoras
- #558: La llamada a video puede ser estática.
- #559: Agregado un mejor soporte sin conexión.
- #568: Se ha reescrito el downloader.
- #567: Se utiliza el endpoint semánticamente correcto al realizar streaming o descargar.
- #572: Se ha movido el botón de arrastre de canción hacia la izquierda en la lista de reproducción.
- #585: Agregada una configuración para deshabilitar el envío de la Lista de reproducción en curso para dispositivos Bluetooth incompatibles.
- #596: Se agregó la opción de crear un recurso compartido en el servidor al compartir canciones.

View File

@ -0,0 +1,14 @@
Corrección de errores
- #609: Comportamiento extraño de scrobbling (offset).
Mejoras
- #599: Se ha movido el selector de servidor y la configuración al menú de navegación.
- #600: Migración de la utilidad de permisos a Kotlin, aumento del SDK mínimo a 17.
- #604: Implementar una vista de Descarga.
- #613: targetSdkVersion debe ser 30 o superior.
- #622: Refactorización de eventos.
- #641: Eliminar el almacenamiento de funciones.
- #642: Eliminar MergeAdapter y SackOfViewsAdapter.
- #649: Unificar el manejo del diálogo de error.
- #652: Manejo de ubicación de caché personalizado actualizado para eliminar isUri.
- #662: Mejorar las migraciones de bases de datos.

View File

@ -2,7 +2,8 @@ org.gradle.parallel=true
org.gradle.daemon=true
org.gradle.configureondemand=true
org.gradle.caching=true
org.gradle.jvmargs=-Xmx2g
org.gradle.jvmargs=-Xmx2g -XX:+UseParallelGC
kotlin.incremental=true
kotlin.caching.enabled=true

103
gradle/libs.versions.toml Normal file
View File

@ -0,0 +1,103 @@
[versions]
# You need to run ./gradlew wrapper after updating the version
gradle = "7.3.3"
navigation = "2.3.5"
gradlePlugin = "7.2.1"
androidxcore = "1.6.0"
ktlint = "0.43.2"
ktlintGradle = "10.2.0"
detekt = "1.19.0"
preferences = "1.1.1"
media = "1.3.1"
media3 = "1.0.0-beta01"
androidSupport = "1.4.0"
androidLegacySupport = "1.0.0"
androidSupportDesign = "1.6.1"
constraintLayout = "2.1.1"
multidex = "2.0.1"
room = "2.4.2"
kotlin = "1.6.10"
kotlinxCoroutines = "1.6.0-native-mt"
kotlinxGuava = "1.6.0"
viewModelKtx = "2.4.1"
retrofit = "2.9.0"
jackson = "2.10.1"
okhttp = "4.9.1"
koin = "3.0.2"
picasso = "2.71828"
junit4 = "4.13.2"
junit5 = "5.8.1"
mockito = "4.3.1"
mockitoKotlin = "4.0.0"
kluent = "1.68"
apacheCodecs = "1.15"
robolectric = "4.6.1"
timber = "4.7.1"
fastScroll = "2.0.1"
colorPicker = "2.2.3"
rxJava = "3.1.2"
rxAndroid = "3.0.0"
multiType = "4.3.0"
[libraries]
gradle = { module = "com.android.tools.build:gradle", version.ref = "gradlePlugin" }
kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
ktlintGradle = { module = "org.jlleitschuh.gradle:ktlint-gradle", version.ref = "ktlintGradle" }
detekt = { module = "io.gitlab.arturbosch.detekt:detekt-gradle-plugin", version.ref = "detekt" }
core = { module = "androidx.core:core-ktx", version.ref = "androidxcore" }
support = { module = "androidx.legacy:legacy-support-v4", version.ref = "androidLegacySupport" }
design = { module = "com.google.android.material:material", version.ref = "androidSupportDesign" }
annotations = { module = "androidx.annotation:annotation", version.ref = "androidSupport" }
multidex = { module = "androidx.multidex:multidex", version.ref = "multidex" }
constraintLayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "constraintLayout" }
room = { module = "androidx.room:room-compiler", version.ref = "room" }
roomRuntime = { module = "androidx.room:room-runtime", version.ref = "room" }
roomKtx = { module = "androidx.room:room-ktx", version.ref = "room" }
viewModelKtx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "viewModelKtx" }
navigationFragment = { module = "androidx.navigation:navigation-fragment", version.ref = "navigation" }
navigationUi = { module = "androidx.navigation:navigation-ui", version.ref = "navigation" }
navigationFragmentKtx = { module = "androidx.navigation:navigation-fragment-ktx", version.ref = "navigation" }
navigationUiKtx = { module = "androidx.navigation:navigation-ui-ktx", version.ref = "navigation" }
navigationFeature = { module = "androidx.navigation:navigation-dynamic-features-fragment", version.ref = "navigation" }
preferences = { module = "androidx.preference:preference", version.ref = "preferences" }
media = { module = "androidx.media:media", version.ref = "media" }
media3exoplayer = { module = "androidx.media3:media3-exoplayer", version.ref = "media3" }
media3okhttp = { module = "androidx.media3:media3-datasource-okhttp", version.ref = "media3" }
media3session = { module = "androidx.media3:media3-session", version.ref = "media3" }
kotlinStdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" }
kotlinReflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin" }
kotlinxCoroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlinxCoroutines" }
kotlinxGuava = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-guava", version.ref = "kotlinxGuava"}
retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit" }
gsonConverter = { module = "com.squareup.retrofit2:converter-gson", version.ref = "retrofit" }
jacksonConverter = { module = "com.squareup.retrofit2:converter-jackson", version.ref = "retrofit" }
jacksonKotlin = { module = "com.fasterxml.jackson.module:jackson-module-kotlin", version.ref = "jackson" }
okhttpLogging = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "okhttp" }
koinCore = { module = "io.insert-koin:koin-core", version.ref = "koin" }
koinAndroid = { module = "io.insert-koin:koin-android", version.ref = "koin" }
koinViewModel = { module = "io.insert-koin:koin-android-viewmodel", version.ref = "koin" }
picasso = { module = "com.squareup.picasso:picasso", version.ref = "picasso" }
timber = { module = "com.jakewharton.timber:timber", version.ref = "timber" }
fastScroll = { module = "com.simplecityapps:recyclerview-fastscroll", version.ref = "fastScroll" }
colorPickerView = { module = "com.github.skydoves:colorpickerview", version.ref = "colorPicker" }
rxJava = { module = "io.reactivex.rxjava3:rxjava", version.ref = "rxJava" }
rxAndroid = { module = "io.reactivex.rxjava3:rxandroid", version.ref = "rxAndroid" }
multiType = { module = "com.drakeet.multitype:multitype", version.ref = "multiType" }
junit = { module = "junit:junit", version.ref = "junit4" }
junitVintage = { module = "org.junit.vintage:junit-vintage-engine", version.ref = "junit5" }
kotlinJunit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin" }
mockitoKotlin = { module = "org.mockito.kotlin:mockito-kotlin", version.ref = "mockitoKotlin" }
mockito = { module = "org.mockito:mockito-core", version.ref = "mockito" }
mockitoInline = { module = "org.mockito:mockito-inline", version.ref = "mockito" }
kluent = { module = "org.amshove.kluent:kluent", version.ref = "kluent" }
kluentAndroid = { module = "org.amshove.kluent:kluent-android", version.ref = "kluent" }
mockWebServer = { module = "com.squareup.okhttp3:mockwebserver", version.ref = "okhttp" }
apacheCodecs = { module = "commons-codec:commons-codec", version.ref = "apacheCodecs" }
robolectric = { module = "org.robolectric:robolectric", version.ref = "robolectric" }

5
gradle/versions.gradle Normal file
View File

@ -0,0 +1,5 @@
ext.versions = [
minSdk : 21,
targetSdk : 33,
compileSdk : 31,
]

Binary file not shown.

View File

@ -1,5 +1,6 @@
#Fri Jun 17 23:13:49 CEST 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

View File

@ -1,9 +1,10 @@
/**
* This module provides a base for for submodules which depend on the Android runtime
*/
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'jacoco'
apply from: "${project.rootDir}/gradle_scripts/code_quality.gradle"
android {
compileSdkVersion versions.compileSdk
@ -38,30 +39,21 @@ android {
buildFeatures {
buildConfig = false
viewBinding true
dataBinding true
}
}
tasks.withType(Test) {
useJUnitPlatform()
jacoco {
includeNoLocationClasses = true
excludes += jacocoExclude
}
}
dependencies {
api other.kotlinStdlib
api libs.kotlinStdlib
testImplementation testing.junit
testRuntimeOnly testing.junitVintage
testImplementation libs.junit
testRuntimeOnly libs.junitVintage
}
jacoco {
toolVersion(versions.jacoco)
}
ext {
jacocoExclude = ['jdk.internal.*']
}

View File

@ -6,7 +6,7 @@ if (isCodeQualityEnabled) {
apply plugin: "org.jlleitschuh.gradle.ktlint"
ktlint {
version = versions.ktlint
version = libs.versions.ktlint.get()
outputToConsole = true
android = true
}
@ -21,7 +21,7 @@ if (isCodeQualityEnabled) {
detekt {
buildUponDefaultConfig = true
toolVersion = versions.detekt
toolVersion = libs.versions.detekt.get()
// Builds the AST in parallel. Rules are always executed in parallel.
// Can lead to speedups in larger projects.
parallel = true

View File

@ -1,92 +0,0 @@
apply plugin: 'jacoco'
jacoco {
toolVersion(versions.jacoco)
}
def mergedJacocoExec = file("${project.buildDir}/jacoco/jacocoMerged.exec")
def merge = tasks.register('jacocoMergeReports', JacocoMerge) {
group = "Reporting"
description = "Merge all jacoco reports from projects into one."
ListProperty<File> jacocoFiles = project.objects.listProperty(File.class)
project.subprojects { subproject ->
subproject.plugins.withId("jacoco") {
project.logger.info("${subproject.name} has Jacoco plugin applied")
subproject.tasks.withType(Test) { task ->
File destFile = task.extensions.getByType(JacocoTaskExtension.class).destinationFile
if (destFile.exists() && !task.name.contains("Release")) {
jacocoFiles.add(destFile)
}
}
}
}
executionData(jacocoFiles)
destinationFile(mergedJacocoExec)
}
tasks.register('jacocoFullReport', JacocoReport) {
dependsOn merge
group = "Reporting"
description = "Generate full Jacoco coverage report including all modules."
getClassDirectories().setFrom(files())
getSourceDirectories().setFrom(files())
getExecutionData().setFrom(files())
reports {
xml.enabled = true
html.enabled = true
csv.enabled = false
}
// Always run merging, as all input calculation is done in doFirst {}
outputs.upToDateWhen { false }
// Task will run anyway even if initial inputs are empty
onlyIf = { true }
project.subprojects { subproject ->
subproject.plugins.withId("jacoco") {
project.logger.info("${subproject.name} has Jacoco plugin applied")
subproject.plugins.withId("kotlin-android") {
project.logger.info("${subproject.name} is android project")
def mainSources = subproject.extensions.findByName("android").sourceSets['main']
project.logger.info("Android sources: ${mainSources.java.srcDirs}")
mainSources.java.srcDirs.forEach {
additionalSourceDirs(it)
}
project.logger.info("Subproject exclude: ${subproject.jacocoExclude}")
additionalClassDirs(fileTree(
dir: "${subproject.buildDir}/tmp/kotlin-classes/debug",
excludes: subproject.jacocoExclude
))
}
subproject.plugins.withId("kotlin") { plugin ->
project.logger.info("${subproject.name} is common kotlin project")
SourceDirectorySet mainSources = subproject.extensions.getByName("kotlin")
.sourceSets[SourceSet.MAIN_SOURCE_SET_NAME]
.kotlin
mainSources.srcDirs.forEach {
project.logger.debug("Adding sources: $it")
additionalSourceDirs(it)
}
project.logger.info("Subproject exclude: ${subproject.jacocoExclude}")
additionalClassDirs(fileTree(
dir: "${subproject.buildDir}/classes/kotlin/main",
excludes: subproject.jacocoExclude
))
}
subproject.tasks.withType(Test) { task ->
File destFile = task.extensions.getByType(JacocoTaskExtension.class).destinationFile
if (destFile.exists() && !task.name.contains("Release")) {
project.logger.info("Adding execution data: $destFile")
executionData(destFile)
}
}
}
}
}

View File

@ -1,6 +1,8 @@
apply plugin: 'java-library'
/**
* This module provides a base for for pure kotlin modules
*/
apply plugin: 'kotlin'
apply plugin: 'jacoco'
apply plugin: 'kotlin-kapt'
apply from: "${project.rootDir}/gradle_scripts/code_quality.gradle"
sourceSets {
@ -12,42 +14,14 @@ sourceSets {
dependencies {
api other.kotlinStdlib
api libs.kotlinStdlib
testImplementation testing.junit
testRuntimeOnly testing.junitVintage
}
jacoco {
toolVersion(versions.jacoco)
}
ext {
// override it in the module
jacocoExclude = ['jdk.internal.*']
}
jacocoTestReport {
reports {
html.enabled true
csv.enabled false
xml.enabled true
}
afterEvaluate {
getClassDirectories().setFrom(files(classDirectories.files.collect {
fileTree(dir: it, excludes: jacocoExclude)
}))
}
testImplementation libs.junit
testRuntimeOnly libs.junitVintage
}
tasks.named("test").configure {
useJUnitPlatform()
jacoco {
excludes += jacocoExclude
includeNoLocationClasses = true
}
finalizedBy jacocoTestReport
}
tasks.register("ciTest") {

269
gradlew vendored
View File

@ -1,7 +1,7 @@
#!/usr/bin/env sh
#!/bin/sh
#
# Copyright 2015 the original author or authors.
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -17,67 +17,101 @@
#
##############################################################################
##
## Gradle start up script for UN*X
##
#
# Gradle start up script for POSIX generated by Gradle.
#
# Important for running:
#
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
# noncompliant, but you have some other compliant shell such as ksh or
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh Gradle
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
# (2) This script targets any POSIX shell, so it avoids extensions provided
# by Bash, Ksh, etc; in particular arrays are avoided.
#
# The "traditional" practice of packing multiple parameters into a
# space-separated string is a well documented source of bugs and security
# problems, so this is (mostly) avoided, by progressively accumulating
# options in "$@", and eventually passing that to Java.
#
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
# see the in-line comments for details.
#
# There are tweaks for specific operating systems such as AIX, CygWin,
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
#
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
app_path=$0
# Need this for daisy-chained symlinks.
while
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
[ -h "$app_path" ]
do
ls=$( ls -ld "$app_path" )
link=${ls#*' -> '}
case $link in #(
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
APP_BASE_NAME=${0##*/}
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
MAX_FD=maximum
warn () {
echo "$*"
}
} >&2
die () {
echo
echo "$*"
echo
exit 1
}
} >&2
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
case "$( uname )" in #(
CYGWIN* ) cygwin=true ;; #(
Darwin* ) darwin=true ;; #(
MSYS* | MINGW* ) msys=true ;; #(
NONSTOP* ) nonstop=true ;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
@ -87,9 +121,9 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
JAVACMD=$JAVA_HOME/jre/sh/java
else
JAVACMD="$JAVA_HOME/bin/java"
JAVACMD=$JAVA_HOME/bin/java
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
@ -98,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
@ -106,80 +140,95 @@ location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=`expr $i + 1`
done
case $i in
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=`save "$@"`
# Collect all arguments for the java command, stacking in reverse order:
# * args from the command line
# * the main class name
# * -classpath
# * -D...appname settings
# * --module-path (only if needed)
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
# Now convert the arguments - kludge to limit ourselves to /bin/sh
for arg do
if
case $arg in #(
-*) false ;; # don't mess with options #(
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
[ -e "$t" ] ;; #(
*) false ;;
esac
then
arg=$( cygpath --path --ignore --mixed "$arg" )
fi
# Roll the args list around exactly as many times as the number of
# args, so each arg winds up back in the position where it started, but
# possibly modified.
#
# NB: a `for` loop captures its iteration list before it begins, so
# changing the positional parameters here affects neither the number of
# iterations, nor the values presented in `arg`.
shift # remove old arg
set -- "$@" "$arg" # push replacement arg
done
fi
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
"$@"
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
# set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#
eval "set -- $(
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
xargs -n1 |
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
tr '\n' ' '
)" '"$@"'
exec "$JAVACMD" "$@"

Some files were not shown because too many files have changed in this diff Show More