Compare commits

...

1776 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
Óscar García Amor bc8a78e772
Bump version to 2.22.0 2021-06-29 11:51:24 +02:00
Óscar García Amor 68acf3789c
Update translations 2021-06-29 11:28:26 +02:00
Óscar García Amor 2a6c9baa3d
Merge branch 'tzugen-leaks' into develop 2021-06-29 11:27:31 +02:00
tzugen e3e8d36f5c
Save the correct field to the server preferences 2021-06-25 17:47:11 +02:00
tzugen 2da4f79098
Increase memory cache size 2021-06-23 17:31:41 +02:00
James Wells 4ff167e497
merge develop 2021-06-22 20:08:49 -04:00
tzugen d916e937f9
Move a resource from a versioned folder
(v14 is the default now)
2021-06-22 20:42:05 +02:00
tzugen d4c0f62b1d
Don't keep a reference to context here,
it's a leak and not used anyway.
2021-06-21 19:11:30 +02:00
tzugen 6fca6d918c
Merge pull request #529 from tzugen/fix-save-playlist
Fix save playlist
2021-06-21 18:58:27 +02:00
tzugen 1132ec6c87
Merge branch 'develop' into fix-save-playlist 2021-06-21 18:49:25 +02:00
tzugen d6594b8ec4
Merge pull request #530 from tzugen/diff
Use DiffUtil for better performance when refreshing the data..
2021-06-21 18:49:17 +02:00
tzugen bc16b64be4
Avoid unnecessary reloads when navigating back,
this preserves the scroll position.
2021-06-21 13:41:39 +02:00
tzugen 16c6b6b03e
Fix a potential exception in shuffle()
If getCurrentPlayingIndex() returns -1,
then remove() fails
2021-06-20 23:38:13 +02:00
tzugen 36dccc845b
Use ListAdapter class to calculate Diff off the main thread 2021-06-20 08:31:12 +02:00
tzugen 1ecb577c50
Use DiffUtil for better performance when refreshing the data.. 2021-06-20 00:29:35 +02:00
tzugen 8c2896ea16
Remove static field leaks on SeekBar,
cleanup code and update baseline
2021-06-19 23:52:24 +02:00
tzugen d8b032e2e3
Cleanup code 2021-06-19 23:52:24 +02:00
tzugen 30bbeb7594
Rename .java to .kt 2021-06-19 23:52:24 +02:00
tzugen 28336c8bf7
Convert PlayerFragment to Kotlin 2021-06-19 23:52:24 +02:00
tzugen 5cfb49ac69
Rename .java to .kt 2021-06-19 23:52:24 +02:00
tzugen ffe67e6c50
Merge pull request #526 from Maxmystere/fix-notification-star
Fix no server call when starring song from notification
2021-06-19 23:48:29 +02:00
tzugen 38f1f5f5c6
Nicer catch all 2021-06-19 23:25:02 +02:00
tzugen 956d555b35
Update PlayerFragment.java 2021-06-19 23:23:39 +02: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
Maxence G d440b8c76d
Fix no server call when starring song from notification 2021-06-16 20:33:21 +02:00
Nite 2d4c773344
Merge pull request #525 from tzugen/fix-video-url
Properly generate the Video stream url, without actually making a request
2021-06-16 10:05:50 +02:00
tzugen 57d740af12
Properly generate the Video stream url, without actually making a request! 2021-06-14 20:53:55 +02:00
tzugen 6a370696cd
Merge pull request #520 from tzugen/remove-flash
Remove flash
2021-06-14 19:20:50 +02:00
tzugen bc295a825b
Merge branch 'develop' into remove-flash 2021-06-14 19:10:56 +02:00
tzugen 914f84a4c8
Merge pull request #519 from tzugen/demo
Better experience for new users
2021-06-14 19:10:40 +02:00
Nite a02b620531
Fixed typos 2021-06-14 15:42:24 +02:00
tzugen 3b5b8feb56
Update baseline files 2021-06-12 20:00:44 +02:00
tzugen 58200660d3
Also delete unused strings related to licensing stuff 2021-06-12 19:56:22 +02:00
tzugen f7dfdcadad
Remove unused strings 2021-06-12 19:48:36 +02:00
tzugen a43a525bab
Remove two unrelated, but unused files. 2021-06-12 15:31:24 +02:00
tzugen db31fefe83
Remove flash support 2021-06-12 15:31:21 +02:00
tzugen 172cbd0476
Add an option to load the demo database for new users 2021-06-12 15:04:17 +02:00
tzugen a2324eabf2
Use ID3 tags by default for new users.
This is what most people are used to from iTunes or Spotify..
2021-06-12 15:01:03 +02:00
tzugen 6ea4ac5829
Merge pull request #517 from tzugen/cleanupStreamHandling
Cleaner separation of API result handling.
2021-06-11 10:42:03 +02:00
tzugen 5e4c6cc627
I made currentApiVersion nullable here two commits ago while testing,
but it doesn't need to be.
Also update some comments
2021-06-11 10:24:21 +02:00
James Wells 8855d19113
Merge branch 'develop' into AndroidAuto 2021-06-10 19:19:29 -04:00
tzugen 24ae0d9e81
Catch all exceptions in GenericListModel
This is how it used to be, before i changed it because
detekt was complaining.
2021-06-09 20:53:01 +02:00
tzugen 619f441790
Fix tests 2021-06-09 20:23:22 +02:00
tzugen 6ab0ff973a
Fix version checking for freshly added servers 2021-06-09 19:33:17 +02:00
tzugen 620239f859
Improve the extension function by making it call-chainable 2021-06-09 17:36:11 +02:00
tzugen a60a843edf
Fix tests 2021-06-09 17:00:25 +02:00
tzugen d9a7fa2413
Cleaner separation of API result handling.
* CallResponseChecker functionality are now Kotlin Extensions
* Removed unfitting shortcuts from SubsonicAPIClient
* Increase timeout to get a video url
* Fix a bug, that the Rest API version was checked twice on each call
2021-06-09 14:15:39 +02:00
tzugen dd1f55a927
Merge pull request #515 from ultrasonic/dependabot/gradle/versions.mockito-3.11.0
Bump versions.mockito from 3.8.0 to 3.11.0
2021-06-08 22:13:24 +02:00
tzugen 175f7cd6f6
Fix imports (ownership and thus package names have changed for Mockito-Kotlin) 2021-06-08 22:00:04 +02:00
tzugen 27f3d7c00c
Also update Mockito-Kotlin 2021-06-08 21:23:36 +02:00
dependabot[bot] 0c839a4cab
Bump versions.mockito from 3.8.0 to 3.11.0
Bumps `versions.mockito` from 3.8.0 to 3.11.0.

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

Updates `mockito-inline` from 3.8.0 to 3.11.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v3.8.0...v3.11.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-06-08 19:16:35 +00:00
tzugen 580a170f4b
Merge pull request #514 from tzugen/coverart
Fix bugs in new image loader and make it default.
2021-06-08 21:15:46 +02:00
tzugen 4eeff191aa
Add two ToDos 2021-06-08 17:20:45 +02:00
tzugen be356d9c0a
Cleanup unused functions from RESTMusicService,
put the caching functionality into the ImageLoader
2021-06-08 17:12:55 +02:00
tzugen 3c554caf2e
On disk we are only caching the full-size images.
So when modify the key to query for the full size image,
because scaling down a larger size image on the device is quicker than
requesting the down-sized image from the network.
2021-06-08 14:49:49 +02:00
Nite 78cb4d09cf
Separated cache entries for large images 2021-06-07 21:38:39 +02:00
Nite fa6566e903
Fixed showing the unknown image when a source isn't specified 2021-06-07 20:32:44 +02:00
Nite 7182694c5d
Fixed currentDownloading to be nullable
(It can be null when nothing is downloading)
2021-06-07 20:06:40 +02:00
tzugen 6dff5c5a23
Add mandatory stableKey to tests 2021-06-07 14:37:01 +02:00
tzugen 566e429e4c
Use file cache in Picasso 2021-06-07 14:22:33 +02:00
tzugen 9161f9dc99
Move ImageLoader module into main module. 2021-06-07 13:26:08 +02:00
tzugen f8efb6d592
Update a test to reflect new arguments 2021-06-07 13:26:07 +02:00
tzugen 92fe7359ff
Finish removing unneeded preferences and fix import problem 2021-06-07 13:26:07 +02:00
tzugen 41eb217d8f
Finish removing unneeded preferences 2021-06-07 13:26:07 +02:00
tzugen 0989ee20a6
Remove LegacyImageLoader, use Picasso as default 2021-06-07 13:26:07 +02:00
tzugen 2eaa9a2091
Fix two bugs in the new image loader:
1. Id was checked for nullability, but it is actually an empty string in most cases where there is no Cover art.
This lead to queries without id set.
2. Size was not respected by the new image loader.
2021-06-07 13:26:07 +02:00
tzugen 90ecbe4b78
Make getCoverArt require a non-null entry 2021-06-07 13:26:07 +02: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
Óscar García Amor 1dc480b141
Bump version to 2.21.0 2021-06-03 10:33:05 +02:00
Óscar García Amor e0f9059de8
Update translations 2021-06-03 08:58:13 +02:00
Nite 0a886d7095
Merge pull request #505 from Maxmystere/check-server-features
Implement server feature checking
2021-06-01 15:37:56 +02:00
Maxence G 17b9b776fb
Add french translation 2021-05-31 17:02:27 +02:00
Nite 132ee3b563
Removed unused string 2021-05-31 14:26:48 +02:00
Nite fe5ee8b12a
Fixed ktlint 2021-05-31 14:04:46 +02:00
Nite 41023282e8
Fixed detekt
Fixed code duplication
Added more info to the Connection Test dialog for the user
2021-05-31 13:38:53 +02:00
Maxence G 67870efd67
Fix length 2021-05-29 15:46:09 +02:00
Maxence G 3e08735374
run ktlint 2021-05-29 15:42:15 +02:00
Maxence G 075b80c01f
Fix new active server getter 2021-05-29 15:30:01 +02:00
Maxence G d8e7b991cd
Merge remote-tracking branch 'base/develop' into check-server-features 2021-05-29 15:28:25 +02:00
Maxence G fd48367cab
Reduce function length 2021-05-29 15:00:46 +02:00
tzugen 7d15f67d2d
Merge pull request #504 from ultrasonic/dependabot/gradle/io.gitlab.arturbosch.detekt-detekt-gradle-plugin-1.17.1
Bump detekt-gradle-plugin from 1.17.0 to 1.17.1
2021-05-29 10:51:47 +02:00
dependabot[bot] 2050e21c9c
Bump detekt-gradle-plugin from 1.17.0 to 1.17.1
Bumps [detekt-gradle-plugin](https://github.com/detekt/detekt) from 1.17.0 to 1.17.1.
- [Release notes](https://github.com/detekt/detekt/releases)
- [Commits](https://github.com/detekt/detekt/compare/v1.17.0...v1.17.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-29 08:35:39 +00:00
tzugen ddc0d71538
Merge pull request #507 from ultrasonic/dependabot/gradle/versions.kotlin-1.5.10
Bump versions.kotlin from 1.4.32 to 1.5.10
2021-05-29 10:34:58 +02:00
James Wells e666498f13
Initial Test of Android Auto 2021-05-28 20:40:00 -04:00
tzugen 8aa1cf1e2c
Fix Kotlin 1.5 deprecated calls 2021-05-28 20:32:31 +02:00
tzugen 71068fe635
Upgrade Koin to 3.0.2 2021-05-28 19:39:27 +02:00
tzugen f9401ba1fa
Apply JVM Target to all Kotlin tasks 2021-05-28 19:21:50 +02:00
tzugen d8500e45e4
Kotlin and Room need to be updated at the same time. 2021-05-28 19:21:50 +02:00
dependabot[bot] e1d3e61c74
Bump kotlinx-coroutines-android from 1.4.3-native-mt to 1.5.0-native-mt
Bumps [kotlinx-coroutines-android](https://github.com/Kotlin/kotlinx.coroutines) from 1.4.3-native-mt to 1.5.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)
2021-05-28 19:21:50 +02:00
dependabot[bot] b5801f488f
Bump versions.kotlin from 1.4.32 to 1.5.10
Bumps `versions.kotlin` from 1.4.32 to 1.5.10.

Updates `kotlin-gradle-plugin` from 1.4.32 to 1.5.10
- [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.4.32...v1.5.10)

Updates `kotlin-stdlib` from 1.4.32 to 1.5.10
- [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.4.32...v1.5.10)

Updates `kotlin-reflect` from 1.4.32 to 1.5.10
- [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.4.32...v1.5.10)

Updates `kotlin-test-junit` from 1.4.32 to 1.5.10
- [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.4.32...v1.5.10)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-28 19:21:49 +02:00
Nite bf013c02d6
Merge pull request #506 from tzugen/KotlinServices
Kotlin services
2021-05-28 17:31:36 +02:00
tzugen ee9c478bfe
Make parentId nullable in TrackCollectionModel 2021-05-28 12:35:29 +02:00
tzugen e21ae1299b
Fix more detekt and lint issues and remove them from the baseline. 2021-05-27 15:30:20 +02:00
tzugen 6dc0eb7ecc
Move files to Koltin dir 2021-05-27 11:33:10 +02:00
tzugen cc7e273d50
Fix remaining warnings 2021-05-27 11:18:29 +02:00
tzugen ac77d9557c
Clarify time handling for the time limited cache
(Less magic numbers)
2021-05-27 11:15:28 +02:00
tzugen 154662bec5
Make Artist and Entry comparable (thus sortable) 2021-05-27 11:14:23 +02:00
tzugen aa1c0d8baa
Convert TimeLimitedCache to Kotlin 2021-05-27 11:13:23 +02:00
tzugen 38c1480f77
Whitespace and detekt 2021-05-26 23:32:25 +02:00
tzugen 8567fc0105
Fix warning in FileLoggerTree.kt 2021-05-26 23:22:13 +02:00
tzugen e059d737bc
Adopt changes from stricter nullabilities 2021-05-26 23:21:56 +02:00
tzugen b30584f99c
Make Entry always have an id 2021-05-26 23:20:19 +02:00
tzugen 3257fb9153
Make Entry always have an id 2021-05-26 23:19:16 +02:00
tzugen 5ac36b749b
Convert all Services to Kotlin 2021-05-26 23:17:52 +02:00
tzugen 3f2daaa7ec
Rename .java to .kt 2021-05-26 23:17:52 +02:00
tzugen e55d894f45
Consistently throw Exeception in OfflineMusicService 2021-05-26 21:32:52 +02:00
tzugen f510638571
Fix KtLint issue 2021-05-26 08:49:23 +02:00
tzugen 31850bf270
Cleanup AlertDialog method
The other method was unused, so we can get rid of it.
Also use a lambda for the callback
2021-05-26 08:49:12 +02:00
Maxence G 3c4a5064b0
change exception type 2021-05-25 19:30:02 +02:00
Maxence G 070e0ac792
Fix lintFormat + remove synchronized 2021-05-25 18:51:00 +02:00
Maxence G 1b7f48c53a
Implement server feature checking 2021-05-24 23:25:12 +02:00
tzugen cebbb39caf
Merge pull request #502 from ultrasonic/dependabot/gradle/androidx.core-core-ktx-1.5.0
Bump core-ktx from 1.5.0-rc02 to 1.5.0
2021-05-24 10:37:25 +02:00
dependabot[bot] faee926c35
Bump core-ktx from 1.5.0-rc02 to 1.5.0
Bumps core-ktx from 1.5.0-rc02 to 1.5.0.

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-24 08:14:46 +00:00
Nite 04b4b154e4
Merge pull request #501 from tzugen/impl
Migrate MediaPlayerController to Kotlin
2021-05-24 09:23:53 +02:00
tzugen 2db7d2daf1
Hide cluttering koin warning, which was added in 2.2.0 and will be removed again in 2.3.0
See https://github.com/InsertKoinIO/koin/issues/939 for more details
2021-05-22 11:01:12 +02:00
tzugen 79fd1ac84f
Remove resolved issues from baselines 2021-05-21 23:34:57 +02:00
tzugen 0500bd5e88
Handle also UnknownHostException in GenericListModel 2021-05-21 23:34:57 +02:00
tzugen 005c1cb8f7
Fix an String resource int that wasn't converted to a String 2021-05-21 23:34:57 +02:00
tzugen 3d99269c41
Remove context from ShufflePlayBuffer 2021-05-21 23:34:57 +02:00
tzugen ed6c6c9057
Remove two warnings in Downloader 2021-05-21 23:34:57 +02:00
tzugen b8fbbd8c49
Remove Context from Downloader & DownloadFile 2021-05-21 23:34:52 +02:00
tzugen 9b2e54b94e
Remove context from JukeboxMediaPlayer and Scrobbler 2021-05-21 22:52:16 +02:00
tzugen 00e64cdddc
Use lambdas in OfflineMusicService 2021-05-21 22:39:21 +02:00
tzugen 1b5db9da1f
Make ExternalStorageMonitor context-free 2021-05-21 22:37:43 +02:00
tzugen df047dd463
Refactor MediaPlayerController to Kotlin
and also make MediaPlayerService context-free
2021-05-21 22:35:22 +02:00
tzugen a801e276ee
Rename .java to .kt 2021-05-21 22:35:21 +02:00
tzugen 05cb82921d
Fix remaining warnings in MediaPlayerLifecycleSupport 2021-05-21 19:43:37 +02:00
tzugen f596dc77c1
Make MediaPlayerLifecycleSupport context-free 2021-05-21 19:43:32 +02:00
tzugen 7922d6caad
Prevent leaks by making cleanup tasks static 2021-05-21 19:11:26 +02:00
tzugen b25a118148
Remove unused context from CacheCleaner 2021-05-21 18:50:57 +02:00
tzugen 402fe961ba
Merge MediaPlayerController interface & implementation 2021-05-21 18:50:33 +02:00
Nite 6943dc5895
Merge pull request #500 from tzugen/detekt-3
Fix a lot of warnings, update baseline files, improve CI run times
2021-05-21 09:33:23 +02:00
tzugen f1713fdbd3
Use a recently maintained version of DSLV, which compiles correctly with newer Gradles. 2021-05-21 09:16:06 +02:00
tzugen b0b03c0fe0
Be more selective with the configuration of gradle.properties in CI 2021-05-20 18:16:55 +02:00
tzugen ab4c2c1bbe
Add staggered caching, to increase the times we have a warm cache 2021-05-20 18:16:55 +02:00
tzugen 29a98c1263
The AGP build cache was removed in AGP 4.1. Previously introduced in AGP 2.3 to complement the Gradle build cache, the AGP build cache was superseded entirely by the Gradle build cache in AGP 4.1. This change does not impact build time. 2021-05-20 18:16:55 +02:00
tzugen 78e4a00476
Our target sdk is 29 2021-05-20 18:16:55 +02:00
tzugen 387119a90c
Make the CI fail if any new lint issues (warnings or errors) are added. 2021-05-20 18:16:55 +02:00
tzugen d26f8595ab
Manually disable IconMissingDensityFolder 2021-05-20 18:16:55 +02:00
tzugen dff054847a
Regenerate lint baseline
Removes 238 fixed issues
Adds 177 previously unlisted issues
2021-05-20 18:16:55 +02:00
tzugen 10edce9f56
Disable daemon 2021-05-20 18:16:55 +02:00
tzugen 3a05f30907
Fix more warnings 2021-05-20 18:16:55 +02:00
tzugen b559f6420e
Move certain ignores from the baseline to the specified files. This makes refactoring much less fragile. 2021-05-20 18:16:55 +02:00
tzugen 689b704bc5
Enable parallel AST generation 2021-05-20 18:16:55 +02:00
tzugen a25a2ff337
Go back to default detekt checks.
Type resolution (which I had enabled some weeks ago) is really not stable enough for production and also takes much longer time to compile.
2021-05-20 18:16:55 +02:00
tzugen 8b01118233
Remove local copy of com.mobeta.android.dslv in favour of importing it from maven 2021-05-20 18:16:42 +02:00
Nite 950cb6254f
Merge pull request #493 from tzugen/generic-views
Introduce new Generic Fragments, ViewModels, and Adapters for the display of API data.
2021-05-18 11:44:51 +02:00
tzugen 5f08e7e7cd
Create a new SelectMusicFolderViewHolder instance when the Adapter is recreated,
instead of reusing an old one. This lead to a crash.

Also make the AlbumList use the correct placeholder,
remove an unused resource file, and update the placeholder to look less clumsy.
2021-05-18 08:50:04 +02:00
tzugen 2cf80707f7
Correctly display the folder header also in album view
Also fix a number of smaller issues
2021-05-16 21:06:04 +02:00
tzugen 72c03cc500
Introduce new Generic Fragments, ViewModels, and Adapters for the display of API data.
* Splits former SelectAlbumFragment into separate fragments for Albums and general collections of tracks
* Renames and refactors SelectArtist view to extend the new Generic classes
* Adds error handling (Fixes #484)
* Adds EndlessScrolling capabilities to all Album Lists
* Uses RecyclerViews and LiveData for performance and in-memory caching
* Refreshes the UI to be aligned with the ArtistList UI
* Add a new GenericEntry to the domain data classes, and make other types extend it
2021-05-16 17:42:31 +02:00
tzugen c6a744cc14
Rename classes in preparation of split. 2021-05-16 17:42:31 +02:00
tzugen 1fc7a954e9
Regenerate baseline files 2021-05-16 17:42:31 +02:00
tzugen 13b00f75f0
Use default values for LongMethod, LongParameterList, LargeClass and ComplexMethod.
The algrorithms in detekt had changed when I updated detekt to v1.16, but our values not,
resulting in a very long baseline file with many non-sensical warnings.
By removing our config we follow the detekt config when they modify their algorithms again.
2021-05-16 17:42:31 +02:00
Nite 1599c96085
Merge pull request #476 from tzugen/j-center
Try to remove jcenter()
2021-05-16 17:08:48 +02:00
tzugen fb1d305545
Update detekt to 1.17.0 2021-05-15 14:50:04 +02:00
tzugen 8fbefe7066
Koin has renamed their id 2021-05-15 14:50:04 +02:00
tzugen b136235ccf
Try to remove jcenter() 2021-05-15 14:50:04 +02:00
tzugen 74ce93f37b
Merge pull request #490 from ultrasonic/dependabot/gradle/junit-junit-4.13.2
Bump junit from 4.12 to 4.13.2
2021-05-12 15:15:46 +02:00
dependabot[bot] 8fd66b2a1c
Bump junit from 4.12 to 4.13.2
Bumps [junit](https://github.com/junit-team/junit4) from 4.12 to 4.13.2.
- [Release notes](https://github.com/junit-team/junit4/releases)
- [Changelog](https://github.com/junit-team/junit4/blob/main/doc/ReleaseNotes4.12.md)
- [Commits](https://github.com/junit-team/junit4/compare/r4.12...r4.13.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-12 11:36:22 +00:00
tzugen 642c90974c
Merge pull request #487 from ultrasonic/dependabot/gradle/com.android.support.test-runner-1.0.2
Bump runner from 1.0.1 to 1.0.2
2021-05-12 13:35:35 +02:00
dependabot[bot] a5ad39caba
Removing unused testing dependencies 2021-05-12 12:58:48 +02:00
tzugen 403fead776
Merge pull request #492 from ultrasonic/dependabot/gradle/androidx.core-core-ktx-1.5.0-rc02
Bump core-ktx from 1.5.0-rc01 to 1.5.0-rc02
2021-05-12 11:35:16 +02:00
dependabot[bot] 7a012d3bce
Bump core-ktx from 1.5.0-rc01 to 1.5.0-rc02
Bumps core-ktx from 1.5.0-rc01 to 1.5.0-rc02.

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-12 09:13:31 +00:00
Óscar García Amor 426249f370
Merge pull request #491 from tzugen/weekly
Run dependabot only weekly!
2021-05-12 11:13:06 +02:00
Nite 1df6181cc3
Merge branch 'develop' into weekly 2021-05-12 10:38:32 +02:00
tzugen f897a1b459
Merge pull request #486 from ultrasonic/dependabot/gradle/commons-codec-commons-codec-1.15
Bump commons-codec from 1.10 to 1.15
2021-05-12 10:19:33 +02:00
tzugen b78dadc170
Run dependabot only weekly! 2021-05-12 10:07:43 +02:00
dependabot[bot] 330dade288
Bump commons-codec from 1.10 to 1.15
Bumps [commons-codec](https://github.com/apache/commons-codec) from 1.10 to 1.15.
- [Release notes](https://github.com/apache/commons-codec/releases)
- [Changelog](https://github.com/apache/commons-codec/blob/master/RELEASE-NOTES.txt)
- [Commits](https://github.com/apache/commons-codec/compare/1.10...rel/commons-codec-1.15)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-12 06:26:57 +00:00
Nite 14941486a5
Merge pull request #485 from tzugen/context-free-2
Removing remaining context from MusicService signatures.
2021-05-11 15:32:18 +02:00
tzugen a60be2157b
Removing remaining context from MusicService signatures. 2021-05-11 14:26:29 +02:00
Nite aed5d9b629
Merge pull request #480 from ultrasonic/dependabot/gradle/com.google.android.material-material-1.3.0
Bump material from 1.2.1 to 1.3.0
2021-05-11 14:09:32 +02:00
Nite c7904fad84
Merge branch 'develop' into dependabot/gradle/com.google.android.material-material-1.3.0 2021-05-11 13:41:34 +02:00
tzugen de44d28257
Merge pull request #482 from ultrasonic/dependabot/gradle/androidx.media-media-1.3.1
Bump media from 1.3.0 to 1.3.1
2021-05-11 13:13:06 +02:00
dependabot[bot] 4617a210fa
Bump media from 1.3.0 to 1.3.1
Bumps media from 1.3.0 to 1.3.1.

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-11 11:00:16 +00:00
dependabot[bot] cb5cdbe878
Bump material from 1.2.1 to 1.3.0
Bumps [material](https://github.com/material-components/material-components-android) from 1.2.1 to 1.3.0.
- [Release notes](https://github.com/material-components/material-components-android/releases)
- [Commits](https://github.com/material-components/material-components-android/compare/1.2.1...1.3.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-11 10:50:12 +00:00
Nite 09b5654f5a
Merge pull request #479 from ultrasonic/dependabot/gradle/androidx.constraintlayout-constraintlayout-2.0.4
Bump constraintlayout from 2.0.1 to 2.0.4
2021-05-11 12:48:42 +02:00
dependabot[bot] d399780d23
Bump constraintlayout from 2.0.1 to 2.0.4
Bumps constraintlayout from 2.0.1 to 2.0.4.

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-11 10:38:46 +00:00
Nite e9cc2880f2
Merge pull request #477 from tzugen/context-free
Make all preference operations context-free
2021-05-11 12:34:51 +02:00
tzugen c66118172c
Revert accidental changes in the method signature. 2021-05-11 12:04:29 +02:00
tzugen 5b6fa20050
This was literally the result of removing one(!) dependency on context inside FileUtil
17 Classes with x function  which don't need to pass around context anymore..
2021-05-11 12:04:29 +02:00
tzugen f2b1ba0e94
Remove unused context references in MusicServiceFactory 2021-05-11 12:04:29 +02:00
tzugen 1fa9e604b5
Remove a large number of baselined detekt issues :) 2021-05-11 12:04:29 +02:00
tzugen 76ba4c8ac9
Remove more context dependencies 2021-05-11 12:04:29 +02:00
tzugen 2c5f8d9dd0
Now we can stop passing around the context for a lot of API calls 2021-05-11 12:04:29 +02:00
tzugen 9ec92c6cf3
Make all preference operations context-free
(use the application context for them)
2021-05-11 12:04:26 +02:00
Nite 21282b4c17
Merge pull request #478 from tzugen/nav-crash
Nav crash
2021-05-10 16:30:02 +02:00
tzugen 6c122b9e80
Fix #415 2021-05-09 18:31:54 +02:00
tzugen e0eb2aaf61
Fix a number of warnings 2021-05-09 18:30:38 +02:00
tzugen e8fe006b1a
Merge pull request #473 from ultrasonic/dependabot/gradle/versions.navigation-2.3.5
Bump versions.navigation from 2.3.2 to 2.3.5
2021-05-09 09:28:59 +02:00
dependabot[bot] d46c556e6f
Bump versions.navigation from 2.3.2 to 2.3.5
Bumps `versions.navigation` from 2.3.2 to 2.3.5.

Updates `navigation-fragment` from 2.3.2 to 2.3.5

Updates `navigation-ui` from 2.3.2 to 2.3.5

Updates `navigation-fragment-ktx` from 2.3.2 to 2.3.5

Updates `navigation-ui-ktx` from 2.3.2 to 2.3.5

Updates `navigation-dynamic-features-fragment` from 2.3.2 to 2.3.5

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-08 16:11:09 +00:00
tzugen e06400550b
Merge pull request #475 from ultrasonic/dependabot/gradle/org.jetbrains.kotlinx-kotlinx-coroutines-android-1.4.3-native-mt
Bump kotlinx-coroutines-android from 1.3.9 to 1.4.3-native-mt
2021-05-08 18:09:57 +02:00
dependabot[bot] 19614e79c1
Bump kotlinx-coroutines-android from 1.3.9 to 1.4.3-native-mt
Bumps [kotlinx-coroutines-android](https://github.com/Kotlin/kotlinx.coroutines) from 1.3.9 to 1.4.3-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)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-07 15:06:28 +00:00
Nite 8d2f4b5bf1
Merge pull request #467 from tzugen/lockscreen-controls
Lockscreen controls
2021-05-07 16:53:14 +02:00
Nite ec21e14e33
Merge branch 'develop' into lockscreen-controls 2021-05-07 16:15:20 +02:00
Nite 48ebe8939b
Merge pull request #471 from ultrasonic/dependabot/gradle/org.junit.vintage-junit-vintage-engine-5.7.1
Bump junit-vintage-engine from 5.3.1 to 5.7.1
2021-05-07 16:10:23 +02:00
Nite 0b2a62f391
Fixed some more warnings 2021-05-07 15:55:03 +02:00
Nite e37791e37c
Fixed deprecation warnings for kluent 2021-05-07 15:36:11 +02:00
dependabot[bot] 1deefb6a22
Bump junit-vintage-engine from 5.3.1 to 5.7.1
Bumps [junit-vintage-engine](https://github.com/junit-team/junit5) from 5.3.1 to 5.7.1.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.3.1...r5.7.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-07 09:16:04 +00:00
Nite f0e285cc67
Merge pull request #466 from tzugen/remove-version
Remove unused versions.kt & semver
2021-05-07 11:12:50 +02:00
Nite 23c430e923
Merge branch 'develop' into remove-version 2021-05-07 10:35:56 +02:00
Nite e1b2ec29cf
Merge pull request #459 from ultrasonic/dependabot/gradle/com.android.tools.build-gradle-4.2.0
Bump gradle from 6.5 to 7.0 and gradle plugin from 4.1.3 to 4.2.0
2021-05-07 10:35:17 +02:00
Nite dcd5cc8feb
Merge branch 'develop' into dependabot/gradle/com.android.tools.build-gradle-4.2.0 2021-05-07 09:37:29 +02:00
Nite 7dcc5bbf13
Merge pull request #455 from tzugen/patch-further
Followup #437
2021-05-07 09:36:30 +02:00
Nite afccbf3f65
Merge branch 'develop' into patch-further 2021-05-07 09:14:27 +02:00
Óscar García Amor 44c4b2eaf3
Merge pull request #469 from nitehu/develop
Add Ampache as supported server
2021-05-07 08:54:54 +02:00
Óscar García Amor 3dc82ed2ee
Merge branch 'develop' into develop 2021-05-07 08:39:00 +02:00
Óscar García Amor ed2de31fc7
Merge pull request #468 from tzugen/remove-codecov
Remove codecov
2021-05-07 08:33:38 +02:00
Nite 70dbfff1e1
Add Ampache as supported server 2021-05-07 07:56:36 +02:00
tzugen e4c13a305c
Remove codecov 2021-05-06 22:54:17 +02:00
tzugen 5187ac1f54
Merge pull request #462 from ultrasonic/dependabot/gradle/versions.retrofit-2.9.0
Bump versions.retrofit from 2.4.0 to 2.6.4
2021-05-06 20:46:42 +02:00
tzugen a6c914cf7f
Make the server setting model a local val 2021-05-06 20:45:45 +02:00
tzugen 9ca15deef2
Fix a copy & paste mistake
(Wrongly inserted if clause)
2021-05-06 20:45:45 +02:00
tzugen 094c0d2757
Cache requireArguments() in a local val 2021-05-06 20:45:45 +02:00
tzugen 8a2d100e96
Migrate ciTest to "Task Configuration Avoidance" 2021-05-06 20:33:38 +02:00
tzugen af304cd10f
Fix Jacoco under Gradle 7.0,
by migrating the task to use "Task Configuration Avoidance"
see https://docs.gradle.org/current/userguide/task_configuration_avoidance.html
2021-05-06 20:33:38 +02:00
tzugen 75bcbd97b1
Update Gradle to 7.0 2021-05-06 20:33:38 +02:00
dependabot[bot] e6b77847b6
Bump gradle from 4.1.3 to 4.2.0
Bumps gradle from 4.1.3 to 4.2.0.

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-06 20:33:38 +02:00
tzugen ddd8a54592
Merge branch 'develop' into dependabot/gradle/versions.retrofit-2.9.0 2021-05-06 20:25:27 +02:00
tzugen c8ecf4c123
Merge pull request #465 from ultrasonic/dependabot/gradle/versions.kluent-1.65
Bump versions.kluent from 1.35 to 1.64
2021-05-06 20:25:01 +02:00
tzugen bc2c591ff2
Set isActive correctly when pausing. 2021-05-06 13:23:38 +02:00
tzugen a910818b70
Add skip functions to lockscreen 2021-05-06 13:23:35 +02:00
tzugen 85e2e473e5
Fix a typo, make two functions private 2021-05-06 12:53:25 +02:00
tzugen 8ebd53a8eb
Remove no longer needed safe call. 2021-05-06 12:40:49 +02:00
dependabot[bot] 040dba6a77
Bump versions.kluent from 1.35 to 1.64 2021-05-06 12:36:27 +02:00
tzugen 7b7f470667
Merge branch 'develop' into dependabot/gradle/versions.retrofit-2.9.0 2021-05-06 12:25:40 +02:00
dependabot[bot] 2659634bda
Bump versions.retrofit from 2.4.0 to 2.6.4 2021-05-06 12:24:21 +02:00
tzugen bedbad658f
Merge branch 'develop' into remove-version 2021-05-06 12:12:50 +02:00
tzugen 4d27c35cf4
Remove unused versions.kt & semver 2021-05-06 12:09:23 +02:00
Nite 162bb18078
Merge pull request #451 from tzugen/remove-mediastore
Remove MediaStoreService, reinstate Util.scanMedia
2021-05-06 11:52:19 +02:00
Nite 3a2c41b879
Merge branch 'develop' into remove-mediastore 2021-05-06 09:49:46 +02:00
Nite 036a7a3a8e
Merge pull request #460 from ultrasonic/dependabot/gradle/org.robolectric-robolectric-4.5.1
Bump robolectric from 4.4 to 4.5.1
2021-05-06 09:49:24 +02:00
Nite 457a908d72
Merge branch 'develop' into dependabot/gradle/org.robolectric-robolectric-4.5.1 2021-05-06 09:23:40 +02:00
Nite 8701facd03
Merge pull request #458 from ultrasonic/dependabot/gradle/org.jacoco-org.jacoco.core-0.8.7
Bump org.jacoco.core from 0.8.5 to 0.8.7
2021-05-06 09:20:54 +02:00
Nite 115b8c3183
Merge branch 'develop' into dependabot/gradle/org.jacoco-org.jacoco.core-0.8.7 2021-05-06 09:02:07 +02:00
Nite b06384a15d
Merge pull request #457 from ultrasonic/dependabot/gradle/versions.mockito-3.8.0
Bump versions.mockito from 3.5.5 to 3.8.0
2021-05-06 09:01:34 +02:00
Nite ce7e95f59e
Merge branch 'develop' into dependabot/gradle/versions.mockito-3.8.0 2021-05-06 08:39:28 +02:00
Nite 341412a9e8
Merge pull request #456 from ultrasonic/dependabot/gradle/com.karumi-dexter-6.2.2
Bump dexter from 6.1.2 to 6.2.2
2021-05-06 08:38:56 +02:00
Nite e9b22b827a
Fixed updating CacheLocation setting after change 2021-05-06 08:23:08 +02:00
dependabot[bot] 17533bded1
Bump robolectric from 4.4 to 4.5.1
Bumps [robolectric](https://github.com/robolectric/robolectric) from 4.4 to 4.5.1.
- [Release notes](https://github.com/robolectric/robolectric/releases)
- [Commits](https://github.com/robolectric/robolectric/compare/robolectric-4.4...robolectric-4.5.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-05 08:57:27 +00:00
dependabot[bot] 2432ca7d1e
Bump org.jacoco.core from 0.8.5 to 0.8.7
Bumps [org.jacoco.core](https://github.com/jacoco/jacoco) from 0.8.5 to 0.8.7.
- [Release notes](https://github.com/jacoco/jacoco/releases)
- [Commits](https://github.com/jacoco/jacoco/compare/v0.8.5...v0.8.7)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-05 08:57:18 +00:00
dependabot[bot] 0ec94d456f
Bump versions.mockito from 3.5.5 to 3.8.0
Bumps `versions.mockito` from 3.5.5 to 3.8.0.

Updates `mockito-core` from 3.5.5 to 3.8.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v3.5.5...v3.8.0)

Updates `mockito-inline` from 3.5.5 to 3.8.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v3.5.5...v3.8.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-05 08:57:11 +00:00
dependabot[bot] e4af2b603f
Bump dexter from 6.1.2 to 6.2.2
Bumps [dexter](https://github.com/karumi/Dexter) from 6.1.2 to 6.2.2.
- [Release notes](https://github.com/karumi/Dexter/releases)
- [Commits](https://github.com/karumi/Dexter/compare/6.1.2...6.2.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-05 08:56:56 +00:00
Nite 88db9be878
Merge pull request #452 from ultrasonic/Dependabot-1
Create dependabot.yml
2021-05-05 10:44:59 +02:00
Nite 5c95d9c45a
Merge branch 'develop' into Dependabot-1 2021-05-05 09:42:21 +02:00
Nite 83b186b9b5
Merge branch 'develop' into remove-mediastore 2021-05-05 09:41:09 +02:00
Nite e75137372b
Merge pull request #447 from tzugen/rogue-session
Get rid of rogue session
2021-05-05 09:40:09 +02:00
tzugen a3b97fef47
Delegate all handling of the Intent receiver registering to our Service Class. 2021-05-04 16:32:17 +02:00
tzugen 80036034e4
Rename method for clarity 2021-05-04 16:16:05 +02:00
tzugen 06c076470a
Merge branch 'develop' into Dependabot-1 2021-05-04 09:59:51 +02:00
tzugen dc6cfd141b
Create dependabot.yml 2021-05-04 09:57:08 +02:00
Nite fb74d6465e
Merge branch 'develop' into rogue-session 2021-05-02 12:04:23 +02:00
Nite fe332eed91
Merge pull request #437 from tzugen/select-further
Refactor SelectAlbumView using ViewModel pattern
2021-05-02 11:50:25 +02:00
tzugen 66a306152d
Remove MediaStoreService, reinstate Util.scanMedia
This partially reverts commit 8fbc2a9fa3.
2021-05-01 13:31:48 +02:00
tzugen f6a8ee7241
Remove @Deprecated tag (keep it in JDoc because it doesn't generate a warning) 2021-05-01 10:50:54 +02:00
tzugen adc350b5c4
Fix wrong injection method after rebase 2021-05-01 10:50:54 +02:00
tzugen 98ba9ecd3e
Migrate from deprecated registerMediaButtonReceiver to MediaSession equivalent 2021-05-01 10:49:23 +02:00
tzugen 4af0d1db25
executeOnStartedMediaPlayerService takes a lambda now 2021-05-01 10:49:23 +02:00
tzugen d385cf271e
Add comments and deprecation notices 2021-04-27 20:45:25 +02:00
tzugen ce2f5a95d9
Remove unused parameter 2021-04-27 20:41:14 +02:00
tzugen 237f7ab181
Update baseline files. I have moved several methods, which now get triggered again.
To keep this PR manageable, I don't intent to split up the classes now.
2021-04-27 20:41:14 +02:00
tzugen fe69141e19
Don't leak context in model 2021-04-27 20:41:14 +02:00
tzugen 25f072a5d5
Cleanup some methods
+ Ktlint WS fixes
2021-04-27 20:40:57 +02:00
tzugen dca26f14eb
Fix more compiler warnings 2021-04-27 20:39:52 +02:00
tzugen 1802e91fa7
Use lambdas in Listeners, fix various warnings 2021-04-27 20:39:52 +02:00
tzugen fa4f4d6c9c
Move loading functions into ViewModel 2021-04-27 20:39:48 +02:00
tzugen 1f57fb334b
Refactor: LoadTask to Coroutines. 2021-04-27 19:52:13 +02:00
Óscar García Amor 1dd43d857d
Remove environment variables in generate_signed_apk CI step 2021-04-27 19:35:38 +02:00
Óscar García Amor 1c58062496
Ignore quantity errors in translations 2021-04-27 19:13:27 +02:00
Óscar García Amor f9dcc62ed7
Bump version to 2.20.0 2021-04-27 18:43:35 +02:00
tzugen 13f9dd9b33
Merge pull request #443 from ultrasonic/scrobbler
Better scrobble text and description, closes #442
2021-04-27 17:51:29 +02:00
Óscar García Amor 2d4b295f7f
Better scrobble text and description, closes #442 2021-04-27 17:33:15 +02:00
Nite 119cc4589e
Merge pull request #439 from tzugen/heapspace
Fix a typo in the circleci config.yml
2021-04-27 14:38:01 +02:00
tzugen 822b3551d9
Fix a typo in the circleci config.yml 2021-04-27 11:55:15 +02:00
Nite 817cc14ed9
Merge pull request #421 from tzugen/modern-notification-2
Modernize Service Notification
2021-04-27 10:58:50 +02:00
tzugen 4f70c61592
Fix Magic Number problem in DownloadFile (caused by #431). 2021-04-27 10:21:57 +02:00
tzugen 3e8cf63603
Merge branch 'develop' into modern-notification-2 2021-04-27 08:18:49 +02:00
Nite ae22a0c141
Merge pull request #431 from SaintDubious/retryCount
Add a retry count to stop infinite downloads
2021-04-27 07:14:02 +02:00
James Wells d084270c4b
Add a retry count to stop infinite downloads
Signed-off-by: James Wells <james@jameswells.net>
2021-04-25 23:08:12 -04:00
tzugen 0a170918c8
Adjust Timber debug level 2021-04-25 16:49:14 +02:00
tzugen cd27734c04
Emulate keycode for the Session callbacks 2021-04-23 15:04:01 +02:00
tzugen 8004bc31fe
Add PlaybackState actions
.. and map PlayerStates more precisely.
2021-04-23 11:26:15 +02:00
tzugen 410e1df980
Upgrade detekt to v1.16.0 to get Type Resolution support
In course I had to modify the rules (many were renamed or dropped),
and create a new baseline (many new rules added errors in old files)
2021-04-23 11:26:15 +02:00
tzugen 0ad6d0b691
Move MediaPlayerService to Kotlin dir 2021-04-23 11:26:15 +02:00
tzugen 3aae91bf13
Refactor after conversion 2021-04-23 11:26:15 +02:00
tzugen 35e89b47c6
Convert MediaPlayerService to Kotlin 2021-04-23 11:26:15 +02:00
tzugen 9472aa4c22
Rename .java to .kt 2021-04-23 11:26:14 +02:00
tzugen df54d3450b
Detekt: Remove "warningThreshold and failThreshold properties are deprecated. Please use the new 'maxIssues' config property." 2021-04-23 11:26:14 +02:00
tzugen e6135dc21a
Set Session to active 2021-04-23 11:26:14 +02:00
tzugen 205f477b43
Refactor all event listeners to lambdas 2021-04-23 11:26:10 +02:00
tzugen 2adb9ffc7e
Remove two warnings 2021-04-23 11:21:28 +02:00
tzugen f27212f263
Set AudioAttributes in LocalMediaPlayer 2021-04-23 11:21:24 +02:00
tzugen e63f24242b
Change detekt config: Allow TODO comments, but continue to block FIXME comments
Our code still has so many TODOs that sometimes they can't be fixed immediately
because the require a much larger refactor, and are also so specific that they
don't warrant an own bug.
2021-04-23 11:20:13 +02:00
tzugen 5f8e3ce851
Modernize AudioFocusHandler 2021-04-23 11:20:09 +02:00
tzugen 8640d39438
We need androidx.media at v1.3.0.
Also do the minor gradle update
2021-04-23 11:13:44 +02:00
tzugen 37632dd031
Convert AudioFocusHandler to Kotlin 2021-04-23 11:13:44 +02:00
tzugen 0550116b35
Rename .java to .kt 2021-04-23 11:13:44 +02:00
tzugen 8bfc5d04ef
Pass keyevents from the session to MediaPlayerLifecycleSupport 2021-04-23 11:13:44 +02:00
tzugen 88f6bdb3a9
setShowBadge = false 2021-04-23 11:13:44 +02:00
tzugen e4bf431cfe
Add deleteIntent 2021-04-23 11:13:43 +02:00
tzugen d3b94f3d4c
Add Star/Unstar and close Action
Also: Add album to subtitle :)
2021-04-23 11:13:43 +02:00
tzugen 1ee36322db
Remove unused views and util function 2021-04-23 11:13:43 +02:00
tzugen 116307df56
Fix a regression were we accidentally reset our current MediaPlayer
Fixes #418
2021-04-23 11:13:43 +02:00
tzugen 731447fda5
Improve icon sizes 2021-04-23 11:13:43 +02:00
tzugen 19580cda8b
We can now remove the deprecated Remote Control API 2021-04-23 11:13:43 +02:00
tzugen 26ba022003
Modernize Service Notification
Use the native Android way of generating playback notifications,
by using a "Media Style" and creating a Media Session.
2021-04-23 11:13:43 +02:00
tzugen 417496aacc
Remove unecessary null-check 2021-04-23 11:13:43 +02:00
Nite 2e4dde099d
Merge pull request #429 from tzugen/428
Fix #428
2021-04-22 08:33:12 +02:00
tzugen 6c681ddb52
Fix #428 2021-04-21 18:42:59 +02:00
Nite d41bd8bc07
Merge pull request #425 from tzugen/gradle-ok-revert
Revert okHTTP to 3.10.0
2021-04-19 19:08:35 +02:00
tzugen c59a38777f
Set okHTTP to version 3.12.x, it is the last branch with full API compatibility, which still receives important fixes 2021-04-19 18:35:50 +02:00
Nite 3aee0d5693
Merge pull request #424 from tzugen/gradle
Remove gradle warning
2021-04-19 15:54:31 +02:00
tzugen d0ad8cef7d
Remove deprecated kotlin-android-extension plugin 2021-04-19 12:21:42 +02:00
tzugen 9cb2ed3356
Update gradle plugin and androidxcore
We need core at 1.5.0-rc01 to be able to clearActions()
2021-04-19 12:21:42 +02:00
tzugen f1ce568b5e
Update kotlin, room, okhttp 2021-04-19 12:21:42 +02:00
tzugen b5806cbbbf
Set language level 1.8 correctly also to Kotlin compiler,
removed unused variables.
2021-04-19 12:21:36 +02:00
tzugen 42967ef45f
Remove warning about deprecated 'variant.getGenerateBuildConfig()' 2021-04-18 22:18:41 +02:00
Nite 4f7da06e26
Merge pull request #413 from tzugen/download
Migrate DownloadFile to Kotlin, add percentage display
2021-04-18 16:33:00 +02:00
tzugen 467df602ec
Show download percentage also in the title 2021-04-17 12:32:29 +02:00
tzugen 4787924fcc
Remove noisy log calls 2021-04-17 12:32:29 +02:00
tzugen 8d4d1ba660
Move function out of companion object 2021-04-17 12:32:29 +02:00
tzugen 0efb3547c3
Update license of two files. 2021-04-17 12:32:29 +02:00
tzugen d9d82b77d4
Rename a function semantically 2021-04-17 12:32:25 +02:00
tzugen a97cb30d1c
Move DownloadFile.kt to Kotlin directory 2021-04-17 12:11:21 +02:00
tzugen aac74d1eef
Make SongView display a percentag while downloading
Closes #403
2021-04-17 12:11:20 +02:00
tzugen cf68038e20
Migrate DownloadFile to Kotlin 2021-04-17 12:11:17 +02:00
tzugen 3139c94d11
Rename .java to .kt 2021-04-17 12:02:45 +02:00
tzugen a13306c680
Remove unused parameters from getDownloadInputStream() 2021-04-17 12:02:45 +02:00
tzugen 6b750dac4d
Rename download layouts semantically. 2021-04-17 12:02:45 +02:00
tzugen 0bf0d2db87
Fix a number of lint issues 2021-04-17 12:02:45 +02:00
Nite c16d6b5181
Merge pull request #414 from tzugen/mediastore
Mediastore to Kotlin, fix #383
2021-04-17 11:43:36 +02:00
tzugen b438559da6
Update license of MediaStoreService.kt 2021-04-16 11:47:16 +02:00
Nite fbcbc65be8
Merge branch 'develop' into mediastore 2021-04-15 09:48:07 +02:00
Nite ef774cf0bf
Merge pull request #419 from SaintDubious/emptyText
Clean empty text view
2021-04-15 07:53:17 +02:00
James Wells e5158c8a2f
correct for swipe refresh
Signed-off-by: James Wells <james@jameswells.net>
2021-04-14 22:25:31 -04:00
James Wells 39c94fe1e9
Clean empty text view
Signed-off-by: James Wells <james@jameswells.net>
2021-04-13 22:35:06 -04:00
Nite 9e16b69fc3
Merge pull request #410 from SaintDubious/SelectMusicFolderView
Introduce the SelectMusicFolderView
2021-04-13 09:52:10 +02:00
James Wells 38b6066258
small change to view group
Signed-off-by: James Wells <james@jameswells.net>
2021-04-13 00:12:38 -04:00
James Wells 3a1e2c96fc
Don't show header when using ID3 tags
Signed-off-by: James Wells <james@jameswells.net>
2021-04-11 16:02:07 -04:00
tzugen 8fbc2a9fa3
Remove scanMedia(), as ACTION_MEDIA_SCANNER_SCAN_FILE is deprecated,
in favour of the MediaStore API which we are already using.
2021-04-11 08:49:17 +02:00
tzugen 0349746228
Move Kotlin file 2021-04-11 01:20:16 +02:00
tzugen 86db983f81
Migrate MediaStore to Kotlin, fix issues wih wrong path 2021-04-11 01:19:27 +02:00
tzugen 46a56a1797
Rename .java to .kt 2021-04-11 01:14:17 +02:00
James Wells 268a41d1f4
Don't use musicFolderId in Recently Added filter
Signed-off-by: James Wells <james@jameswells.net>
2021-04-10 17:48:52 -04:00
James Wells f00a487b51
loads music folder list
Signed-off-by: James Wells <james@jameswells.net>
2021-04-09 22:41:38 -04:00
James Wells 580fc1aa89
review comments
Signed-off-by: James Wells <james@jameswells.net>
2021-04-06 22:55:21 -04:00
James Wells 2672ea7edf
Merge branch 'develop' into SelectMusicFolderView
Signed-off-by: James Wells <james@jameswells.net>
2021-04-06 18:36:12 -04:00
Nite 2650b51a6c
Merge pull request #405 from tzugen/NPE
Refactor LocalMediaPlayer to Kotlin, fix #390
2021-04-06 07:49:16 +02:00
James Wells 3e54e4cf05
restrict header to album list only
Signed-off-by: James Wells <james@jameswells.net>
2021-04-04 15:30:31 -04:00
James Wells 191f9512bb
Introduce the SelectMusicFolderView
Signed-off-by: James Wells <james@jameswells.net>
2021-04-01 23:00:01 -04:00
tzugen f738bca1ad
Merge remote-tracking branch 'origin/develop' into NPE 2021-03-30 14:39:09 +02:00
tzugen 05067aaf3c
Rename onCreate/onDestroy functions; create a new MediaPlayer instance on release() 2021-03-30 14:38:59 +02:00
Nite 97d68eb08f
Merge pull request #408 from nitehu/fix/video_player
Fixed VideoPlayer using wrong context
2021-03-27 20:28:04 +01:00
Nite fa5df96ee3
Fixed VideoPlayer using wrong context 2021-03-27 20:14:56 +01:00
tzugen 974afda777
Merge remote-tracking branch 'mine/NPE' into NPE 2021-03-25 20:34:48 +01:00
tzugen 970d93bd91
Pass down the autoPlay value to BufferTask() 2021-03-25 20:33:51 +01:00
tzugen b64a4d1320
Merge branch 'develop' into NPE 2021-03-25 18:44:30 +01:00
tzugen bf106b0384
Handle a case when reset() is called after release(). 2021-03-25 18:37:41 +01:00
tzugen 51dafd542a
Static analysis fixes 2021-03-25 18:37:41 +01:00
tzugen 8e7cf487fd
Checkstyle fixes 2021-03-25 18:37:41 +01:00
tzugen 8d65b1d25f
Private BufferTask() accepts only non-null now 2021-03-25 18:37:41 +01:00
tzugen 2171c971a3
Make remoteControl code more functional
Fixes #390
2021-03-25 18:37:41 +01:00
tzugen 60a0fe17dd
Fix a bad cast 2021-03-25 18:37:41 +01:00
tzugen 493a587b37
Introduce postRunnable helper function 2021-03-25 18:37:41 +01:00
tzugen 93eced9516
Move bufferAndPlay to another position in the file; annotate some possible bugs. 2021-03-25 18:37:41 +01:00
tzugen 09fb6aa487
Make doPlay method a private method, and play the only public entry point. 2021-03-25 18:37:41 +01:00
tzugen d017ca9fb2
Initialize some vals onCreate, thus making them explicitely non-null
Also modify setNextPlaying to accept only non-null files.
2021-03-25 18:37:41 +01:00
tzugen a467abf10b
Fix errors and warnings 2021-03-25 18:37:40 +01:00
tzugen 2260cc311f
Automatic conversion of LocalMediaPlayer to Kotlin 2021-03-25 18:37:40 +01:00
Nite 031c969730
Merge pull request #400 from nitehu/fix/repeat_all_next
Fixed Next button behavior when Repeat All is enabled
2021-03-19 19:52:27 +01:00
Nite d1af2d568e
Merge branch 'develop' into fix/repeat_all_next 2021-03-19 19:41:01 +01:00
Nite ef29f26893
Fixed Next behavior in additional places 2021-03-19 19:25:34 +01:00
Nite 6a53644355
Fixed Next button behavior when Repeat All is enabled 2021-03-19 17:47:32 +01:00
Óscar García Amor 4747aa3ce4
[skip ci] Updated fastlane changelogs 2021-03-19 12:27:28 +01:00
Óscar García Amor f361f584b9
Bump version to 2.19.2 2021-03-19 12:09:35 +01:00
Óscar García Amor 4cda3730f1
Merge branch 'SaintDubious-convertSelectAlbumFragment3' into develop 2021-03-19 12:06:00 +01:00
James Wells f0be828bbf
Convert SelectAlbumFragment to kotlin
Signed-off-by: James Wells <james@jameswells.net>
2021-03-18 23:23:00 -04:00
Nite 63572d84ea
Merge pull request #395 from nitehu/fix/podcasts
Fixed layout to correctly display podcasts
2021-03-17 17:41:23 +01:00
Nite a9ea033802
Fixed layout to correctly display podcasts
Added working swipe refresh
2021-03-17 17:26:16 +01:00
Óscar García Amor 88cd866e03
[skip ci] Updated fastlane changelogs 2021-03-07 18:02:31 +01:00
Óscar García Amor 0828f7bffe
Bump version to 2.19.1 2021-03-07 17:52:16 +01:00
Óscar García Amor 0bf0c1cd21
Don't remove NowPlayingFragment 2021-03-07 17:49:30 +01:00
Óscar García Amor 670a8c7886
[skip ci] Updated fastlane changelogs 2021-03-07 16:00:20 +01:00
Óscar García Amor 101d02560f
[skip ci] Remove BIG FAT WARNING 2021-03-07 15:46:35 +01:00
Óscar García Amor 5a3b52b7fe
Bump version to 2.19.0 2021-03-07 15:37:00 +01:00
Óscar García Amor 51ecfeb43f
Updated translations 2021-03-07 15:28:10 +01:00
Nite b235acf521
Merge pull request #382 from nitehu/refactor/menudrawer_to_navigationui
Refactor menudrawer to navigationui
2021-03-07 15:21:03 +01:00
Nite 2eb357a50f
Fixed ktLint 2021-03-01 17:26:58 +01:00
Nite 46859e2413
Minor cleanup, added comments 2021-03-01 17:24:25 +01:00
Nite 9910792c11
Fixed back press in Server Editor
Fixed displaying "no results" for Search
Cleaned up code
2021-02-25 18:40:41 +01:00
Nite 8a047c5b78
Fixed coroutine scope for server creation/update 2021-02-17 18:36:36 +01:00
Nite 6fcdfea1db
Fixed ChatFragment layout 2021-02-16 19:25:10 +01:00
Nite 09c8c56f59
Fixed searched text not visible for voice search 2021-02-16 19:11:06 +01:00
Nite 81ce23bafd
Updated PreferenceManager to androidx version 2021-02-15 16:30:36 +01:00
Nite 785adedd4f
Merge branch 'develop' into refactor/menudrawer_to_navigationui 2021-02-14 16:23:47 +01:00
Nite 86bfcefe93
Minor fixes
Cleaned up TODOs
Cleaned up code
2021-02-14 15:55:16 +01:00
Nite d70d2cc2fb
Fixed TODOs:
- Updated Koin
- Fixed Player start from widgets and notification
- Added cancellation to LoadingTask
- Minor fixes and cleanup
2021-02-11 21:51:27 +01:00
Nite 3dc6df9116
Fixed colors and theme changing
Other minor fixes
2021-02-10 19:57:09 +01:00
Nite c4ea2086d2
Removed unused code, minor fixes 2021-02-09 19:49:26 +01:00
Nite 1b9b127424
Refactored remaining Activities 2021-02-08 21:46:31 +01:00
Nite cf90abb77e
Added NowPlayingFragment 2021-02-08 20:24:20 +01:00
Nite f0917820cb
Migrated parts from SubsonicTabActivity, fixed theme changes 2021-02-06 11:50:57 +01:00
Nite a395bd6feb
Refactored DownloadActivity 2021-02-05 21:45:50 +01:00
Nite 95773c7994
Started refactoring to NavigationUI
Main menu items are refactored, except Now Playing
2021-02-04 20:15:58 +01:00
Óscar García Amor c3899af521
Update pt_BR translation
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2021-01-19 15:32:57 +01:00
Óscar García Amor d01266804c
Only push new original strings to Transifex
This avoid overwriting translated strings, but translations must be done
in Transifex.

Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2021-01-19 15:26:32 +01:00
Óscar García Amor 9908f76555
Add Fastlane structure. Closes #370
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2021-01-19 13:51:36 +01:00
Óscar García Amor 6dbe9fb2cc
Fix translation problem with plurals in fr_FR
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2021-01-19 09:32:02 +01:00
Óscar García Amor 3c0485c98b
Merge branch 'develop' 2021-01-19 09:07:22 +01:00
Óscar García Amor bda1deae2b
Bump version to 2.18.0
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2021-01-19 08:52:13 +01:00
Óscar García Amor 4fdab06271
Added big fat warning about #310 in README.md
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2021-01-19 08:33:57 +01:00
Óscar García Amor 193fa38dd0
Merge pull request #376 from nitehu/refactor/show_now_playing
Changed how the NowPlaying view is displayed and hidden
2021-01-15 09:14:09 +01:00
Nite 8ac0b28156
Merge branch 'develop' into refactor/show_now_playing 2021-01-14 09:49:12 +01:00
Nite 90090ba870
Changed how the NowPlaying view is displayed and hidden 2021-01-14 09:30:23 +01:00
Óscar García Amor 3c47ea890f
Bump version to 2.17.3
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2021-01-13 08:51:20 +01:00
Nite 3749f30691
Fixed Genres list 2021-01-13 08:43:40 +01:00
Nite 20de65d1fd
Merge pull request #373 from nitehu/develop
Fixed Genres list
2021-01-12 17:08:54 +01:00
Nite b7bb0851db
Fixed Genres list 2021-01-12 16:51:31 +01:00
Óscar García Amor 7d779315e5
Merge pull request #365 from lbonn/no-sort-special-collections
Do not sort special collections
2020-12-29 16:48:13 +01:00
Óscar García Amor 3c9dcbc0a3
Merge branch 'develop' into no-sort-special-collections 2020-12-29 16:31:51 +01:00
Óscar García Amor 5839c804b3
Merge pull request #364 from lbonn/compare-path-fallback
Fall back to path when comparing tracks
2020-12-29 16:31:27 +01:00
lbonn f43c107269
Do not sort special collections
It does not make sense to sort:

- random songs
- recently added albums
- recently played albums
- most played albums
- top rated albums
- random albums

As the order returned by the server is more relevant in these cases

Signed-off-by: lbonn <bonnans.l@gmail.com>
2020-12-21 23:35:19 +01:00
lbonn 7af666037d
Fall back to path when comparing tracks
Tracks will be sorted by ascending path if neither album, disc and track
id can help.

This is helpful for browsing a loose collection of tracks tagged under
the same album.

Signed-off-by: lbonn <bonnans.l@gmail.com>
2020-12-21 22:20:35 +01:00
Óscar García Amor 0ce5a56051
Update CONTRIBUTING.md
Add a link with more info about sign commits.
2020-12-18 09:42:24 +01:00
Óscar García Amor 70f86441d1
Bump version to 2.17.2
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-12-10 11:14:19 +01:00
Nite 41f9b4ad73
Merge pull request #361 from nitehu/fix/search_artist
Fixed artist items in search
2020-12-07 17:21:38 +01:00
Nite 543cb21cd1
Fixed artist items in search 2020-12-07 16:34:59 +01:00
Óscar García Amor d57248d160
Bump version to 2.17.1
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-11-30 09:14:25 +01:00
Nite e446785d0e
Merge pull request #358 from nitehu/fix/api29
Updated API to 29, fixed failing tests
2020-11-30 08:50:45 +01:00
Nite fe120a0bf2
Updated API to 29, fixed failing tests 2020-11-29 13:25:06 +01:00
Óscar García Amor 51cdbe7084
Add the new translations to resConfigs 2020-11-29 12:35:12 +01:00
Óscar García Amor 74b484fc1d
Bump version to 2.17.0
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-11-29 11:51:19 +01:00
Óscar García Amor 3afecf5fea
Merge branch 'translations' into develop 2020-11-29 11:47:14 +01:00
Óscar García Amor 5796e25923
Add new transifex translations 2020-11-29 11:40:42 +01:00
Óscar García Amor b471b9cad0
Merge branch 'nitehu-refactor/artist_list' into develop 2020-11-29 11:11:30 +01:00
Nite d98360d3fe
Really fixed getSectionName 2020-11-28 13:51:51 +01:00
Nite 7068477e23
Fixed getSectionName 2020-11-28 13:33:29 +01:00
Nite c10d08b862
Added translation for new strings 2020-11-27 16:13:00 +01:00
Nite 4336e8e243
Added setting to show artist picture 2020-11-25 20:00:12 +01:00
Nite a3c4815a07
Fixed Artist row layout
Changed Unknown image
2020-11-24 18:19:58 +01:00
Nite b3db46b1ab
Fixed ktlint errors 2020-11-23 14:02:18 +01:00
Nite 7dcaf5b1a6
Added Fastscroll Library with section popup support
Fixed collation for the sorting of tha Artist list
2020-11-23 13:55:28 +01:00
Nite 47e5675d1e
Added coverArt images to Artists
Minor fixes
2020-11-18 21:46:46 +01:00
Nite 34a6413f10
Migrated SelectArtistActivity to Kotlin
Updated SelectArtistActivity to use RecyclerView
Changed old progress display to use SwipeRefreshLayout's spinner
Added alphabetic side index
Enabled RecyclerView's FastScroll
2020-11-16 19:14:44 +01:00
Óscar García Amor 6aa29d54fe
Bump version to 2.16.0
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-11-07 11:20:18 +01:00
Nite 74d0c678df
Merge pull request #350 from nitehu/feature/single_button_play_pause
Implemented single button play/pause support for old Bluetooth devices
2020-11-06 18:23:56 +01:00
Nite 92f01fec26
Implemented single button play/pause support for old Bluetooth devices 2020-11-06 18:08:36 +01:00
Óscar García Amor a426b897e3
Merge pull request #347 from ultrasonic/bigger-star-icon
Set the star icon BIGGER
2020-11-05 13:04:29 +01:00
Óscar García Amor be3f9c4b15
Set the star icon BIGGER
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-11-05 12:54:34 +01:00
Óscar García Amor 7813c0373d
Merge pull request #346 from ultrasonic/improve-player
Improve player layout
2020-11-05 08:34:41 +01:00
Óscar García Amor 3fca8bd7a5
Improve landscape player view
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-11-04 21:20:57 +01:00
Óscar García Amor fb2dab0a25
Reorder elements in player view
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-11-04 21:00:16 +01:00
Óscar García Amor 8d45a3d106
Merge branch 'nitehu-fix/icon_sizes' into develop 2020-11-04 18:22:17 +01:00
Óscar García Amor 3f6c45f25f
Make media icons even BIGGER
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-11-04 18:21:42 +01:00
Nite d98f64ed25
Fixed too small icons and margins 2020-11-04 16:51:45 +01:00
Nite 19f8196268
Merge pull request #343 from nitehu/fix/server_settings_rotate
Fixed Server Settings screen to keep entered data when rotating the screen
2020-11-02 21:04:16 +01:00
Nite 8ebda198c6
Fixed Server Settings screen to keep entered data when rotating the screen 2020-11-02 17:13:38 +01:00
Nite 6e1d0e5b2e
Merge pull request #340 from nitehu/fix/songview_nullcheck
Fixed null checks in SongView
2020-11-01 08:13:12 +01:00
Nite df53da2439
Fixed copyright comments 2020-11-01 08:02:10 +01:00
Nite 537478430c
Fixed null checks in SongView
Migrated SongView to Kotlin
2020-10-31 08:51:43 +01:00
Óscar García Amor 645f524ce5
Bump version to 2.15.0
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-10-25 11:13:56 +01:00
Óscar García Amor 440b2109d3
Merge branch 'nitehu-fix/equalizer_visualizer_init' into develop 2020-10-25 10:58:37 +01:00
Óscar García Amor cf19736049
Merge branch 'develop' into fix/equalizer_visualizer_init 2020-10-25 10:38:49 +01:00
Óscar García Amor 5c637a2e9c
Merge branch 'nitehu-fix/store-api-version' into develop 2020-10-25 10:30:08 +01:00
Nite 5c81097df8
Merge branch 'develop' into fix/equalizer_visualizer_init 2020-10-20 11:59:37 +02:00
Nite bd5440bb96
Merge branch 'develop' into fix/store-api-version 2020-10-20 11:52:08 +02:00
Nite 9341fd3df3
Merge pull request #336 from nitehu/fix/clear_playlist
Fixed clearing the playlist when MediaPlayerService isn't running
2020-10-20 11:51:45 +02:00
Nite 9eeff3fabc
Fixed clearing the playlist when MediaPlayerService isn't running 2020-10-20 11:29:05 +02:00
Nite 30a5abaa34
Fixed exception on Room downgrade 2020-10-17 12:38:48 +02:00
Nite 0482c540bd
Updated Equalizer and Visualizer to use late initialization with LiveData 2020-10-17 12:35:30 +02:00
Nite 273bee1341
Added ACCEPT_SINGLE_VALUE_AS_ARRAY = true to JacksonMapper to maximize compatibility 2020-10-16 15:04:26 +02:00
Nite eb3ce0db8a
Added creating the client again after setting the minimum API version to NULL 2020-10-15 14:34:10 +02:00
Nite 4e6df12f4e
Moved minimumApiVersion detection to be executed before any first request
Refactored RESTMusicService to Kotlin
Refactored OfflineMusicService not to be a subclass of RESTMusicService
Minor fixes
2020-10-15 10:22:15 +02:00
Nite a396b4b27b
Fixed Subsonic API version detection
Fixed server change detection
Minor fixes
2020-10-13 21:41:01 +02:00
Óscar García Amor 356af198e0
Bump version to 2.14.0
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-10-10 11:54:11 +02:00
Óscar García Amor 0c50995ad2
Merge branch 'nitehu-fix/genres-api' into develop 2020-10-10 10:53:48 +02:00
Nite fe591ce0c6
Fixed removed constructor by minify in genres API 2020-10-09 21:38:35 +02:00
Óscar García Amor 768e8e6fb5
Remove more untranslated strings
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-10-08 14:19:24 +02:00
Óscar García Amor 3eeb9618f2
Deleted untranslated strings from values files
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-10-08 09:25:26 +02:00
Nite 0b21dfdb2d
Merge branch 'develop' into feature/log_to_file 2020-10-07 21:05:54 +02:00
Nite 778ee380e8
Merge pull request #329 from nitehu/fix/add_opus
Fixed Opus file handling and offline file name bug
2020-10-07 21:04:55 +02:00
Nite 1f7167e016
Removed file existence check to improve performance 2020-10-07 20:52:58 +02:00
Nite b16dde0b07
Fixed Opus file handling
Fixed file name generation in offline mode
2020-10-07 17:52:16 +02:00
Nite 60a8599a02
Merge branch 'develop' into feature/log_to_file 2020-10-06 17:07:16 +02:00
Óscar García Amor 25854ab808
Merge pull request #326 from Maxmystere/develop
Add Material Black Theme
2020-10-06 15:41:16 +02:00
Max Pop d4ecc5825d
Merge remote-tracking branch 'base/develop' into develop 2020-10-05 11:49:14 +02:00
Max Pop c565dfef24
Revert "Add basic translation"
This reverts commit cd4b1239fc.
2020-10-05 11:48:42 +02:00
Nite 8fa7fdd18b
Merge branch 'develop' into feature/log_to_file 2020-10-05 10:52:24 +02:00
Óscar García Amor dcd27919a2
Do not treat missing translations as errors
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-10-05 09:08:50 +02:00
Max Pop 675a32a3ef
Remove useless import 2020-10-05 01:59:53 +02:00
Max Pop cd4b1239fc
Add basic translation 2020-10-05 01:53:23 +02:00
Max Pop 6ae3c9692a
Add Material Black Theme 2020-10-05 01:45:58 +02:00
Óscar García Amor 57a89c4a77
Bump version to 2.13.0
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-10-04 11:41:51 +02:00
Nite e15fa23def
Fixed ktLint errors 2020-10-02 19:08:05 +02:00
Nite 6e7ebeabef
Implemented file logging settings
Implemented log rotation, log deletion
Minor fixes
2020-10-02 18:47:21 +02:00
Nite 5de20861ca
Added Timber to Koin and OkHttp, started implementing file logging 2020-09-30 18:17:57 +02:00
Nite 7217f2cca8
Refactored Log calls to Timber 2020-09-30 14:47:59 +02:00
Nite 60b6a5dbde
Merge pull request #318 from nitehu/feature/bluetooth_connection_settings
Implemented Bluetooth connection settings
2020-09-29 18:10:25 +02:00
Nite 6355a7ed80
Fixed missing Intent in AndroidManifest 2020-09-29 14:13:49 +02:00
Nite f6e61b5484
Clarified strings for options 2020-09-29 13:58:15 +02:00
Nite df3ef9c04e
Merge branch 'develop' into feature/bluetooth_connection_settings 2020-09-29 12:14:21 +02:00
Nite 75a9c60889
Fixed handling Bluetooth intents while Ultrasonic isn't running 2020-09-29 11:09:24 +02:00
Óscar García Amor 7a6aa950ac
Run build command with assembleRelease in CI
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-09-29 09:17:15 +02:00
Nite c805005b02
Added resume and pause settings for bluetooth device connection / disconnection 2020-09-28 21:14:47 +02:00
Nite 046916221d
Started implementing Bluetooth connection settings 2020-09-28 21:14:30 +02:00
Nite 9f8641388b
Merge pull request #316 from nitehu/develop
Fix gradle out of memory error
2020-09-28 18:14:03 +02:00
Nite d189026c18
Fix gradle out of memory error 2020-09-28 18:00:10 +02:00
Óscar García Amor 81448e34d6
Bump version to 2.12.0
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-09-28 15:15:20 +02:00
Nite ff97c0138c
Merge pull request #314 from nitehu/fix/edit_server
Fixed Edit Server button layout and exit check
2020-09-25 20:19:01 +02:00
Nite 4b85bc16d5
Merge branch 'develop' into fix/edit_server 2020-09-25 20:11:14 +02:00
Nite 4991eb8d13
Fixed Edit Server button layout and exit check 2020-09-25 20:02:59 +02:00
Óscar García Amor bd3e4df805
Merge pull request #313 from ogarcia/fix-unknown-image
Fix fatal error loading unknown album cover
2020-09-25 19:42:21 +02:00
Óscar García Amor 8c07346296
Fix fatal error loading unknown album cover
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-09-25 19:36:35 +02:00
Óscar García Amor 2a7ea19a0f
Merge pull request #312 from ultrasonic/vector
Vector
2020-09-25 18:33:28 +02:00
Óscar García Amor 5387b58e35
Finish convert drawables to vectors. Closes #308
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-09-25 18:20:18 +02:00
Óscar García Amor 89ef73ccec
Merge branch 'develop' into vector 2020-09-25 13:35:11 +02:00
Óscar García Amor 81a0ff2967
Deleted some unused assets
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-09-25 13:34:08 +02:00
Nite 333b147c02
Merge pull request #309 from nitehu/fix/new_server_id
Fixed issues with new Server Settings
2020-09-25 12:33:36 +02:00
Nite ef09807e3e
Fixed stopping playback when selecting the same server 2020-09-25 11:15:19 +02:00
Nite 7bbc3234f2
Added applying changes when the currently active server is modified 2020-09-25 11:04:48 +02:00
Nite db4f8b83d3
Updated missing index handling 2020-09-25 10:43:33 +02:00
Óscar García Amor 81f248f446
Convert drawables to vectors
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-09-24 22:00:29 +02:00
Nite 02716c827a
Added new preference key to avoid duplicate migration 2020-09-24 21:00:21 +02:00
Nite 102f3e8a04
Updated ServerSettingsModel to use Room for handling LiveData 2020-09-24 20:32:51 +02:00
Nite 5b0c9906f1
Fixed Server Id and Indexing 2020-09-24 18:20:59 +02:00
Nite 59c0054a11
Merge pull request #306 from nitehu/fix/genre_refresh
Fixed missing Genre Refresh functionality
2020-09-24 15:30:42 +02:00
Nite 481084686b
Fixed missing Genre Refresh functionality 2020-09-24 15:16:59 +02:00
Óscar García Amor 4b36730358
Add a deleted by mistake file
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-09-24 14:19:33 +02:00
Óscar García Amor a411ed63e2
Fix Select Folder item. Closes #305
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-09-24 13:19:25 +02:00
Óscar García Amor a7d29a4093
More UltraSonic -> Ultrasonic
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-09-24 13:03:05 +02:00
Óscar García Amor f0f9e3d438
UltraSonic -> Ultrasonic
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-09-24 12:35:35 +02:00
Óscar García Amor 36e25253be
Fix translations
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-09-24 12:21:17 +02:00
Óscar García Amor c6ed320e12
Merge branch 'nitehu-feature/updated-server-settings' into develop 2020-09-24 11:36:55 +02:00
Nite 31853cc8bc
Made the hostname part of the server url mandatory 2020-09-23 17:14:14 +02:00
Nite b7c21e4aac
Fixed Server Id to be the same as the Preference was 2020-09-23 16:26:54 +02:00
Nite 55105e52b6
Fixed ktlint errors 2020-09-22 22:01:33 +02:00
Nite 06109424ec
Index fix, added logging 2020-09-22 21:50:53 +02:00
Nite bed29ce33b
Fixed migrated server indexing 2020-09-22 20:18:36 +02:00
Nite cc954e4d5a
Fixed migration to check for empty database at every start 2020-09-22 17:03:04 +02:00
Nite e8310b2ac8
Merge branch 'develop' into feature/updated-server-settings 2020-09-22 11:40:25 +02:00
Óscar García Amor 1f06860dcf
Merge branch 'Maxmystere-develop' into develop 2020-09-22 11:29:29 +02:00
Max Pop 251e575421
Resign all with gpg key 2020-09-21 12:17:55 +02:00
Nite 234e4703a1
Fixed first time migration
Minor fixes
2020-09-19 11:56:10 +02:00
Nite 6721500202
Updated Server Settings UI and Storage
Updated Koin to latest
2020-09-18 09:37:19 +02:00
Óscar García Amor 4d8e7f0631
Fix typos in Ultrasonic word
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-09-07 12:31:44 +02:00
Óscar García Amor b04f309b9a
Bump version to 2.11.2
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-09-05 14:36:15 +02:00
Óscar García Amor 387457cf99
Merge branch 'usability' into develop 2020-09-05 14:28:59 +02:00
Óscar García Amor 0f7238e961 Fix layout in server selector
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-09-05 13:57:06 +02:00
Óscar García Amor f9199eebd3 Improve usability
- Add more padding to stars in song lists to avoid touch scrollbar.
- Add more space between border of screen and notification close button,
  enlarge the button in 10dp.

Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-09-05 13:23:37 +02:00
Óscar García Amor f07f0344fd Bump version to 2.11.1
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-09-04 09:24:50 +02:00
Óscar García Amor a288a0e3de Merge branch 'nitehu-fix/jukebox' into develop 2020-09-04 09:14:14 +02:00
Nite 6beb1ae42e
Fixed Jukebox start bug 2020-09-03 16:05:38 +02:00
Óscar García Amor bda0b61459 [skip ci] Remove BIG FAT WARNING from README
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-09-02 18:56:08 +02:00
Óscar García Amor 9887a49ed6 Bump version to 2.11.0
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-09-02 18:34:17 +02:00
Óscar García Amor 459b8b823d Merge branch 'nitehu-fix/server-version-update' into develop 2020-09-02 18:24:59 +02:00
Nite 0f42ee20cc
Fixed ktlint errors 2020-08-27 11:02:33 +02:00
Nite ca2bfbf14b
Updated Subsonic API version handling 2020-08-27 10:27:25 +02:00
Óscar García Amor 0edaa29303 Bump version to 2.10.0
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-08-24 18:47:36 +02:00
Óscar García Amor d4e9d72436 Merge branch 'nitehu-feature/cache-folder-setting' into develop 2020-08-24 18:18:56 +02:00
Nite 16b7bbedff
Updated Robolectric 2020-08-24 15:06:58 +02:00
Nite a22984566a
Trying to fix CI error 2020-08-24 13:59:40 +02:00
Nite 1c83f5c67d
Updated Mockito 2020-08-24 13:38:14 +02:00
Nite c23616e57a
Trying to fix CI error 2020-08-24 12:10:34 +02:00
Nite d295539715
Trying to fix CI error 2020-08-24 12:05:41 +02:00
Nite 74c3acd29f
Updated jacoco config to fix ci errors 2020-08-24 11:45:27 +02:00
Nite 5739b2bf4b
Implemented file picker for cache folder settings 2020-08-18 21:24:24 +02:00
Óscar García Amor 0ad1751a06 Bump version to 2.9.0
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-08-11 10:20:28 +02:00
Óscar García Amor e7d4ca5331 Merge branch 'nitehu-refactor/downloadservice' into develop 2020-08-11 09:56:11 +02:00
Nite 3f3515536c
Fixed portuguese translation of "MX Player" 2020-07-31 11:22:01 +02:00
Nite 720f43c8d9
Fixed unintentional replaces 2020-07-30 11:59:22 +02:00
Nite 5f3861b1ac
Improved cold start time from Doze 2020-07-16 14:25:58 +02:00
Nite 07553464e8
Fixed ktlintCheck 2020-07-13 16:37:13 +02:00
Nite 4b0809f905
Fixed unnecessary starts 2020-07-11 11:15:16 +02:00
Nite 3d61dde83f
Fixed audio focus handling 2020-07-07 18:50:26 +02:00
Nite aae40c076e
Fixed Api bug in DragSortListView 2020-07-04 09:20:27 +02:00
Nite f5748d7dc0
Fixed lost lockscreen controls when exiting the app 2020-07-02 19:01:33 +02:00
Nite 091374f922
Fixed wired headset handling
Fixed MediaPlayer start timeout for slow phones
2020-07-02 17:20:06 +02:00
Nite 60250a42a9
Fixed wrong context 2020-06-30 22:10:15 +02:00
Nite 5b5c8ea8b7
Fixed CI things 2020-06-30 17:09:13 +02:00
Nite 2ff0151e8c
Fixed widget operation when Ultrasonic is stopped 2020-06-30 16:47:29 +02:00
Nite 7f5ff00237
Fixed Media Key processing 2020-06-30 16:19:50 +02:00
Nite decca7103f
Fixed exit and restart 2020-06-30 15:16:45 +02:00
Nite 7dad738fce
Fixed pause on bluetooth disconnect, minor fixes 2020-06-29 16:17:22 +02:00
Nite fdc1748f8a
Fixed foreground service stop and start
Fixed play on restore
2020-06-29 14:44:19 +02:00
Nite bd77c2a851
Added null checks, moved MediaPlayer to its own Koin module 2020-06-26 16:33:27 +02:00
Nite bbe9f39300
Moved externally visible functions to interface, added comments 2020-06-26 15:18:14 +02:00
Nite 0bef3ae417
Fixed concurrency problems 2020-06-26 13:31:31 +02:00
Nite b83631107c
Major cleanup, minor fixes 2020-06-25 14:33:44 +02:00
Nite 8c60e09914
Fixed player threading, other minor fixes 2020-06-25 11:58:09 +02:00
Nite c3be251e8b
Restored minor fixes 2020-06-23 19:27:04 +02:00
Nite 0820763c7f
Refactored playback related things 2020-06-23 18:40:44 +02:00
Nite 53628dde54
Started to use Koin, refactored lifecycleSupport and Intent handling 2020-06-22 18:44:15 +02:00
Nite 13b987791e
Started DownloadServiceImpl refactor 2020-06-22 18:43:59 +02:00
Óscar García Amor 96795701fe Bump version to 2.8.0
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-06-22 10:08:10 +02:00
Óscar García Amor ece7620175 Merge branch 'nitehu-feature/upgrade-to-api28' into develop 2020-06-22 09:52:25 +02:00
Nite f6a41206b8
Minor fixes 2020-06-21 09:37:12 +02:00
Nite 02da3e79ba
Fixed DownloadServiceImpl to start as background service
Removed notification related settings for API26
2020-06-20 15:16:57 +02:00
Nite 50fde988a8
Fixed notification priority 2020-06-19 13:58:51 +02:00
Nite ad1ae62aff
Fixed notification update error 2020-06-18 15:53:38 +02:00
Óscar García Amor 04f80be254 Merge branch 'api28' into develop 2020-06-18 10:19:31 +02:00
Óscar García Amor 884cf8b1b0 Reactivate the uncaught exception handler
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-06-18 10:12:50 +02:00
Óscar García Amor a8c7b6765e Merge branch 'nitehu-api28' into api28 2020-06-18 10:10:57 +02:00
Nite e210908257
Fixed context in FileUtil
Added CleartextTraffic to AndroidManifest
2020-06-17 18:14:34 +02:00
Óscar García Amor af5ecae7f5 First approach to API 28
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-06-17 15:08:30 +02:00
Óscar García Amor 08f1e78afc Updated spanish translation
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-06-17 10:55:10 +02:00
Óscar García Amor d0705cd933 Merge branch 'nitehu-feature/runtime-permissions' into develop 2020-06-17 10:25:35 +02:00
Nite 1e789858bc
Updated AutoRepeatButton from ImageView to AppCompatImageView as Lint suggested 2020-06-13 22:46:54 +02:00
Nite 92b0bb4742
Fixed gradle.properties for CI 2020-06-13 22:32:32 +02:00
Nite de7eaef668
Updated Gradle to 6.5
Tried to satisfy ktlint rules
2020-06-13 19:04:31 +02:00
Nite b23c1b4a6a
Cleaned up dependencies.gradle
Moved MultiDex to debug only
2020-06-05 17:09:33 +02:00
Nite cb09be0a64
Fixed gradle 2020-06-05 09:50:10 +02:00
Nite a845ec8039
Fixed dialog title 2020-06-02 16:33:06 +02:00
Nite 5d18929258
Implemented runtime permission handling using Dexter library, minor fixes 2020-06-02 15:35:36 +02:00
Nite 915a659b5d
Fixed MultiDex 2020-05-29 11:23:51 +02:00
Nite f4ae87fffe
Migrated to Androidx 2020-04-26 12:05:28 +02:00
Nite 7ce8bf921b
Updated Gradle and Kotlin 2020-04-26 08:37:24 +02:00
Óscar García Amor b4ece442c8 skip ci: Added link to #79
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-03-23 18:11:14 +01:00
Óscar García Amor e94e39e6d1 Added big fat warning about #79 in README.md
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-03-23 18:07:48 +01:00
Óscar García Amor 3eef5ebf4e Update docker image on generate_signed_apk pipeline
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-03-23 17:47:44 +01:00
Óscar García Amor 76db1e5c08 Merge branch 'develop'
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-03-23 17:34:14 +01:00
Óscar García Amor 367f388fca
Merge pull request #269 from ultrasonic/new-release
Bump version to 2.7.0
2020-03-23 17:30:44 +01:00
Óscar García Amor 26c9f72b5c Bump version to 2.7.0
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-03-23 17:24:39 +01:00
Óscar García Amor b5bbabf376
Merge pull request #268 from nitehu/fix/stuck-notification
Fixed stuck notification
2020-03-23 17:13:24 +01:00
Nite b61f738502
Added dummy German translation for missing strings 2020-03-23 16:18:49 +01:00
Nite d920e51279
Testing conditional notification update 2020-03-23 15:53:18 +01:00
Nite b4885c684c
Fixed stuck notification 2020-03-23 15:47:47 +01:00
Óscar García Amor 17925e8a2f Merge branch 'develop' of github.com:ultrasonic/ultrasonic into develop 2020-03-23 10:11:25 +01:00
Óscar García Amor 4297f50aa1 Fix circleci pipeline
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-03-23 10:11:12 +01:00
Óscar García Amor bbb92b19d4
Merge pull request #267 from nitehu/fix/share-playlist
Fixed missing Extra from Intent when selecting a Playlist Item.
2020-03-23 10:01:13 +01:00
Óscar García Amor 276429ef26 Updated translations from Transifex
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-03-23 09:51:57 +01:00
Óscar García Amor 8a798ac456 Merge branch 'nitehu-feature/fivestarrating' into develop 2020-03-23 09:50:53 +01:00
Nite 7698c145c5
Merge branch 'develop' into feature/fivestarrating 2020-03-21 07:52:28 +01:00
Óscar García Amor fdf39fa214 Added more info to README.md
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-03-09 13:06:09 +01:00
Nite 2fff8e5a0f
Merge branch 'develop' into fix/share-playlist 2020-03-06 17:51:02 +01:00
Nite 99dbf236c9
Fixed rating from notification 2020-02-23 12:57:15 +01:00
Óscar García Amor 7963c8cadb Merge branch 'palto42-de_about' into develop 2020-02-07 10:54:40 +01:00
Óscar García Amor d267f9a8ad Added german translation
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2020-02-07 10:54:21 +01:00
palto42 925da70870
German translation of About file 2020-02-02 13:44:38 +01:00
Nite b10f6d895c
Fixed missing Extra from Intent when selecting a Playlist Item. This caused sharing to fail. 2020-01-15 20:46:33 +01:00
Nite ab624be93d
Implemented five star rating 2020-01-13 21:20:52 +01:00
Óscar García Amor 7049c4ad20 Bump version to 2.6.2 for next release.
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2019-10-29 08:47:30 +01:00
Dmitriy Bogdanov 9591ed4cef Set the notification publicly visible
Signed-off-by: Dmitriy Bogdanov <d@di72nn.com>
2019-10-29 08:39:39 +01:00
Óscar García Amor 900fa4b67e
Merge pull request #254 from di72nn/public_notification
Set the notification publicly visible
2019-10-29 08:31:51 +01:00
Dmitriy Bogdanov 58d620acf2
Set the notification publicly visible
Signed-off-by: Dmitriy Bogdanov <d@di72nn.com>
2019-10-25 17:36:41 +04:00
Yahor Berdnikau c03bf74c7e
Merge pull request #247 from ultrasonic/transifex
Updated translations from Transifex
2019-03-13 13:12:56 +01:00
Yahor Berdnikau 78c3b901b6 Updated docker image on CI. 2019-03-13 13:06:21 +01:00
Óscar García Amor 410b399040 Updated translations from Transifex
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2019-03-13 12:05:40 +01:00
Óscar García Amor 1dc3b512c8
Merge pull request #239 from ultrasonic/subsonic-fix
Fast and dirty fix to Subsonic 6.1.4
2018-11-23 14:54:28 +01:00
Óscar García Amor 5363bec22b Fast and dirty fix to Subsonic 6.1.4
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2018-11-22 15:19:19 +01:00
Yahor Berdnikau 7370fb73a3
Merge pull request #234 from ultrasonic/repo-chore
Repo chore
2018-10-07 21:39:11 +02:00
Yahor Berdnikau 74c992d035 Run lint only on app release variant.
Also regenerate new baseline.
2018-10-07 21:36:47 +02:00
Yahor Berdnikau 2e008c7ed6 Fix slightly wrong jacoco setup. 2018-10-07 21:21:49 +02:00
Yahor Berdnikau 3371b4025d Improve Jacoco setup. 2018-10-07 21:05:48 +02:00
Yahor Berdnikau 21bcb5429a Use JUnit5 engine to run unit tests in android modules. 2018-10-07 20:59:06 +02:00
Yahor Berdnikau f422ba30b9 Use JUnit5 engine to run unit tests in kotlin modules. 2018-10-07 20:59:06 +02:00
Yahor Berdnikau 44fa1b1bcf Move subsonic-api module to core modules. 2018-10-07 20:59:06 +02:00
Yahor Berdnikau fb8d5382dc Move subsonic-api-image-loader module to core modules. 2018-10-07 20:59:06 +02:00
Yahor Berdnikau d98ff9ffcf Move pulltorefresh module to core modules. 2018-10-07 20:59:06 +02:00
Yahor Berdnikau 69b945c230 Move menudrawer module to core modules. 2018-10-07 20:59:06 +02:00
Yahor Berdnikau 997accd88a Move library module to core modules. 2018-10-07 20:59:06 +02:00
Yahor Berdnikau 01bb519762 Move domain module to core modules. 2018-10-07 20:59:06 +02:00
Yahor Berdnikau e1f9764d55 Move cache module to core modules. 2018-10-07 20:59:06 +02:00
Yahor Berdnikau 4e159eed48 Fix failing tests. 2018-10-07 20:59:06 +02:00
Yahor Berdnikau eb59e3ccc1 Add common configuration for android modules. 2018-10-07 20:59:06 +02:00
Yahor Berdnikau 8f65b37605 Add common configuration for kotlin modules. 2018-10-07 20:50:56 +02:00
Yahor Berdnikau 4c0e55ccdd Update Android Gradle plugin to 3.2.0 version. 2018-10-07 20:48:23 +02:00
Yahor Berdnikau 7a693b9705 Update Gradle wrapper to 4.6 version. 2018-10-07 20:48:23 +02:00
Yahor Berdnikau 73af16b9c5 Update ktlint to 0.28.0 version. 2018-10-07 20:48:23 +02:00
Yahor Berdnikau 6376a27b8b Update kotlin to 1.2.71 version. 2018-10-07 20:48:23 +02:00
Yahor Berdnikau 4d0955932a Set target api to 28. 2018-10-07 20:48:23 +02:00
Yahor Berdnikau 0762b7bcf8
Merge pull request #230 from ultrasonic/update-code-coverage
Update code coverage
2018-09-11 22:39:21 +02:00
Yahor Berdnikau e85fcc2def Update Jacoco version to 0.8.2.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-09-11 22:32:27 +02:00
Yahor Berdnikau 501015c649 Rework jacoco report generation for android projects.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-09-11 22:32:27 +02:00
Yahor Berdnikau 2a1dfc3e8d Enable running test for subsonic image loader on CI.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-09-11 22:32:27 +02:00
Yahor Berdnikau 12b2dce860 Update JacocoAndroid plugin to 0.1.3 version.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-09-11 22:32:27 +02:00
Yahor Berdnikau 0bfa86de77 Update Jacoco to 0.8.1 version.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-09-11 22:32:27 +02:00
Yahor Berdnikau 881c85a390
Merge pull request #220 from ultrasonic/use-koin-beta
Migrate koin to 1.0.0-beta-3 version.
2018-08-03 22:13:44 +02:00
Yahor Berdnikau c2924df25f Use Koin java module.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-08-03 22:08:30 +02:00
Yahor Berdnikau 48acc64ee3 Migrate Koin to 1.0.0-beta3 version.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-08-03 21:50:21 +02:00
Óscar García Amor ea9289b5db
Merge pull request #215 from ultrasonic/develop
New 2.6.0 release
2018-07-17 11:38:12 +02:00
Yahor Berdnikau 1c6dacb7fd
Merge pull request #214 from ultrasonic/new-release
New release 2.6.0
2018-07-15 12:33:15 +02:00
Yahor Berdnikau b33f7279b0 Bump version to 2.6.0 for next release.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-07-15 12:29:13 +02:00
Yahor Berdnikau 714b4bcf55 Update kotlin to 1.2.51 version.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-07-15 12:27:58 +02:00
Yahor Berdnikau bac78f91c0
Merge pull request #213 from ultrasonic/fix-image-size
Fix image doesn't use all view width with new image loader.
2018-07-15 12:24:35 +02:00
Yahor Berdnikau 5573634ded Fix image doesn't use all view width with new image loader.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-07-15 12:19:48 +02:00
Yahor Berdnikau 0f83368755
Merge pull request #212 from ultrasonic/fix-fail-to-open-album
Fix app doesn't open album using ID3 tags browsing.
2018-07-15 12:06:15 +02:00
Yahor Berdnikau 50a0923cf4 Fix app doesn't open album using ID3 tags browsing.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-07-15 11:59:00 +02:00
Yahor Berdnikau 17eb92c71b
Merge pull request #211 from ultrasonic/fix-app-closes-on-error
Don't close app on background task error.
2018-07-15 10:29:35 +02:00
Yahor Berdnikau 75d81fe920 Don't close app on background task error.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-07-15 10:24:46 +02:00
Yahor Berdnikau 7f36c74060
Merge pull request #206 from ultrasonic/add-image-loader
Add new image loader implementation
2018-07-15 09:55:22 +02:00
Yahor Berdnikau a63c47112c Add feature flags that contains new image loader flag.
This allows to release new versions of the app with unfinished/
not fully implemented features.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-07-15 09:50:07 +02:00
Yahor Berdnikau 02467cb05b Add loading user avatars.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-07-14 20:55:45 +02:00
Yahor Berdnikau c0b6500b47 Provide configuration for image load request.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-06-28 22:03:47 +02:00
Yahor Berdnikau c23420a83a Fix lint error by excluding support library from picasso dependency.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-06-26 23:09:16 +02:00
Yahor Berdnikau 6f6e2470d8 Enable jacoco coverage for subsonic-api-image-loader module.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-06-26 23:09:16 +02:00
Yahor Berdnikau 77eb257d84 Glue together old ImageLoader impl and new one.
Currently it is working in a pretty limited way.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-06-26 23:09:16 +02:00
Yahor Berdnikau 74591571bf Add initial implementation of image loader.
Currently it only supports loading cover art images from network.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-06-26 23:09:16 +02:00
Yahor Berdnikau e4e962faa0 Changed android namespace from a to android.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-06-26 23:09:16 +02:00
Yahor Berdnikau b27ce42d02 Extract ImageLoader interface.
This will allow to swap it with a new implementation.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-06-26 23:09:16 +02:00
Yahor Berdnikau 36e813bed7
Merge pull request #207 from Tapchicoma/fix-album-list-image-size
Set album list item image size to fixed value.
2018-06-26 23:06:07 +02:00
Yahor Berdnikau 3f02dba004 Set album list item image size to fixed value.
Value is taken from currently playing view.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-06-26 23:01:54 +02:00
Yahor Berdnikau 0bbc7448c5
Merge pull request #205 from ultrasonic/version-updates
Version updates
2018-06-24 18:01:19 +02:00
Yahor Berdnikau 1cd892a3bd Update kotlin to 1.2.50 version.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-06-24 17:46:08 +02:00
Yahor Berdnikau 44ad8d75aa Update KtLint to 0.24.0 version.
Also update gradle plugin to 4.1.0 version.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-06-24 17:44:22 +02:00
Yahor Berdnikau 1308e2d561 Update Android build tools to 3.1.3 version.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-06-24 17:42:52 +02:00
Yahor Berdnikau 50157eb811
Merge pull request #204 from ultrasonic/introduce-di
Introduce initial dependency injection setup.
2018-06-24 17:36:51 +02:00
Yahor Berdnikau b97e09b14b Provide app okhttp client instance to subsonic api client.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-06-24 17:30:38 +02:00
Yahor Berdnikau f007418298 Move subsonic api client to it's own DI module.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-06-24 17:30:38 +02:00
Yahor Berdnikau 8dc9534327 Move api client configuration to separate data class.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-06-24 17:30:38 +02:00
Yahor Berdnikau 52b32d0fd6 Add DI for MusicService.
It is still hidden behind MusicServiceFactory, but opens a way to use
it directly via injection.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-06-24 17:30:38 +02:00
Óscar García Amor b3ac85d833
Merge pull request #202 from ultrasonic/develop
New 2.5.0 release.
2018-06-14 14:56:33 +02:00
Yahor Berdnikau 24a36e641c Bump version to 2.5.0 for next release.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-06-12 22:36:39 +02:00
Yahor Berdnikau 30dde80d4e
Merge pull request #201 from ultrasonic/fix-bookmarks-resume
Fix bookmark doesn't restore saved song position.
2018-06-12 22:32:41 +02:00
Yahor Berdnikau 91b5941c7c Fix bookmark doesn't restore saved song position.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-06-12 22:29:19 +02:00
Yahor Berdnikau 58110fbf1a
Merge pull request #200 from ultrasonic/fix-f-droid-publishing
Fix f-droid can't build new app version.
2018-06-12 21:58:10 +02:00
Yahor Berdnikau c55ca02865 Fix f-droid can't build new app version.
F-Droid has a strict limitation (😞) that version code and
version name should be in the app build.gradle.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-06-12 21:53:06 +02:00
Yahor Berdnikau 1c7e5bb0f2 Support json with UTF-8 bom in VersionInterceptor.
Previously it was peeking at response body and put it into intermediate
string that later used in json parsing. This preserves bom character
and leads to parse fail. Now it passes peek body input stream to
json parser that handles bom internally.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-05-15 22:10:37 +02:00
Yahor Berdnikau 6f4c8baeb5 Update Jackson to 2.9.5 version.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-05-15 22:10:37 +02:00
Yahor Berdnikau 89cdb689c3
Merge pull request #193 from ultrasonic/remove-default-server-settings
Default server settings removed
2018-04-08 15:05:18 +02:00
Óscar García Amor 8b58691246 Default server settings removed
Now when you configure a new server connection the input boxes will
appear clean instead of with default garbage.

Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2018-04-07 17:23:23 +02:00
Óscar García Amor 9c117386ba
Merge pull request #191 from ultrasonic/develop
New release 2.4.0
2018-04-06 21:24:02 +02:00
Yahor Berdnikau d35888213b
Merge pull request #190 from ultrasonic/fix-notification-dismiss
Fix notification can't be killed when player is not playing.
2018-04-06 19:05:00 +02:00
Yahor Berdnikau 41fe68db0f Fix notification can't be killed when player is not playing.
Fix clicking on close (x) in notification does nothing when player has
neither playing nor paused state.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-04-06 19:00:59 +02:00
Yahor Berdnikau d3dc851419
Merge pull request #189 from ultrasonic/update-android-gradle-plugin
Update android gradle plugin to 3.1.0 version.
2018-04-05 20:55:52 +02:00
Yahor Berdnikau e7caddaf99 Add workaround for transitive dependency conflict.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-04-05 20:48:43 +02:00
Yahor Berdnikau 4ac27dcd4e Update android gradle plugin to 3.1.0 version.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-04-04 21:26:31 +02:00
Yahor Berdnikau 2ac346441b
Merge pull request #188 from ultrasonic/fix_wrong_server_settings
Fix inconsistent behaviour when adding new server on debug build.
2018-04-04 20:33:11 +02:00
Yahor Berdnikau 68cb1af02b Fix inconsistent behaviour when adding new server on debug build.
After adding special suffix for debug builds, default shared preferences
name was changed.
2018-04-03 22:09:22 +02:00
Yahor Berdnikau e2a36850d3
Merge pull request #185 from ultrasonic/update-check-plugins
Update check plugins
2018-03-24 20:00:24 +01:00
Yahor Berdnikau eb09e9b417 Update Ktlint to 0.20.0 version.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-03-24 19:54:12 +01:00
Yahor Berdnikau 46922d98ae Update ktlintGradle to 3.2.0 version.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-03-24 19:40:08 +01:00
Yahor Berdnikau aaa04bc849 Update detekt to 1.0.0.RC6-4 version.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-03-24 19:39:08 +01:00
Yahor Berdnikau 1d7698a59f
Merge pull request #184 from ultrasonic/prepare-new-release
Prepare new release
2018-03-24 19:36:48 +01:00
Yahor Berdnikau 55a0e7cb3c Update Kluent to 1.35 version.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-03-24 19:30:03 +01:00
Yahor Berdnikau 385779933b Update mockito to 2.16.0 version.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-03-24 19:00:33 +01:00
Yahor Berdnikau 4959891f9f Update OkHttp to 3.10.0 version.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-03-24 18:58:33 +01:00
Yahor Berdnikau 61b92bee39 Update Retrofit to 2.4.0 version.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-03-24 18:57:18 +01:00
Yahor Berdnikau ce9edae390 Update kotlin to 1.2.31 version.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-03-24 18:43:27 +01:00
Yahor Berdnikau 9bbb9b3263 Bump version to 2.4.0 for next release.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-03-24 18:41:18 +01:00
Yahor Berdnikau a9f1a5f724
Merge pull request #183 from ultrasonic/icon
New adaptive icon
2018-03-24 10:30:32 +01:00
Óscar García Amor 3c1debc51a New adaptive icon 2018-03-23 14:16:31 +01:00
Óscar García Amor 95496eb120
Merge pull request #182 from ultrasonic/develop
New 2.3.1 release
2018-03-22 09:15:59 +01:00
Óscar García Amor db29c86472 Bump version code
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2018-03-22 09:06:46 +01:00
Yahor Berdnikau 929836b00b
Merge pull request #181 from ultrasonic/fix-release-build
Fix release build
2018-03-21 22:28:07 +01:00
Yahor Berdnikau d8d9893733 Bump version to 2.3.1
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-03-21 22:22:48 +01:00
Yahor Berdnikau 661b8c2e97 Fix failing AAPT.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-03-21 22:22:48 +01:00
Yahor Berdnikau 52a5ceb5d6 Fix proguard removing too much.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-03-21 22:10:37 +01:00
Óscar García Amor 5f77cf40dc
Merge pull request #179 from ultrasonic/translation
Update translations
2018-03-19 21:23:31 +01:00
Óscar García Amor 49ba219a57 Update translations
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2018-03-19 20:58:34 +01:00
Óscar García Amor 6137b0af26
Merge pull request #178 from ultrasonic/develop
New 2.3.0 release
2018-03-19 19:18:27 +01:00
Yahor Berdnikau b0119281f2
Merge branch 'master' into develop 2018-03-18 19:43:17 +01:00
Yahor Berdnikau 2c2968f780
Merge pull request #177 from ultrasonic/update-version
Bump version to 2.3.0 for next release.
2018-03-18 19:36:38 +01:00
Yahor Berdnikau c5bcc49e40 Bump version to 2.3.0 for next release.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-03-18 19:32:50 +01:00
Yahor Berdnikau d102f6d60b
Merge pull request #176 from ultrasonic/fix-server-version-is-not-updated
Fix server version is not updated
2018-03-18 19:19:50 +01:00
Yahor Berdnikau d476ddfa0c Make a ping to server on app start.
This will update supported server version in subsonic api client.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-03-18 19:15:22 +01:00
Yahor Berdnikau 44114e90ab Increase response peek bytes to 1000.
This will increase the probability that version is parsed.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-03-18 18:38:28 +01:00
Yahor Berdnikau bf6026087a
Merge pull request #175 from ultrasonic/enable-minify-for-release
Enable minify for release
2018-03-18 18:22:55 +01:00
Yahor Berdnikau 32990acb2a Add assemble release step to build job.
This will check that minification of release is not broken.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-03-18 18:18:43 +01:00
Yahor Berdnikau 7bf39ca877 Enable minification for release build.
This reduces result apk size around 2x times.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-03-18 18:09:42 +01:00
Yahor Berdnikau 3de18ed282
Merge pull request #173 from ultrasonic/persistent-cache
Persistent cache
2018-03-18 17:42:35 +01:00
Yahor Berdnikau 1737fd69e7 Remove unused method from FileUtil.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-03-18 17:38:47 +01:00
Yahor Berdnikau cd02aff0f5 Remove ununsed companion object from MusicFolder entity.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-03-18 17:37:11 +01:00
Yahor Berdnikau b6140d841f Update twitter serial to 0.1.6 version.
This fixes unknown type deserialization error.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-03-18 17:36:22 +01:00
Yahor Berdnikau 72743346dc Hide implementation under typealias.
Though it is not working for java interop.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-03-18 17:30:55 +01:00
Yahor Berdnikau 8076956786 Clear persistent storage on server deletion.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-03-12 22:21:07 +01:00
Yahor Berdnikau 334ffbf5e9 Make persistent storage per server base.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-03-12 21:40:55 +01:00
Yahor Berdnikau fa7b8b1c88 Store loaded artists in persistent file store.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-03-12 21:19:46 +01:00
Yahor Berdnikau 423461c3ba Store loaded indexes in persistent storage.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-03-11 22:02:31 +01:00
Yahor Berdnikau 63715aab18 Add more test for PermanentFileStorage.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-03-11 19:13:01 +01:00
Yahor Berdnikau 1e806e3658 Added cache module to code coverage reports.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-03-11 11:56:38 +01:00
Yahor Berdnikau c49e447240 Add permanent file storage.
It serialize domain objects to byte array and store it to file.
For now it only uses for MusicFolder entity store.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-03-10 22:20:34 +01:00
Yahor Berdnikau ad52e3ad95 Move domain entities to own module.
This allow other modules to depend on them.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-03-10 19:42:28 +01:00
Yahor Berdnikau 4952e1d240 Add new cache module.
This module will be responsible for temporary and
permanent caching of any data.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-02-26 22:03:33 +01:00
Yahor Berdnikau 441f1d9832
Merge pull request #171 from ultrasonic/update-versions
Update versions
2018-02-25 22:40:14 +01:00
Yahor Berdnikau da7c8dee2c Add more build improvements into gradle.properties.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-02-25 22:35:48 +01:00
Yahor Berdnikau 29f2d1eea8 Update detekt to 1.0.0.RC6-3 version.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-02-25 22:23:55 +01:00
Yahor Berdnikau e59acc880e Update ktlint to 0.15.1 version.
Also update gradle plugin to 3.0.1 version.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-02-25 22:19:56 +01:00
Yahor Berdnikau 9b4155c06f Update gradle to 4.5.1 version.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-02-25 22:16:30 +01:00
Yahor Berdnikau 5e716f5026 Update kotlin to 1.20.21 version.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-02-25 22:11:47 +01:00
Yahor Berdnikau 4c85213c6c
Merge pull request #169 from ultrasonic/convert_entities_to_data_class
Convert domain entities to kotlin
2018-02-24 23:07:41 +01:00
Yahor Berdnikau 85111dd47d Fix crash on entry unboxing.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-02-24 23:04:07 +01:00
Yahor Berdnikau 12c68d9ebf Fix adapter using toString() method for entry.
Replace it to use getName().

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-02-24 23:03:50 +01:00
Yahor Berdnikau 4ab4351cb4 Enable code coverage for domain package.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-02-24 22:27:23 +01:00
Yahor Berdnikau 182eb7ec3b Fix unit tests.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-02-24 22:19:34 +01:00
Yahor Berdnikau a11037ecf1 Fix ChatMessage was not data class.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-02-24 22:19:17 +01:00
Yahor Berdnikau 440eb4067d Fix missing empty line in the end.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-02-22 22:47:41 +01:00
Yahor Berdnikau 1fe6da5f46 Convert MusicDirectory domain entity to kotlin.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-02-22 22:45:28 +01:00
Yahor Berdnikau 47d5a4dba1 Convert Artist domain entity to kotlin.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-02-22 22:30:39 +01:00
Yahor Berdnikau 3e3d39e2cd Convert Bookmark domain entity to kotlin.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-02-22 22:23:48 +01:00
Yahor Berdnikau 817122c16f Convert ChatMessage domain entity to kotlin.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-02-22 22:18:23 +01:00
Yahor Berdnikau ea5fd0d1be Convert Genre domain entity to kotlin.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-02-22 21:57:10 +01:00
Yahor Berdnikau 9ddd68f941 Convert Indexes domain entity to kotlin.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-02-22 21:46:53 +01:00
Yahor Berdnikau 21b3fcc77c Convert JukeboxStatus domain entity to kotlin.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-02-22 21:36:58 +01:00
Yahor Berdnikau 3dd7e531b9 Convert Lyrics domain entity to kotlin.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-02-22 21:26:40 +01:00
Yahor Berdnikau a1f2132a17 Convert MusicFolder domain entity to kotlin.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-02-22 21:18:24 +01:00
Yahor Berdnikau b3d70f8745 Convert Playlist domain enum to kotlin.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-02-22 21:16:41 +01:00
Yahor Berdnikau 5265e58d47 Convert Playlist domain entity to kotlin.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-02-22 21:15:32 +01:00
Yahor Berdnikau 6d6380ca96 Remove unused PodcastEpisode entity.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-02-22 20:53:16 +01:00
Yahor Berdnikau 257a014b18 Migrate PodcastsChannel entity to kotlin.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-02-21 22:38:13 +01:00
Yahor Berdnikau 82e265fda9 Migrate RepeatMode enum to kotlin.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-02-21 22:09:34 +01:00
Yahor Berdnikau 773158859e Migrate SearchCriteria entity to kotlin.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-02-21 22:07:11 +01:00
Yahor Berdnikau 8c5944d858 Migrate SearchResult entity to kotlin.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-02-21 22:05:38 +01:00
Yahor Berdnikau 20773761fa Migrate Share entity to kotlin.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-02-21 21:51:40 +01:00
Yahor Berdnikau cb02582740 Migrate UserInfo to Kotlin.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-02-20 22:08:34 +01:00
Yahor Berdnikau 4218698a16 Convert Version class to Kotlin.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-02-20 21:54:53 +01:00
Óscar García Amor bb2c6d5923
Merge pull request #168 from ultrasonic/id
REST_CLIENT_ID simplified
2018-02-20 18:06:31 +01:00
Óscar García Amor 75e6e70094 REST_CLIENT_ID simplified
From UltraSonic%20for%20Android to simply Ultrasonic

Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2018-02-20 17:55:24 +01:00
Yahor Berdnikau ef4d606db2 Move all converters to domain package.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-02-17 20:36:19 +01:00
Yahor Berdnikau 797e6ffbad
Merge pull request #166 from ultrasonic/readme
Added a list of known (not our) bugs. Closes #157
2018-02-17 15:35:34 +01:00
Yahor Berdnikau ac557acdbe
Merge branch 'master' into readme 2018-02-17 11:53:57 +01:00
Óscar García Amor 4755fd0db9 Added a list of known (not our) bugs. Closes #157
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2018-02-15 20:28:07 +01:00
Óscar García Amor 4d481707df
Merge pull request #163 from ultrasonic/develop
New 2.2.2 release
2018-02-12 16:59:54 +01:00
Yahor Berdnikau 6951f653bd
Merge pull request #164 from ultrasonic/bug/fix-offline-mode
Fix app doesn't handle right transcoded suffix.
2018-02-11 22:48:25 +01:00
Yahor Berdnikau b080c62843 Fix app doesn't handle right transcoded suffix.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-02-11 22:44:53 +01:00
Yahor Berdnikau 0e24aa691d
Merge branch 'master' into develop 2018-02-10 20:22:23 +01:00
Yahor Berdnikau e85aa610ab Bump version to 2.2.2 for new release.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-02-10 20:15:53 +01:00
Yahor Berdnikau 90ea207e36
Merge pull request #162 from ultrasonic/bug/fix-cache-dir-not-created
Fix wrong handling empty strings.
2018-02-10 20:14:27 +01:00
Yahor Berdnikau acde5b9473 Fix wrong support for empty cover art url.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-02-10 20:11:17 +01:00
Yahor Berdnikau 009567c83e Fix app may use wrong folder to store music.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-02-10 20:08:57 +01:00
Yahor Berdnikau 2f97d0fe16
Merge pull request #161 from ultrasonic/bug/stray-symbol-in-mp3-list
Bug/stray symbol in mp3 list
2018-02-08 22:03:24 +01:00
Yahor Berdnikau b6c14c7541 Fix stray ">" in songs list.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-02-08 22:00:22 +01:00
Óscar García Amor e76764bb86
Merge pull request #155 from ultrasonic/fix-ci
Fix CI autobuild after apply #154 changes
2018-01-29 21:08:29 +01:00
Óscar García Amor cef2b2ad49 Fix CI autobuild after apply #154 changes
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2018-01-29 21:04:04 +01:00
Yahor Berdnikau 3cb6acee56
Merge pull request #154 from ultrasonic/fix-fdroid
Fix F-Droid
2018-01-29 20:09:02 +01:00
Óscar García Amor e140e7fbcd Set versions into dependencies.gradle
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2018-01-29 17:48:34 +01:00
Óscar García Amor 60b0374952 Revert "Add versioning plugin."
This reverts commit c84482729d.
2018-01-29 16:26:08 +01:00
Yahor Berdnikau 559364000e
Merge pull request #152 from ultrasonic/autobuild
Added Circle CI automatic builds
2018-01-28 15:03:21 +01:00
Óscar García Amor 6fec8edfb6 Improve Circle CI automatic builds
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2018-01-25 22:22:42 +01:00
Yahor Berdnikau b3df7db0fc
Merge pull request #150 from ultrasonic/transifex
Added Transifex automation for localizations
2018-01-25 21:10:51 +01:00
Óscar García Amor 23d4715ff1 Added Circle CI automatic builds
Now when adding a new tag, Circle CI automagically build a release signed apk and add it to assets.

Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2018-01-25 18:46:23 +01:00
Óscar García Amor 769b298415 Push translations only on develop and master
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2018-01-25 08:57:19 +01:00
Óscar García Amor 925d58c18f
Merge pull request #151 from ultrasonic/gitignore
Added release folder to .gitignore
2018-01-24 17:33:20 +01:00
Óscar García Amor 511c5482c1 Added release folder to .gitignore
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2018-01-24 17:30:01 +01:00
Óscar García Amor 143a4a2f37 Fix plurals in source file for translations
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2018-01-24 13:27:15 +01:00
Óscar García Amor fcc4ddca55 Fix language files to Transifex
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2018-01-24 13:20:16 +01:00
Óscar García Amor 4a8f77a65c Added Transifex automation for localizations
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2018-01-24 13:13:13 +01:00
Óscar García Amor 5ba8999612
Merge pull request #149 from ultrasonic/develop
Merge contributing changes in master
2018-01-24 11:09:58 +01:00
Óscar García Amor bff6d8d032
Merge pull request #148 from ultrasonic/contributing
Added translations section in contributing
2018-01-24 11:07:48 +01:00
Óscar García Amor 3c21631f30 Added translations section in contributing
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2018-01-24 11:06:45 +01:00
Óscar García Amor 3e2db11e2c
Merge pull request #147 from ultrasonic/version-code
Version code
2018-01-23 22:19:41 +01:00
Óscar García Amor 0aa5c71d59 Bump version code
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2018-01-23 22:17:55 +01:00
Óscar García Amor 1af66b5c3d
Merge pull request #146 from ultrasonic/develop
New 2.2.1 release
2018-01-23 22:01:53 +01:00
Yahor Berdnikau 716f184f48 Bump version to 2.2.1 for new bugfix release.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-01-23 21:59:04 +01:00
Óscar García Amor 871082aea3 Madsonic v 5.1.xxx fix (#145)
* Fixes #129

Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2018-01-23 21:07:12 +01:00
Yahor Berdnikau c140c6d1c9
Merge pull request #143 from ultrasonic/version-code
Bump version code
2018-01-22 16:26:28 +01:00
Óscar García Amor 6da5a23b1b Bump version code
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2018-01-22 15:08:33 +01:00
Óscar García Amor cae5635833
Merge pull request #142 from ultrasonic/develop
New release 2.2.0
2018-01-22 14:50:44 +01:00
Yahor Berdnikau 565ae00089
Merge pull request #141 from ultrasonic/better-feedback-on-certificate-error
Add more specific error message related to ssl connection problems.
2018-01-21 21:05:01 +01:00
Yahor Berdnikau efe1efdda6 Add more specific error message related to ssl connection problems.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-01-21 21:01:21 +01:00
Yahor Berdnikau 9389af5a79
Merge pull request #140 from ultrasonic/special-case-for-ldap-user
Special case for ldap user
2018-01-21 19:34:00 +01:00
Yahor Berdnikau ae6b73fab4 Add setting to force using old-authorization for LDAP users.
Subsonic api doesn't support new md5 based authorization for LDAP users.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-01-21 18:15:02 +01:00
Yahor Berdnikau 7830ed3dbf Add flag to force using hex password authentication.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-01-21 18:06:41 +01:00
Yahor Berdnikau cd54632339
Merge pull request #138 from ultrasonic/downgrade-api-to-22
Downgrade api to 22
2018-01-20 13:05:14 +01:00
Yahor Berdnikau 365bd96f56 Remove unnecessary cast.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-01-20 12:53:26 +01:00
Yahor Berdnikau 1cdf76db8b Add some several gradle optimizations.
Enabled parallel build, configure on demand, caching output of tasks.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-01-20 12:52:17 +01:00
Yahor Berdnikau 88053c0ccc Change ci image api to 27.
To be on the same value with compile sdk.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-01-20 11:28:34 +01:00
Yahor Berdnikau 697a689632 Decrease target sdk version to 22.
This is required for a new release as runtime permissions support is not yet implemented.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-01-20 11:27:34 +01:00
Yahor Berdnikau d2f292852d
Merge pull request #136 from ultrasonic/error-parser-stability-improvments
Error parser stability improvments
2018-01-20 11:15:56 +01:00
Yahor Berdnikau 749c257731 Replace generic error empty message with custom message.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-01-20 11:12:00 +01:00
Yahor Berdnikau 0b5cc5d3f3 Make subsonic error parser more fail safe.
Now it should parse more malformed error json, though having "code" field is still mandatory.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-01-20 10:56:58 +01:00
Yahor Berdnikau b38f4894c3
Merge pull request #132 from ultrasonic/fix-api-error-parsing
Fix api error parses always in generic error.
2018-01-13 11:01:11 +01:00
Yahor Berdnikau fff0762e08 Add more test for error responses.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-01-13 10:54:30 +01:00
Yahor Berdnikau 3e1dbe3476 Fix api error parses always in generic error.
Now it parses to right error representation. Also fix that right
exception for error is not thrown on api call.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-01-13 10:19:42 +01:00
Yahor Berdnikau fa03cf3881
Merge pull request #127 from ultrasonic/add-generic-error-message
Append generic error message to displayed text.
2018-01-08 19:53:29 +01:00
Yahor Berdnikau 1e7f2989eb Append generic error message to displayed text.
As generic error can provide different reasons, it is worth to add received message to displayed error text.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-01-08 19:45:55 +01:00
Yahor Berdnikau 86fcbb5650
Merge pull request #126 from ultrasonic/better-error-handling
Better error handling
2018-01-07 13:33:01 +01:00
Yahor Berdnikau ada94dc24f Change to handle json parse exception instead of xml.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-01-07 13:30:37 +01:00
Yahor Berdnikau 27465a086d Add displaying more specific api errors.
Now app will show more specific api errors to user.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2018-01-07 13:17:53 +01:00
Yahor Berdnikau deaa75938b
Merge pull request #115 from ultrasonic/resume-playback-headphones
Add option to resume playback on headphones insertion.
2017-12-28 22:03:56 +01:00
Yahor Berdnikau e96eae29d5 Add option to resume playback on headphones insertion.
This is disabled by default and should be enabled in app settings.
Playback resume only happened when app is not in Jukebox mode and
playback is paused.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-12-28 22:02:09 +01:00
Yahor Berdnikau b5aae0c01c
Merge pull request #113 from ultrasonic/add-support-api-implementations
Add supported (tested) subsonic api implementations in README.
2017-12-27 22:30:31 +01:00
Yahor Berdnikau 70c2e5213c Fix checkstyle problem.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-12-27 22:28:36 +01:00
Yahor Berdnikau ea3d36110d Add supported (tested) subsonic api implementations in README.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-12-27 22:25:59 +01:00
Yahor Berdnikau c9bc3df543 Merge branch 'master' into develop 2017-12-27 22:01:10 +01:00
Yahor Berdnikau 3379e491dd
Merge pull request #112 from ultrasonic/add-versioning-plugin
Add versioning plugin.
2017-12-27 21:43:18 +01:00
Yahor Berdnikau c84482729d Add versioning plugin.
This will allow to easy automate auto publishing of the app.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-12-27 21:38:40 +01:00
Yahor Berdnikau bd69a3a231
Merge pull request #110 from ultrasonic/readme
Detailed in README.md the supported API version
2017-12-27 17:42:03 +01:00
Óscar García Amor 48e2e5d983 Detailed in README.md the supported API version 2017-12-27 17:18:57 +01:00
Óscar García Amor bed26a3705
Merge pull request #105 from ultrasonic/allow-self-signed-certificates
Allow self signed certificates
2017-12-26 19:40:06 +01:00
Óscar García Amor 6b6c8a045f Updated versionCode and versionName
Signed-off-by: Óscar García Amor <ogarcia@connectical.com>
2017-12-26 19:35:25 +01:00
Óscar García Amor 7451ee2d19 Fix spanish translation 2017-12-26 19:17:53 +01:00
Yahor Berdnikau 592ab16b94 Add setting to server config to allow self-signed certificates.
It is disabled by default.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-12-26 12:34:52 +01:00
Yahor Berdnikau 1333534988 Allow to use self-signed certificates.
By default OkHttpClient will not allow self-signed certificates, but
some of app users use them.

This is disabled by default, should be enabled explicitly.

It also allows any CN in self-signed certificate.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-12-26 12:34:16 +01:00
Yahor Berdnikau 0a67f175fc
Merge pull request #101 from ultrasonic/api-23
Api 23
2017-12-21 11:56:20 +01:00
Yahor Berdnikau ae3ef770c7 Regenerate lint baseline.
Also have to fix some of the lint issues, for some reason they don't
get into baseline.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-12-21 11:53:15 +01:00
Yahor Berdnikau a86925d0b8 Delete old api resources.
Delete resources that was dedicated to pre 14 api level.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-12-21 11:37:39 +01:00
Yahor Berdnikau b5c0fa10f3 Update kotlin to 1.2.10 version.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-12-21 10:58:43 +01:00
Yahor Berdnikau 07802e9206 Update KtLint to 0.14.0 version.
Also fix style problems.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-12-21 10:58:43 +01:00
Yahor Berdnikau 11c1b92098 Update Detekt to 1.0.0.RC6 version.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-12-21 10:58:43 +01:00
Yahor Berdnikau c76ffe4db7 Update android plugin to 3.0.1 version.
Yay!

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-12-21 10:58:43 +01:00
Yahor Berdnikau 0943276a50 Update gradle wrapper to 4.4.1 version.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-12-21 10:58:41 +01:00
Yahor Berdnikau f528ad8845 Bump target api level to 23.
Also set compile sdk level to 27 and android support libs version to
23.4.0.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-12-21 10:54:01 +01:00
Yahor Berdnikau 2e9935e182 Remove usage of HttpRequest from StreamProxy.
Apache http client classes was removed since api 23. And actually this
HttpRequest doesn't required here at all.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-12-21 10:53:23 +01:00
Yahor Berdnikau ed78fce31c Remove deprecated HttpClient.
Apache HttpClient package was removed from Android since api 23.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-12-21 10:53:23 +01:00
Yahor Berdnikau c0fe52b2b3 Replace removed FloatMath with Math class.
FloatMath was removed since api 23.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-12-21 10:53:23 +01:00
Óscar García Amor 4f44977e55
Merge pull request #89 from ultrasonic/develop
New 2.0.0 release
2017-12-18 14:51:55 +01:00
Óscar García Amor 7aba11bb03
Merge pull request #97 from ultrasonic/update-version
Updated versionCode and versionName
2017-12-18 14:48:14 +01:00
Óscar García Amor 047b67164c Updated versionCode and versionName 2017-12-18 14:45:05 +01:00
Yahor Berdnikau 2150a548f5
Merge pull request #96 from ultrasonic/add-store-badges
Update with store badges instead of links.
2017-12-16 22:41:22 +01:00
Yahor Berdnikau d12dd58aaa Update with store badges instead of links.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-12-16 22:40:07 +01:00
Yahor Berdnikau 0bda4476ee
Merge pull request #95 from ultrasonic/update-contributing
Update doc with what branch use by default for PR.
2017-12-16 22:29:55 +01:00
Yahor Berdnikau 385790d601 Update doc with what branch use by default for PR.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-12-16 22:28:31 +01:00
Yahor Berdnikau 4715deb159
Merge pull request #94 from ultrasonic/bug/entities-ids
Bug/entities ids
2017-12-16 22:22:54 +01:00
Yahor Berdnikau aadb14eb4e Fix service try download covert art for empty id.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-12-16 22:20:44 +01:00
Yahor Berdnikau b2384a43ce Update api definition to use String type for ids.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-12-16 22:14:01 +01:00
Yahor Berdnikau 5bf5af2842 Change MusicDirectoryChild ids type to String.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-12-16 21:28:18 +01:00
Yahor Berdnikau ad20064d79 Change Share id type to String.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-12-16 20:54:43 +01:00
Yahor Berdnikau 9cb6a5c4e9 Change PodcastChannel id type to String.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-12-16 20:51:07 +01:00
Yahor Berdnikau 434d07c4a3 Change Playlist id type to String.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-12-16 20:47:00 +01:00
Yahor Berdnikau e62e5c553c Change MusicDirectory ids type to String.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-12-16 20:43:39 +01:00
Yahor Berdnikau f2d838cb1c Change album ids type to String.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-12-16 20:10:25 +01:00
Yahor Berdnikau a694f895e9 Change artist id type to String.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-12-16 19:50:57 +01:00
Yahor Berdnikau 66d7973c5a Replace type of id property to String.
Some api implementations are using UUID string for ids.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-12-12 21:08:49 +01:00
Yahor Berdnikau 46cf8a71c2
Merge pull request #88 from ultrasonic/update-readme
Update project README
2017-12-10 13:52:59 +01:00
Yahor Berdnikau 7790e3bca9 Update project README
This reflects changes in the project status. Added Contributing guide and
rewrite new issue template.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-12-10 13:44:52 +01:00
Yahor Berdnikau 0516ebcc20
Merge pull request #87 from ultrasonic/api-versions-check
Api versions check
2017-12-10 10:54:12 +01:00
Yahor Berdnikau 3fddef0ec5 Check call if it supported by current server version.
Add a api wrapper that checks if current protocol version is supported
for this call and fail fast if not.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-12-10 10:48:41 +01:00
Yahor Berdnikau 336f505ba5 Replace ServerTooOldException with more proper ApiNotSupportedException. 2017-12-03 14:14:01 +01:00
Yahor Berdnikau 491d8423c4
Merge pull request #86 from ultrasonic/handle-server-versions
Adapt client to server version
2017-12-02 21:58:37 +01:00
Yahor Berdnikau d384bcc3c5 Update dynamically client version.
Now subsonic api client will update dynamically to the supported server
api version when it doing the requests.
2017-12-02 21:51:26 +01:00
Yahor Berdnikau e838750ee2 Add proxy password interceptor.
It passes request chain either to hex password interceptor or
to md5+salt interceptor depending on current protocol version.
2017-12-02 21:51:26 +01:00
Yahor Berdnikau 0c5ac61402 Add 1.16.0 subsonic version. 2017-12-02 21:51:26 +01:00
Yahor Berdnikau c76d25e1ba Add version interceptor.
This interceptor add version param to request and peeks into response
to parse server version.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-12-02 21:51:26 +01:00
Yahor Berdnikau 1c56d6459b Fix subsonic accepts only lowercase md5 password hash.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-12-02 11:48:23 +01:00
Yahor Berdnikau 0deed54a9e
Merge pull request #82 from ultrasonic/introduce-auth-interceptors
Extract password param providing in separate interceptors.
2017-11-22 22:01:52 +01:00
Yahor Berdnikau 6b950f7b28 Extract password param providing in separate interceptors.
Added interceptor for api version before 1.12.0 and after.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-22 21:56:16 +01:00
Yahor Berdnikau b9cfc0ed6d
Merge pull request #81 from ultrasonic/add-stream-url
Add stream url
2017-11-21 21:33:52 +01:00
Yahor Berdnikau c4f28280f9 Use getStreamUrl() method for video urls.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-21 21:29:24 +01:00
Yahor Berdnikau 6503ce2e4c Add method to get final stream url.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-21 21:29:24 +01:00
Yahor Berdnikau 1607f923b6
Merge pull request #78 from ultrasonic/update-get-video-url
Update get video url
2017-11-19 22:27:12 +01:00
Yahor Berdnikau d1256d2b77 Remove unused Apache http client.
Finally!

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-19 22:13:46 +01:00
Yahor Berdnikau 4b789e4c88 Disable getVideoUrl() method.
This method uses some assuptions on endpoint urls.
The right way is to use stream() api call to get video stream.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-19 22:10:34 +01:00
Yahor Berdnikau 7f5e04ebb2
Merge pull request #76 from ultrasonic/add-get-avatar
Add get avatar
2017-11-19 21:50:57 +01:00
Yahor Berdnikau 91d93b713d Remove unused methods.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-19 21:47:58 +01:00
Yahor Berdnikau 662e99ff5a Use new getAvatar() api call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-19 21:40:27 +01:00
Yahor Berdnikau f2ce22ef08 Fix response check NPE
Fix response check doens't take into account that body will be null
if response is not successfull.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-19 21:39:13 +01:00
Yahor Berdnikau 52545bc714 Add getAvatar() call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-19 21:19:33 +01:00
Yahor Berdnikau 3e5159a1a2
Merge pull request #75 from ultrasonic/add-update-share
Add update share
2017-11-19 15:53:43 +01:00
Yahor Berdnikau 48f8d35e4f Use new api updateShare() call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-19 15:51:15 +01:00
Yahor Berdnikau 22ec570b69 Add updateShare() call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-19 15:25:31 +01:00
Yahor Berdnikau 81bb21c841
Merge pull request #74 from ultrasonic/add-delete-share
Add delete share
2017-11-19 15:04:34 +01:00
Yahor Berdnikau b1f7e7a14c Use new api deleteShare() call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-19 14:41:31 +01:00
Yahor Berdnikau a1d5450515 Add deleteShare() call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-19 14:36:41 +01:00
Yahor Berdnikau fe12c440e7
Merge pull request #73 from ultrasonic/add-get-videos
Add get videos
2017-11-19 14:01:15 +01:00
Yahor Berdnikau 51ed43978b Use new api getVideos() call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-19 13:58:48 +01:00
Yahor Berdnikau d26b6dce7d Add getVideos() call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-19 13:51:20 +01:00
Yahor Berdnikau c5bf541c45
Merge pull request #72 from ultrasonic/add-delete-bookmark
Add delete bookmark
2017-11-18 22:21:34 +01:00
Yahor Berdnikau a9516ecab6 Use new api deleteBookmark() call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-18 22:19:00 +01:00
Yahor Berdnikau ca2ffc7279 Add deleteBookmark() call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-18 22:14:48 +01:00
Yahor Berdnikau c6ad07f56f
Merge pull request #71 from ultrasonic/add-create-bookmark
Add create bookmark
2017-11-18 22:04:42 +01:00
Yahor Berdnikau 445c3a4944 Use new api createBookmark() call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-18 22:01:33 +01:00
Yahor Berdnikau 010d7679b9 Add createBookmark() call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-18 21:55:07 +01:00
Yahor Berdnikau f583006ad6
Merge pull request #70 from ultrasonic/add-get-bookmarks
Add get bookmarks
2017-11-18 21:39:37 +01:00
Yahor Berdnikau 59ff48860a Use new api getBookmarks() call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-18 21:37:11 +01:00
Yahor Berdnikau 6b2a682646 Add helper functions to convert api Bookmark entity to domain entity.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-18 21:34:03 +01:00
Yahor Berdnikau 0cc0bbedaf Add getBookmarks() api call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-18 21:33:02 +01:00
Yahor Berdnikau b4e18f9bfb
Merge pull request #69 from ultrasonic/add-chat-message
Add chat message
2017-11-16 22:25:26 +01:00
Yahor Berdnikau 4d2d7b9318 Use new api addChatMessage() call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-16 22:20:25 +01:00
Yahor Berdnikau c618538b14 Add addChatMessage() call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-16 22:18:13 +01:00
Yahor Berdnikau 87a28990d7
Merge pull request #68 from ultrasonic/update-ktlint
Update ktlint to 0.12.1 version.
2017-11-16 22:07:51 +01:00
Yahor Berdnikau c917bcb1a6 Update ktlint to 0.12.1 version.
Also updated ktlint-gradle to 2.3.0 version. Added ktlint reports to
circle CI.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-16 22:04:38 +01:00
Yahor Berdnikau 7c3d19b048
Merge pull request #67 from ultrasonic/update-detekt
Update detekt to 1.0.0.RC5-4 version.
2017-11-16 21:55:16 +01:00
Yahor Berdnikau f7b1140b2c Update detekt to 1.0.0.RC5-4 version.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-16 21:49:53 +01:00
Yahor Berdnikau 2cfca3ff26
Merge pull request #66 from ultrasonic/update-gradle
Update gradle wrapper to 4.3.1 version.
2017-11-16 21:43:43 +01:00
Yahor Berdnikau deb734c8e5 Update gradle wrapper to 4.3.1 version.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-16 21:40:35 +01:00
Yahor Berdnikau 52f63cb2b9
Merge pull request #65 from ultrasonic/add-get-chat-messages
Add get chat messages
2017-11-16 21:36:55 +01:00
Yahor Berdnikau b6f9c733bc Delete unused ChatMessageParser.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-16 21:34:22 +01:00
Yahor Berdnikau 74bf89ef26 Use new api getChatMessages() call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-16 21:33:04 +01:00
Yahor Berdnikau 6c1039126e Add converter function for ChatMessage entity to domain entity.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-16 21:32:36 +01:00
Yahor Berdnikau 9cecebb314 Add getChatMessages() call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-16 21:19:24 +01:00
Yahor Berdnikau f1639bab48 Delete unused parser.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-15 22:05:52 +01:00
Yahor Berdnikau 59609c5125
Merge pull request #64 from ultrasonic/add-get-user
Add get user
2017-11-15 22:02:18 +01:00
Yahor Berdnikau e537b7ae1b Use new api getUser() call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-15 21:59:49 +01:00
Yahor Berdnikau 2402ed6a50 Add converter from api User entity to domain entity.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-15 21:56:01 +01:00
Yahor Berdnikau 6b74a3e563 Add getUser api call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-14 22:46:51 +01:00
Yahor Berdnikau 69f68460de
Merge pull request #63 from ultrasonic/update-kotlin
Update kotlin to 1.1.60 version.
2017-11-14 22:27:31 +01:00
Yahor Berdnikau 1fbcddc233 Update kotlin to 1.1.60 version.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-14 22:23:18 +01:00
Yahor Berdnikau 200a61fedc
Merge pull request #62 from ultrasonic/add-get-songs-by-genre
Add get songs by genre
2017-11-14 22:17:01 +01:00
Yahor Berdnikau 3b91f41cbe Use new api getSongsByGenre call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-14 22:12:23 +01:00
Yahor Berdnikau 5ea9eb7818 Increase default read timeout to 60 sec.
Default Okhttp read timeout is 10 sec, and as subsonic servers may be
not fast, better to increase timeout.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-14 22:11:03 +01:00
Yahor Berdnikau 10e25e8597 Add getSongsByGenre api call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-14 21:57:28 +01:00
Yahor Berdnikau 457181e074
Merge pull request #61 from ultrasonic/add-get-genres
Add get genres
2017-11-12 00:06:33 +01:00
Yahor Berdnikau 579accb06c Use new api getGenres call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-12 00:00:42 +01:00
Yahor Berdnikau d693971baf Add helper functions to convert api Genre to domain entity.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-12 00:00:28 +01:00
Yahor Berdnikau 1502c4c9c8 Add getGenres app call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-12 00:00:11 +01:00
Yahor Berdnikau 1907668c64
Merge pull request #60 from ultrasonic/add-create-share
Add create share
2017-11-11 20:36:06 +01:00
Yahor Berdnikau c6c640f0cf Use new api createShare call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-11 20:31:20 +01:00
Yahor Berdnikau 1012e41620 Add createShare api call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-11 20:31:20 +01:00
Yahor Berdnikau b4145a216a
Merge pull request #59 from ultrasonic/add-get-shares
Add get shares
2017-11-10 22:01:50 +01:00
Yahor Berdnikau 04df5b20da Use new api getShares call in RESTMusicService.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-10 22:00:10 +01:00
Yahor Berdnikau 3bbd1fb16b Add methods to convert api share entity to domain entity.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-10 22:00:10 +01:00
Yahor Berdnikau d5cdc18174 Add getShares call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-10 21:15:36 +01:00
Yahor Berdnikau 6e05dc7c40
Merge pull request #58 from ultrasonic/add-update-jukebox
Add update jukebox
2017-11-07 22:17:25 +01:00
Yahor Berdnikau db73978596 Use new subsonic api jukebox control method.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-07 22:03:52 +01:00
Yahor Berdnikau 17aaa0f87f Add JukeboxStatus converter to domain entity.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-07 21:57:43 +01:00
Yahor Berdnikau 947a1ce3b5 Add jukebox control call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-07 21:26:44 +01:00
Yahor Berdnikau 84e59a3581
Merge pull request #57 from ultrasonic/add-get-download-stream
Add get download stream
2017-11-05 22:25:00 +01:00
Yahor Berdnikau 3e2529bd25 Use new subsonic api stream call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-05 22:21:25 +01:00
Yahor Berdnikau ba412721ac Add stream call.
Also introduced helper method in SubsonicApiClient that handles error
cases.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-05 22:21:25 +01:00
Yahor Berdnikau c8c8766b55 Increase read timeout.
When range interceptor modifies request it also increases read timeout,
that allows server to do transcoding of the response and skip bytes
to offset value.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-11-05 22:21:25 +01:00
Yahor Berdnikau 72333f245f Add Range header modifier.
Add interceptor that modifies call "Range" header. It changes header
value to "bytes=value-".
2017-11-05 18:44:31 +01:00
Yahor Berdnikau be75511bb7 Update okhttp to 3.9.0 version.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-10-19 22:27:45 +02:00
Yahor Berdnikau 74c5123255 Merge pull request #56 from ultrasonic/add-get-cover-art
Add get cover art
2017-10-18 22:37:34 +02:00
Yahor Berdnikau 4ef8507353 Use new subsonic api getCoverArt call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-10-18 22:32:30 +02:00
Yahor Berdnikau 48e6788224 Add method to get cover art.
As this call should return byte stream: I've introduced helper method
in client to do the actual call and parse possible json error response.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-10-17 21:48:37 +02:00
Yahor Berdnikau d08beff1f4 Merge pull request #55 from ultrasonic/update-gradle
Update gradle to 4.2.1 version.
2017-10-07 21:03:00 +02:00
Yahor Berdnikau 351f51df28 Update gradle to 4.2.1 version.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-10-07 20:59:16 +02:00
Yahor Berdnikau 436ecc3aee Merge pull request #54 from ultrasonic/update-kotlin
Update kotlin to 1.1.51 version.
2017-10-07 20:54:51 +02:00
Yahor Berdnikau bd7e7416a6 Update kotlin to 1.1.51 version.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-10-07 20:46:53 +02:00
Yahor Berdnikau c66aa55d7a Merge pull request #53 from ultrasonic/add-get-starred-2
Add get starred 2
2017-09-16 23:02:28 +02:00
Yahor Berdnikau cc531698e5 Use new subsonic api getSearch2 call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-09-16 22:57:39 +02:00
Yahor Berdnikau f85759eb58 Add getStarred2() call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-09-16 22:57:39 +02:00
Yahor Berdnikau 19f5dde397 Merge pull request #52 from ultrasonic/add-get-starred
Add get starred
2017-09-16 22:31:25 +02:00
Yahor Berdnikau a6bb02fc77 Use new subsonic api getStarred call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-09-16 22:27:30 +02:00
Yahor Berdnikau bad5cf5a9a Add getStarred call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-09-16 22:19:17 +02:00
Yahor Berdnikau af72475be5 Merge pull request #51 from ultrasonic/add-get-random-songs
Add get random songs
2017-09-16 21:00:21 +02:00
Yahor Berdnikau d848fa2669 Use new subsonic api getRandomSongs call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-09-16 20:57:52 +02:00
Yahor Berdnikau 0abc71cf9f Add getRandomSongs call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-09-16 20:47:11 +02:00
Yahor Berdnikau 69299c40df Merge pull request #50 from ultrasonic/add-get-album-list-2
Add get album list 2
2017-09-16 20:11:35 +02:00
Yahor Berdnikau 2e90581fb5 Use new subsonic api getAlbumList2 call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-09-16 20:06:30 +02:00
Yahor Berdnikau bb95d04dc5 Add method to convert list of Albums to MusicDirectory Entry list.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-09-16 20:02:44 +02:00
Yahor Berdnikau 14fac18978 Add getAlbumList2 request.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-09-16 19:56:38 +02:00
Yahor Berdnikau 0a22f7bcc7 Merge pull request #49 from ultrasonic/add-get-album-list
Add get album list
2017-09-14 22:39:20 +02:00
Yahor Berdnikau 69ac8551c6 Use new subsonic api getAlbumList() method.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-09-14 22:34:30 +02:00
Yahor Berdnikau 8e895685fc Add method to map string type to AlbumListType enum.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-09-14 22:32:24 +02:00
Yahor Berdnikau 645728c0f7 Add converting MusicDirectoryChild list to domain entities list.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-09-14 22:01:55 +02:00
Yahor Berdnikau 2d12aea79f Enable setting to not fail parsing on unknown field.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-09-14 21:51:56 +02:00
Yahor Berdnikau 046baf0ffe Add missing user rating and average rating to MusicDirectoryChild.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-09-14 21:50:20 +02:00
Yahor Berdnikau cd617c7dd8 Add getAlbumList call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-09-13 22:45:10 +02:00
Yahor Berdnikau a5d7e47dfa Merge pull request #48 from ultrasonic/add-scrobble
Add scrobble
2017-09-04 21:29:05 +02:00
Yahor Berdnikau 71b7948908 Use new subsonic api scrobble call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-09-04 21:25:56 +02:00
Yahor Berdnikau 9892805517 Add scrobble call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-09-04 21:20:22 +02:00
Yahor Berdnikau 7143dc4db1 Merge pull request #47 from ultrasonic/add-get-lyrics
Add get lyrics
2017-09-03 22:26:04 +02:00
Yahor Berdnikau 1bb1fc0aa0 Use new subsonic api getLyrics() call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-09-03 22:24:29 +02:00
Yahor Berdnikau 290eb95246 Add converting subsonic api Lyrics entity to domain entity.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-09-03 22:23:32 +02:00
Yahor Berdnikau 9844fb1282 Add getLyrics call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-09-03 22:09:13 +02:00
Yahor Berdnikau 59ed898b23 Merge pull request #46 from ultrasonic/add-get-podcasts-episodes
Add get podcasts episodes
2017-09-03 21:43:36 +02:00
Yahor Berdnikau ba0152bbca Use new subsonic api getPodcasts call in RestMusicService.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-09-03 21:42:17 +02:00
Yahor Berdnikau 636968f03c Add getPodcasts call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-09-03 16:10:48 +02:00
Yahor Berdnikau 4b1d6e9827 Merge pull request #44 from ultrasonic/add-update-playlist
Add update playlist
2017-09-03 10:38:14 +02:00
Yahor Berdnikau 0e8c853dbf Use new subsonic api updatePlaylist call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-09-03 10:35:04 +02:00
Yahor Berdnikau 8bf9399e48 Add updatePlaylist() call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-09-03 10:25:36 +02:00
Yahor Berdnikau 02902023da Merge pull request #43 from ultrasonic/add-delete-playlist
Add delete playlist
2017-09-02 21:16:12 +02:00
Yahor Berdnikau 9de41524e9 Use new subsonic api deletePlaylist call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-09-02 21:12:37 +02:00
Yahor Berdnikau e09476daea Add deletePlaylist() call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-09-02 21:07:19 +02:00
Yahor Berdnikau 77833bf4d9 Merge pull request #42 from ultrasonic/add-create-playlist
Add create playlist
2017-09-02 20:58:42 +02:00
Yahor Berdnikau fcb5210a3b Use new subsonic api call to create playlist.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-09-02 20:51:10 +02:00
Yahor Berdnikau bb64b9e3ca Add createPlaylist api call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-09-02 20:42:55 +02:00
Yahor Berdnikau f55f19a3b8 Merge pull request #41 from ultrasonic/split-converter-functions
Split new subsonic api converting extension functions into different …
2017-09-02 19:42:07 +02:00
Yahor Berdnikau f7498409b9 Split new subsonic api converting extension functions into different files.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-09-02 19:40:32 +02:00
Yahor Berdnikau 8a9644b5dd Merge pull request #40 from ultrasonic/add-get-playlists
Add get playlists
2017-09-01 22:54:00 +02:00
Yahor Berdnikau 8bcebcee46 Use new subsonic api to get playlists.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-09-01 22:51:05 +02:00
Yahor Berdnikau d82ff15f57 Add converting subsonic api Playlist entity to domain entity.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-09-01 22:46:37 +02:00
Yahor Berdnikau e4728af320 Add getPlaylists api call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-09-01 22:46:10 +02:00
Yahor Berdnikau 71d1609dd8 Merge pull request #39 from ultrasonic/update-kotlin
Update kotlin to 1.1.4-3 version.
2017-08-30 21:59:16 +02:00
Yahor Berdnikau 7210eb448b Update kotlin to 1.1.4-3 version.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-30 21:57:17 +02:00
Yahor Berdnikau e1ec4d0c56 Merge pull request #38 from ultrasonic/test-improvements
Use same approach to all integration tests.
2017-08-29 22:27:10 +02:00
Yahor Berdnikau 47012c7909 Use same approach to all integration tests.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-29 22:25:29 +02:00
Yahor Berdnikau 961fccde4e Merge pull request #37 from ultrasonic/add-get-playlist
Add getPlaylist call to subsonic api.
2017-08-27 22:40:55 +02:00
Yahor Berdnikau de0b57f9b8 Use new subsonic api getPlaylist() call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-27 22:36:37 +02:00
Yahor Berdnikau b8b53dc81d Add converting Playlist to MusicDirectoryDomainEntity.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-27 22:31:33 +02:00
Yahor Berdnikau b73cc0f816 Add getPlaylist call to subsonic api.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-27 22:12:23 +02:00
Yahor Berdnikau 35e74a758e Merge pull request #36 from ultrasonic/add-search3
Add new search3 api call.
2017-08-27 13:00:11 +02:00
Yahor Berdnikau a65fbef3be Use new subsonic api search3 call in RESTMusicService.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-27 12:54:21 +02:00
Yahor Berdnikau 0f7a3cdf30 Add converting SearchThreeResult to domain entity.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-27 12:51:50 +02:00
Yahor Berdnikau d97590b346 Add new search3 api call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-27 11:39:38 +02:00
Yahor Berdnikau 9ce47c3be0 Merge pull request #35 from ultrasonic/add-search2
Add search2
2017-08-25 22:33:38 +02:00
Yahor Berdnikau 6649ba806b Use new subsonic api search2 call in RestMusicService.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-25 22:29:30 +02:00
Yahor Berdnikau e730347985 Add converting function from SearchTwoResult to domain SearchResult.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-25 21:57:23 +02:00
Yahor Berdnikau dd115757b6 Add search2 api request.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-25 21:32:36 +02:00
Yahor Berdnikau 9bf0176984 Add function to assert right request param.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-25 21:31:57 +02:00
Yahor Berdnikau 1d35d0c23c Merge pull request #34 from ultrasonic/add-old-search
Add old search
2017-08-24 22:14:15 +02:00
Yahor Berdnikau 383b05e4dc Use new api method for search call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-24 22:04:53 +02:00
Yahor Berdnikau 6bfd091b6b Add function that converts SearchResult to domain entity.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-24 22:04:53 +02:00
Yahor Berdnikau e71d8a09af Increase allowed functions count in detekt config.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-24 22:04:53 +02:00
Yahor Berdnikau 5a20082938 Add search api call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-24 22:04:53 +02:00
Yahor Berdnikau b6e96f6310 Merge pull request #33 from ultrasonic/update-gradle
Update gradle
2017-08-22 20:17:26 +02:00
Yahor Berdnikau bb4de9d065 Migrate subsonic api module to new gradle dependencies system.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-21 22:08:42 +02:00
Yahor Berdnikau a1e59efceb Update gradle to 4.1 version.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-21 21:47:22 +02:00
Yahor Berdnikau 5490a98ecb Merge pull request #32 from ultrasonic/use-new-get-album
Use new get album
2017-08-21 21:32:32 +02:00
Yahor Berdnikau 2d8d98696c Use new getAlbum() subsonic api call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-21 21:29:09 +02:00
Yahor Berdnikau 03fbf3dbfe Add mapping from subsonic api album entity to MusicDirectory domain entity.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-21 21:27:39 +02:00
Yahor Berdnikau 6c0f43b2ff Add getAlbum api call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-20 22:04:41 +02:00
Yahor Berdnikau 1ede4f73c8 Merge pull request #31 from ultrasonic/fix-cover-art
Change cover art to be a string.
2017-08-20 21:15:36 +02:00
Yahor Berdnikau 8899260977 Change cover art to be a string.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-20 21:14:09 +02:00
Yahor Berdnikau 8b32b58ae9 Merge pull request #30 from ultrasonic/use-get-artist
Use get artist
2017-08-20 21:02:59 +02:00
Yahor Berdnikau a2a0c7ac62 Use new api getArtist call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-20 21:01:22 +02:00
Yahor Berdnikau 8c483e1f4a Add converting album api entity to domain entity.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-20 21:01:22 +02:00
Yahor Berdnikau f4680ffeac Add getArtist request.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-20 19:45:42 +02:00
Yahor Berdnikau c27bed2422 Merge pull request #29 from ultrasonic/use-get-music-directory
Use get music directory
2017-08-20 15:13:44 +02:00
Yahor Berdnikau ab7f39e667 Use new api call to get music directory.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-20 15:10:34 +02:00
Yahor Berdnikau 768616d14a Add converter from api MusicDirectory to domain MusicDirectory.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-20 15:10:34 +02:00
Yahor Berdnikau f54ecd29fb Update kotlin to 1.1.4-2 version.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-20 15:10:34 +02:00
Yahor Berdnikau 0920cc94a8 Use default values for getMusicDirectory response.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-20 15:10:34 +02:00
Yahor Berdnikau decf680076 Merge pull request #28 from ultrasonic/add-unstar-request
#9: Add unstar request
2017-08-17 23:10:43 +02:00
Yahor Berdnikau 23ee01d0f5 Use new subsonic api unstar call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-17 23:06:15 +02:00
Yahor Berdnikau 34b49f67a2 Add unstar request.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-17 23:00:51 +02:00
Yahor Berdnikau 0563c39cdc Merge pull request #27 from ultrasonic/add-star-request
Add star request
2017-08-17 22:42:56 +02:00
Yahor Berdnikau 40e2dd4d8c Fix missing progress listener for getArtists call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-17 22:39:12 +02:00
Yahor Berdnikau 864488510c Use new subsonic api star request.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-17 22:38:23 +02:00
Yahor Berdnikau fdd9540f75 Add star request.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-17 22:06:20 +02:00
Yahor Berdnikau 67718a3095 Merge pull request #26 from ultrasonic/refactor-integration-tests
Refactor integration tests
2017-08-16 21:40:44 +02:00
Yahor Berdnikau b3dde1938f Split Subsonic API integration test into a smaller classes.
It will be easier to maintain and add new tests.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-16 21:37:58 +02:00
Yahor Berdnikau 2b484ad667 Update kotlin to 1.1.4 version.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-16 21:00:57 +02:00
Yahor Berdnikau 6b8d953751 Merge pull request #25 from ultrasonic/use-get-artists
Use getArtists new api implementation call
2017-08-16 07:42:51 +02:00
Yahor Berdnikau 61006cdfd1 Use new api getArtists() call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-16 06:59:25 +02:00
Yahor Berdnikau 84198d38c8 Add getArtists call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-16 06:59:25 +02:00
Yahor Berdnikau b9f885b521 Merge pull request #24 from ultrasonic/add-checkstyle-badge
Add codestyle badge to project README.
2017-08-15 13:09:13 +02:00
Yahor Berdnikau 8d34ea89da Add codestyle badge to project README.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-15 13:08:15 +02:00
Yahor Berdnikau 4645546d86 Merge pull request #23 from ultrasonic/use-get-indexes
Use get indexes
2017-08-12 21:33:05 +02:00
Yahor Berdnikau 13cf2cd8bf Add parsing shortcuts info.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-12 21:19:46 +02:00
Yahor Berdnikau b02df33b9c Use new subsonic api method for getIndexes().
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-12 20:24:41 +02:00
Yahor Berdnikau b57a425e9d Implement converting Indexes Subsonic api entity to domain entity.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-12 20:19:27 +02:00
Yahor Berdnikau d66556e307 Update kotlin to 1.1.3-2 version.
Also have to update jackson to 2.9.0 that uses the same kotlin version.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-12 20:17:32 +02:00
Yahor Berdnikau 3c4f91efef Change to extension functions in api converter.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-12 10:11:14 +02:00
Yahor Berdnikau 437877750c Make models for getIndexes have default values.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-11 21:01:02 +02:00
Yahor Berdnikau 23fd3b03fb Increase API log level to full.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-11 20:48:55 +02:00
Yahor Berdnikau fff47280a3 Merge pull request #22 from ultrasonic/add-coverage-badge
CI: Add uploading coverge report to codecov.io.
2017-08-11 20:00:33 +02:00
Yahor Berdnikau 0e39549ad4 Add codecov badge to README.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-11 19:57:57 +02:00
Yahor Berdnikau bf15324594 CI: Add uploading coverge report to codecov.io.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-11 19:46:43 +02:00
Yahor Berdnikau 5bdf31966f Merge pull request #21 from ultrasonic/add-code-coverage
Add code coverage
2017-08-10 19:24:49 +02:00
Yahor Berdnikau 5ab988f625 Update CI unit test job to generate full coverage report. 2017-08-09 22:25:43 +02:00
Yahor Berdnikau 76c61409a4 Added code coverage.
Only show kotlin code coverage.
2017-08-09 21:56:20 +02:00
Yahor Berdnikau f6113ae0dc Merge pull request #20 from ultrasonic/add-lint
Add lint
2017-08-06 22:59:01 +02:00
Yahor Berdnikau e9d244320a Limit building only support locales.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-06 22:56:28 +02:00
Yahor Berdnikau e7953a10e0 CI: added lint task.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-06 22:56:28 +02:00
Yahor Berdnikau 438af4de7e Add generated lint baseline files.
This disables lint warnings for already existing issues, but it will work for a new issues.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-08-06 22:56:28 +02:00
Yahor Berdnikau 7cb01ae571 Merge pull request #19 from ultrasonic/gradle-wrapper
Update gradle to 3.5 version.
2017-07-30 23:07:33 +02:00
Yahor Berdnikau 8d09f8ff49 Update gradle to 3.5 version.
Also added a task to update wrapper version through gradle run.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-07-30 22:50:12 +02:00
Yahor Berdnikau ba265b1bbe Merge pull request #18 from ultrasonic/add-detekt
Add detekt
2017-07-30 22:29:45 +02:00
Yahor Berdnikau 5227897580 Add detekt job to CI config.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-07-30 22:26:47 +02:00
Yahor Berdnikau 317ccd2ed8 Fix detekt issues.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-07-30 22:23:25 +02:00
Yahor Berdnikau 07c2bfaeaf Add detekt - static code analysis tool for Kotlin.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-07-30 22:22:13 +02:00
Yahor Berdnikau 61de665997 Merge pull request #15 from ultrasonic/add-circle-ci
Add CircleCI config.
2017-07-30 16:16:00 +02:00
Yahor Berdnikau 4b4fb1806f Add CircleCI build badge.
Currently it is showing status for develop branch.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-07-30 16:14:40 +02:00
Yahor Berdnikau d97b7de6e2 Add CircleCI config.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-07-30 15:40:47 +02:00
Yahor Berdnikau f1041d247d Merge pull request #14 from ultrasonic/add-ktlint
Add ktlint
2017-07-29 23:05:52 +02:00
Yahor Berdnikau 3907d10950 Fix ktLint issues.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-07-29 22:52:02 +02:00
Yahor Berdnikau 2d3316964a Add ktlint check.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-07-29 22:31:33 +02:00
Yahor Berdnikau 343d6fc4d7 Merge pull request #13 from ultrasonic/remove-unused-methods
Remove unused methods from MusicService.
2017-07-29 21:48:39 +02:00
Yahor Berdnikau 4f42301752 Remove unused methods from MusicService.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-07-29 10:32:13 +02:00
Yahor Berdnikau 4d2a8a16bb Merge pull request #11 from ultrasonic/feature-9
Add initial usage of new Subsonic API implementation in RESTMusicService
2017-07-27 09:37:47 +02:00
Yahor Berdnikau 7a5035e725 Reset MusicService when user changes active server.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-07-27 08:16:33 +02:00
Yahor Berdnikau ce90d5a3e9 Use different messages in progress listener.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-07-26 22:58:16 +02:00
Yahor Berdnikau 987ed9faf6 Remove unused MusicFolderParser.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-07-26 22:56:47 +02:00
Yahor Berdnikau a8ab61ec3b Remove unused LicenseParser.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-07-26 22:54:56 +02:00
Yahor Berdnikau 4fd5493d15 Use getMusicFolders() method from SubsonicAPI kotlin implementation.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-07-26 22:04:20 +02:00
Yahor Berdnikau 9ed0921218 Make MusicFolder has default values.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-07-26 22:02:35 +02:00
Yahor Berdnikau 67601262de Use getLicense() method from Subsonic API kotlin implementation.
Replace in RESTMusicService isLicenseValid() method body to use new kotlin subsonic API.
2017-07-25 22:31:49 +02:00
Yahor Berdnikau 0d3c0f0334 Add missing fields to License entity.
Add email and licenseExpires fields. Make all fields have default value,
this allows to make license field in LicenseResponse non-null.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-07-25 22:23:55 +02:00
Yahor Berdnikau 1caeaa9fe6 Add using new api for ping call.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-07-24 22:41:26 +02:00
Yahor Berdnikau f054fae2aa Add missing 1.15.0 subsonic api version.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-07-24 22:38:57 +02:00
Yahor Berdnikau 24b85a1647 Fix base url is not have rest endpoint part.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-07-24 22:35:59 +02:00
Yahor Berdnikau f1ab0a3e0c Add using new authentication method since 1.13.0.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-07-23 20:03:25 +02:00
Yahor Berdnikau 20d95ce19d Add optional logging to SubsonicAPI.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-07-22 22:49:26 +02:00
Yahor Berdnikau 24d68fcf3c Revert back to compile api 22.
Some used classes are missing in the newest sdk like FloatMath and apache http client.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-07-22 22:19:38 +02:00
Yahor Berdnikau 81dcbb0044 Adds get music directory response/request handling. 2017-07-19 17:02:47 +02:00
Yahor Berdnikau f686ebfb16 Update kotlin and android dependencies. 2017-07-19 17:02:47 +02:00
Yahor Berdnikau 429f302f7e Add getMusicFolders api request.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-07-19 17:02:47 +02:00
Yahor Berdnikau 4dec26de9c Generify check error response.
This will help easier to test each method error response.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-07-19 17:02:47 +02:00
Yahor Berdnikau cfa90e0a8d Switched to using Jackson for json parsing.
Also changed how response is parsed, allowing base response has different models to parse.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-07-19 17:02:47 +02:00
Yahor Berdnikau 0dd01d18ba Base implementation of Subsonic API in Kotlin. 2017-07-19 17:02:47 +02:00
Yahor Berdnikau 292490be7d Update gradle to 3.4
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-07-19 17:02:47 +02:00
Óscar García Amor eeacc79493 Fixed format of both pt translations 2017-07-18 09:30:03 +02:00
Óscar García Amor 0a4d9d47e6 Updated version to 1.8 2017-07-12 15:49:09 +02:00
Óscar García Amor 1afeafe1c6 Merge pull request #4 from inkognito13/defect/offline-mode-fix
Not add track number prefix to filename if its already added
2017-07-12 15:03:56 +02:00
dtarasov e3a485f0ef Not add track number prefix to filename if its already added 2017-06-28 13:25:04 +04:00
Óscar García Amor 47d8c5a95d Updated version to 1.7 2017-05-25 14:02:36 +02:00
Óscar García Amor ba55fdfae5 Added pt and pt_br tanslations
- Thanks to Paulo Schopf!
2017-05-25 13:45:41 +02:00
Óscar García Amor 122ae93bcb Updated version to 1.6 2017-02-20 16:39:23 +01:00
Óscar García Amor 53d2391016 Merge pull request #3 from Tapchicoma/fix_menu
Fix some actionbar menu items are not shown as icons.
2017-02-13 19:37:06 +01:00
Óscar García Amor 5aff175144 Merge pull request #2 from Tapchicoma/update_gitignore
Added IDEA files to .gitignore.
2017-02-13 19:36:49 +01:00
Óscar García Amor 9ad64ecf26 Merge pull request #1 from Tapchicoma/notification_refactor
Update how now playing notification is shown.
2017-02-13 19:36:38 +01:00
Yahor Berdnikau e1fa97b98f
Fix some actionbar menu items are not shown as icons.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-02-11 18:02:34 +01:00
Yahor Berdnikau 3ed83fb83f
Added IDEA files to .gitignore.
This files are not need to be in vcs as project can be built by Gradle.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-02-11 17:30:59 +01:00
Yahor Berdnikau c80d92b459
Update how now playing notification is shown.
Move all logic to the DownloadServiceImpl as it is not a responsibility of SubsonicTabActivity to do it.
Also NotificationCompat.Builder to build notification as now it is a standard way to do it.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
2017-02-11 15:38:32 +01:00
1446 changed files with 45178 additions and 47578 deletions

154
.circleci/config.yml Normal file
View File

@ -0,0 +1,154 @@
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: 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:
- 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
- run:
name: static analysis
command: ./gradlew -Pqc detekt
- run:
name: build debug
command: ./gradlew assembleDebug
- run:
name: unit-tests
command: |
./gradlew ciTest testDebugUnitTest
- run:
name: lint
command: ./gradlew :ultrasonic:lintRelease
- run:
name: build
command: ./gradlew buildRelease
- run:
name: assemble release
command: ./gradlew assembleRelease
- save_cache:
paths:
- ~/.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
push_translations:
docker:
- image: cimg/python:3.6
working_directory: ~/ultrasonic
steps:
- checkout
- run:
name: install transifex client
command: |
python -m venv ~/venv
. ~/venv/bin/activate
pip install transifex-client
- run:
name: configure transifex client
command: echo $'[https://www.transifex.com]\nhostname = https://www.transifex.com\nusername = api\npassword = '"${TRANSIFEX_PASSWORD}"$'\n' > ~/.transifexrc
- run:
name: push changes in translation files
command: |
. ~/venv/bin/activate
tx push -s
generate_signed_apk:
docker:
- 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:
- 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
- run:
name: build release apk
command: ./gradlew build assembleRelease
- run:
name: sign release apk
command: |
export PATH="${JAVA_HOME}/bin:${PATH}"
mkdir -p /tmp/ultrasonic-release
${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*
publish_github_signed_apk:
docker:
- image: cimg/go:1.18
steps:
- attach_workspace:
at: /tmp/ultrasonic-release
- run:
name: install 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
workflows:
version: 2
build_and_push_translations:
jobs:
- build
- push_translations:
requires:
- build
filters:
branches:
only:
- develop
- generate_signed_apk:
filters:
tags:
only: /^[0-9]+(\.[0-9]+)*(-beta\.[0-9]+)?/
branches:
ignore: /.*/
- publish_github_signed_apk:
requires:
- generate_signed_apk
filters:
tags:
only: /^[0-9]+(\.[0-9]+)*(-beta\.[0-9]+)?/
branches:
ignore: /.*/

15
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,15 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "gradle" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "monthly"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-patch"]

9
.gitignore vendored
View File

@ -1,3 +1,6 @@
# Release folder
ultrasonic/release/
# Built application files
*.apk
*.ap_
@ -34,10 +37,8 @@ captures/
# Intellij
*.iml
.idea/workspace.xml
.idea/libraries
.idea/encodings.xml
.idea/misc.xml
.idea/
# Keystore files
*.jks

View File

@ -1 +0,0 @@
ultrasonic

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>

View File

@ -1,22 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<resourceExtensions />
<wildcardResourcePatterns>
<entry name="!?*.java" />
<entry name="!?*.form" />
<entry name="!?*.class" />
<entry name="!?*.groovy" />
<entry name="!?*.scala" />
<entry name="!?*.flex" />
<entry name="!?*.kt" />
<entry name="!?*.clj" />
<entry name="!?*.aj" />
</wildcardResourcePatterns>
<annotationProcessing>
<profile default="true" name="Default" enabled="false">
<processorPath useClasspath="true" />
</profile>
</annotationProcessing>
<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

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

View File

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="1.8" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/library" />
<option value="$PROJECT_DIR$/menudrawer" />
<option value="$PROJECT_DIR$/pulltorefresh" />
<option value="$PROJECT_DIR$/ultrasonic" />
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
</GradleProjectSettings>
</option>
</component>
</project>

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>

View File

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/library/library.iml" filepath="$PROJECT_DIR$/library/library.iml" />
<module fileurl="file://$PROJECT_DIR$/menudrawer/menudrawer.iml" filepath="$PROJECT_DIR$/menudrawer/menudrawer.iml" />
<module fileurl="file://$PROJECT_DIR$/pulltorefresh/pulltorefresh.iml" filepath="$PROJECT_DIR$/pulltorefresh/pulltorefresh.iml" />
<module fileurl="file://$PROJECT_DIR$/ultrasonic.iml" filepath="$PROJECT_DIR$/ultrasonic.iml" />
<module fileurl="file://$PROJECT_DIR$/ultrasonic/ultrasonic-ultrasonic.iml" filepath="$PROJECT_DIR$/ultrasonic/ultrasonic-ultrasonic.iml" />
</modules>
</component>
</project>

View File

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
</set>
</option>
</component>
</project>

10
.tx/config Normal file
View File

@ -0,0 +1,10 @@
[main]
host = https://www.transifex.com
lang_map = nl_NL:nl,pl_PL:pl,fr_CA:fr-rCA,pt_BR:pt-rBR,pt_PT:pt,zh_CN:zh-rCN,zh_HK:zh-rHK,zh_TW:zh-rTW,da_DK:da-rDK,de_DE:de,tr_TR:tr,fr_FR:fr,es_ES:es,hu_HU:hu,sv_SE:sv-rSE,bg_BG:bg,el_GR:el,kn_IN:kn-rIN,cs_CZ:cs,sr:sr,he:iw,id:in,lt_LT:lt,km_KH:km-rKH,th_TH:th,ru_RU:ru,it_IT:it
[ultrasonic.app]
file_filter = ultrasonic/src/main/res/values-<lang>/strings.xml
source_file = ultrasonic/src/main/res/values/strings.xml
source_lang = en
type = ANDROID

63
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,63 @@
# Contributing
Ultrasonic development is a community project, and contributions are welcomed.
First, see if your issue havent been yet reported [here](https://github.com/ultrasonic/ultrasonic/issues),
then, please, first discuss the change you wish to make via [a new issue](https://github.com/ultrasonic/ultrasonic/issues/new).
## Contributing Translations
Interested in help to translate Ultrasonic? You can contribute in our
[Transifex team](https://www.transifex.com/ultrasonic/ultrasonic/).
## Contributing Code
By default Pull Request should be opened against **develop** branch, PR against **master** branch should be used only
for critical bugfixes.
### 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. **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.
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.

View File

@ -1 +1,28 @@
Please, take note that this project is STALLED. See README.md for more info.
## 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.
### Steps to reproduce
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,12 +1,82 @@
# WE HAVE MOVED
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
Subsonic Music Streamer Android client
## About project status
Ultrasonic is free and open-source music streaming Android client for
[Subsonic][subsonic] [API][subapi] (version 1.7.0 or higher) compatible
servers.
WARNING: This project is **STALLED**
## Help wanted
This means that I don't have time to fix bugs or add new features, but you can send me **Pull Requests** and I **promise** that I shall merge and upload to Play Store.
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.
If you want contribute at project you can see the [issues](https://github.com/ogarcia/ultrasonic/issues) page and try to fix the discovered bugs or implement the enhancements that users report there.
## Download
If you want give more active development, please contact with me cause I can give you access to repository to do work faster.
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.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][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][madbug].
## Contributing
See [CONTRIBUTING](CONTRIBUTING.md).
## Supported (tested) Subsonic API implementations
- [Subsonic][subsonic]
- [Airsonic-Advanced][airsonic]
- [Supysonic][supysonic]
- [Ampache][ampache]
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).
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,19 +1,49 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply from: 'dependencies.gradle'
buildscript {
apply from: 'dependencies.gradle'
apply from: 'gradle/versions.gradle'
ext.bootstrap = [
kotlinModule : "${project.rootDir}/gradle_scripts/kotlin-module-bootstrap.gradle",
androidModule : "${project.rootDir}/gradle_scripts/android-module-bootstrap.gradle"
]
repositories {
jcenter()
google()
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath gradlePlugins.androidTools
classpath libs.gradle
classpath libs.kotlin
classpath libs.ktlintGradle
classpath libs.detekt
}
}
allprojects {
// Buildscript here is required by detekt
buildscript {
repositories {
mavenCentral()
google()
}
}
repositories {
jcenter()
mavenCentral()
google()
maven { url 'https://jitpack.io' }
}
// Set Kotlin JVM target to the same for all subprojects
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = "1.8"
}
}
}
wrapper {
gradleVersion(libs.versions.gradle.get())
distributionType("all")
}

8
core/domain/build.gradle Normal file
View File

@ -0,0 +1,8 @@
apply from: bootstrap.androidModule
apply plugin: 'kotlin-kapt'
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

@ -0,0 +1,23 @@
/*
* Artist.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 = "artists", primaryKeys = ["id", "serverId"])
data class Artist(
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
) : 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

@ -0,0 +1,17 @@
package org.moire.ultrasonic.domain
import java.io.Serializable
import java.util.Date
data class Bookmark(
val position: Int = 0,
val username: String,
val comment: String,
val created: Date? = null,
val changed: Date? = null,
val track: Track
) : Serializable {
companion object {
private const val serialVersionUID = 8988990025189807803L
}
}

View File

@ -0,0 +1,13 @@
package org.moire.ultrasonic.domain
import java.io.Serializable
data class ChatMessage(
val username: String,
val time: Long,
val message: String
) : Serializable {
companion object {
private const val serialVersionUID = 496544310289324167L
}
}

View File

@ -0,0 +1,15 @@
package org.moire.ultrasonic.domain
import androidx.room.Entity
import androidx.room.PrimaryKey
import java.io.Serializable
@Entity
data class Genre(
@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

@ -0,0 +1,8 @@
package org.moire.ultrasonic.domain
data class JukeboxStatus(
var positionSeconds: Int? = null,
var currentPlayingIndex: Int? = null,
var gain: Float? = null,
var isPlaying: Boolean = false
)

View File

@ -0,0 +1,10 @@
package org.moire.ultrasonic.domain
/**
* Song lyrics.
*/
data class Lyrics(
val artist: String? = null,
val title: String? = null,
val text: String? = null
)

View File

@ -0,0 +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.util.Date
class MusicDirectory : ArrayList<MusicDirectory.Child>() {
var name: String? = null
@JvmOverloads
fun getChildren(
includeDirs: Boolean = true,
includeFiles: Boolean = true
): List<Child> {
if (includeDirs && includeFiles) {
return toList()
}
return filter { it.isDirectory && includeDirs || !it.isDirectory && includeFiles }
}
fun getTracks(): List<Track> {
return mapNotNull {
it as? Track
}
}
fun getAlbums(): List<Album> {
return mapNotNull {
it as? Album
}
}
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

@ -0,0 +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,
@ColumnInfo(defaultValue = "-1")
var serverId: Int
) : GenericEntry()

View File

@ -0,0 +1,17 @@
package org.moire.ultrasonic.domain
import java.io.Serializable
data class Playlist @JvmOverloads constructor(
override val id: String,
override var name: String,
val owner: String = "",
val comment: String = "",
val songCount: String = "",
val created: String = "",
val public: Boolean? = null
) : Serializable, GenericEntry() {
companion object {
private const val serialVersionUID = -4160515427075433798L
}
}

View File

@ -0,0 +1,15 @@
package org.moire.ultrasonic.domain
import java.io.Serializable
data class PodcastsChannel(
override val id: String,
val title: String?,
val url: String?,
val description: String?,
val status: String?
) : Serializable, GenericEntry() {
companion object {
private const val serialVersionUID = -4160515427075433798L
}
}

View File

@ -0,0 +1,11 @@
package org.moire.ultrasonic.domain
/**
* The criteria for a music search.
*/
data class SearchCriteria(
val query: String,
val artistCount: Int,
val albumCount: Int,
val songCount: Int
)

View File

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

View File

@ -0,0 +1,36 @@
package org.moire.ultrasonic.domain
import java.io.Serializable
data class Share(
override var id: String,
var url: String? = null,
var description: String? = null,
var username: String? = null,
var created: String? = null,
var lastVisited: String? = null,
var expires: String? = null,
var visitCount: Long? = null,
private val tracks: MutableList<Track> = mutableListOf()
) : Serializable, GenericEntry() {
override val name: String?
get() {
if (url != null) {
return urlPattern.matcher(url!!).replaceFirst("$1")
}
return null
}
fun getEntries(): List<Track> {
return tracks.toList()
}
fun addEntry(track: Track) {
tracks.add(track)
}
companion object {
private const val serialVersionUID = 1487561657691009668L
private val urlPattern = ".*/([^/?]+).*".toPattern()
}
}

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

@ -0,0 +1,21 @@
package org.moire.ultrasonic.domain
/**
* Information about user
*/
data class UserInfo(
val userName: String? = null,
val email: String? = null,
val scrobblingEnabled: Boolean = false,
val adminRole: Boolean = false,
val settingsRole: Boolean = false,
val downloadRole: Boolean = false,
val uploadRole: Boolean = false,
val playlistRole: Boolean = false,
val coverArtRole: Boolean = false,
val commentRole: Boolean = false,
val podcastRole: Boolean = false,
val streamRole: Boolean = false,
val jukeboxRole: Boolean = false,
val shareRole: Boolean = false
)

View File

@ -0,0 +1,22 @@
apply from: bootstrap.kotlinModule
dependencies {
api libs.retrofit
api libs.jacksonConverter
api libs.koinCore
implementation(libs.jacksonKotlin) {
exclude module: 'kotlin-reflect'
}
implementation libs.kotlinReflect // for jackson kotlin, but to use the same version
implementation libs.okhttpLogging
implementation libs.timber
testImplementation libs.kotlinJunit
testImplementation libs.mockito
testImplementation libs.mockitoInline
testImplementation libs.mockitoKotlin
testImplementation libs.kluent
testImplementation libs.mockWebServer
testImplementation libs.apacheCodecs
}

View File

@ -0,0 +1,98 @@
package org.moire.ultrasonic.api.subsonic
import java.io.InputStream
import java.nio.charset.Charset
import java.text.SimpleDateFormat
import java.util.Calendar
import java.util.Locale
import java.util.TimeZone
import okhttp3.mockwebserver.MockResponse
import okhttp3.mockwebserver.MockWebServer
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`
import org.moire.ultrasonic.api.subsonic.response.SubsonicResponse
import org.moire.ultrasonic.api.subsonic.rules.MockWebServerRule
import retrofit2.Response
const val USERNAME = "some-user"
const val PASSWORD = "some-password"
val CLIENT_VERSION = SubsonicAPIVersions.V1_16_0
const val CLIENT_ID = "test-client"
val dateFormat by lazy(
LazyThreadSafetyMode.NONE
) {
SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ", Locale.US)
}
fun MockWebServerRule.enqueueResponse(resourceName: String) {
mockWebServer.enqueueResponse(resourceName)
}
fun MockWebServer.enqueueResponse(resourceName: String) {
enqueue(
MockResponse()
.setBody(loadJsonResponse(resourceName))
.setHeader("Content-Type", "application/json;charset=UTF-8")
)
}
fun Any.loadJsonResponse(name: String): String {
val source = javaClass.classLoader.getResourceAsStream(name)!!.source().buffer()
return source.readString(Charset.forName("UTF-8"))
}
fun Any.loadResourceStream(name: String): InputStream {
val source = javaClass.classLoader.getResourceAsStream(name)!!.source().buffer()
return source.inputStream()
}
fun <T> assertResponseSuccessful(response: Response<T>) {
response.isSuccessful `should be` true
response.body() `should not be` null
}
fun parseDate(dateAsString: String): Calendar {
val result = Calendar.getInstance(TimeZone.getTimeZone("UTC"))
result.time = dateFormat.parse(dateAsString.replace("Z$".toRegex(), "+0000"))
return result
}
fun <T : SubsonicResponse> checkErrorCallParsed(
mockWebServerRule: MockWebServerRule,
apiRequest: () -> Response<T>
): T {
mockWebServerRule.enqueueResponse("request_data_not_found_error_response.json")
val response = apiRequest()
assertResponseSuccessful(response)
with(response.body()!!) {
status `should be` SubsonicResponse.Status.ERROR
error `should be` SubsonicError.RequestedDataWasNotFound
}
return response.body()!!
}
fun SubsonicResponse.assertBaseResponseOk() {
status `should be` SubsonicResponse.Status.OK
version `should be` SubsonicAPIVersions.V1_13_0
error `should be` null
}
fun MockWebServerRule.assertRequestParam(
responseResourceName: String = "ping_ok.json",
expectedParam: String,
apiRequest: () -> Response<out Any>
) {
this.enqueueResponse(responseResourceName)
apiRequest()
val request = this.mockWebServer.takeRequest()
request.requestLine `should contain` expectedParam
}

View File

@ -0,0 +1,27 @@
package org.moire.ultrasonic.api.subsonic
import org.junit.Before
import org.junit.Rule
import org.moire.ultrasonic.api.subsonic.rules.MockWebServerRule
/**
* Base class for integration tests for [SubsonicAPIClient] class.
*/
abstract class SubsonicAPIClientTest {
@JvmField @Rule val mockWebServerRule = MockWebServerRule()
protected lateinit var config: SubsonicClientConfiguration
protected lateinit var client: SubsonicAPIClient
@Before
open fun setUp() {
config = SubsonicClientConfiguration(
mockWebServerRule.mockWebServer.url("/").toString(),
USERNAME,
PASSWORD,
CLIENT_VERSION,
CLIENT_ID
)
client = SubsonicAPIClient(config)
}
}

View File

@ -0,0 +1,33 @@
package org.moire.ultrasonic.api.subsonic
import org.junit.Test
/**
* Integration test for [SubsonicAPIDefinition.addChatMessage] call.
*/
class SubsonicApiAddChatMessageTest : SubsonicAPIClientTest() {
@Test
fun `Should handle error response`() {
checkErrorCallParsed(mockWebServerRule) {
client.api.addChatMessage("some").execute()
}
}
@Test
fun `Should handle ok response`() {
mockWebServerRule.enqueueResponse("ping_ok.json")
val response = client.api.addChatMessage("some").execute()
assertResponseSuccessful(response)
}
@Test
fun `Should pass message in request param`() {
val message = "Youuhuuu"
mockWebServerRule.assertRequestParam(expectedParam = "message=$message") {
client.api.addChatMessage(message = message).execute()
}
}
}

View File

@ -0,0 +1,51 @@
package org.moire.ultrasonic.api.subsonic
import org.junit.Test
/**
* Integration test for [SubsonicAPIDefinition.createBookmark] call.
*/
class SubsonicApiCreateBookmarkTest : SubsonicAPIClientTest() {
@Test
fun `Should handle error response`() {
checkErrorCallParsed(mockWebServerRule) {
client.api.createBookmark("1", 1).execute()
}
}
@Test
fun `Should handle ok response`() {
mockWebServerRule.enqueueResponse("ping_ok.json")
val response = client.api.createBookmark("213", 123213L).execute()
assertResponseSuccessful(response)
}
@Test
fun `Should pass id in request params`() {
val id = "544"
mockWebServerRule.assertRequestParam(expectedParam = "id=$id") {
client.api.createBookmark(id = id, position = 123).execute()
}
}
@Test
fun `Should pass position in request params`() {
val position = 4412333L
mockWebServerRule.assertRequestParam(expectedParam = "position=$position") {
client.api.createBookmark(id = "12", position = position).execute()
}
}
@Test
fun `Should pass comment in request params`() {
val comment = "some-comment"
mockWebServerRule.assertRequestParam(expectedParam = "comment=$comment") {
client.api.createBookmark(id = "1", position = 1, comment = comment).execute()
}
}
}

View File

@ -0,0 +1,60 @@
package org.moire.ultrasonic.api.subsonic
import org.junit.Test
/**
* Integration test for [SubsonicAPIClient] for createPlaylist call.
*/
class SubsonicApiCreatePlaylistTest : SubsonicAPIClientTest() {
@Test
fun `Should handle error response`() {
checkErrorCallParsed(mockWebServerRule) {
client.api.createPlaylist().execute()
}
}
@Test
fun `Should hanlde ok response`() {
mockWebServerRule.enqueueResponse("ping_ok.json")
val response = client.api.createPlaylist().execute()
assertResponseSuccessful(response)
}
@Test
fun `Should pass id param in request`() {
val id = "56"
mockWebServerRule.assertRequestParam(
responseResourceName = "ping_ok.json",
expectedParam = "playlistId=$id"
) {
client.api.createPlaylist(id = id).execute()
}
}
@Test
fun `Should pass name param in request`() {
val name = "some-name"
mockWebServerRule.assertRequestParam(
responseResourceName = "ping_ok.json",
expectedParam = "name=$name"
) {
client.api.createPlaylist(name = name).execute()
}
}
@Test
fun `Should pass song id param in request`() {
val songId = listOf("4410", "852")
mockWebServerRule.assertRequestParam(
responseResourceName = "ping_ok.json",
expectedParam = "songId=${songId[0]}&songId=${songId[1]}"
) {
client.api.createPlaylist(songIds = songId).execute()
}
}
}

View File

@ -0,0 +1,83 @@
package org.moire.ultrasonic.api.subsonic
import java.util.Calendar
import org.amshove.kluent.`should be equal to`
import org.junit.Test
import org.moire.ultrasonic.api.subsonic.models.MusicDirectoryChild
/**
* Instrumentation test for [SubsonicAPIDefinition.createShare] call.
*/
class SubsonicApiCreateShareTest : SubsonicAPIClientTest() {
@Test
fun `Should handle error responce`() {
val response = checkErrorCallParsed(mockWebServerRule) {
client.api.createShare(listOf("some-id")).execute()
}
response.shares `should be equal to` emptyList()
}
@Test
fun `Should handle ok response`() {
mockWebServerRule.enqueueResponse("get_shares_ok.json")
val response = client.api.createShare(listOf("some-id")).execute()
assertResponseSuccessful(response)
response.body()!!.shares.size `should be equal to` 1
with(response.body()!!.shares[0]) {
id `should be equal to` "0"
url `should be equal to` "https://subsonic.com/ext/share/awdwo?jwt=" +
"eyJhbGciOiJIUzI1NiJ9." +
"eyJwYXRoIjoiL2V4dC9zaGFyZS9hd2R3byIsImV4cCI6MTU0MTYyNjQzMX0.iy8dkt_ZZc8hJ692" +
"UxorHdHWFU2RB-fMCmCA4IJ_dTw"
username `should be equal to` "admin"
created `should be equal to` parseDate("2017-11-07T21:33:51.748Z")
expires `should be equal to` parseDate("2018-11-07T21:33:51.748Z")
lastVisited `should be equal to` parseDate("2018-11-07T21:33:51.748Z")
description `should be equal to` "Awesome link!"
visitCount `should be equal to` 0
items.size `should be equal to` 1
items[0] `should be equal to` MusicDirectoryChild(
id = "4212", parent = "4186", isDir = false,
title = "Heaven Knows", album = "Going to Hell", artist = "The Pretty Reckless",
track = 3, year = 2014, genre = "Hard Rock", coverArt = "4186", size = 9025090,
contentType = "audio/mpeg", suffix = "mp3", duration = 225, bitRate = 320,
path = "The Pretty Reckless/Going to Hell/03 Heaven Knows.mp3", isVideo = false,
playCount = 2, discNumber = 1,
created = parseDate("2016-10-23T21:30:40.000Z"),
albumId = "388", artistId = "238", type = "music"
)
}
}
@Test
fun `Should pass ids in request param`() {
val idsList = listOf("some-id1", "some-id2")
mockWebServerRule.assertRequestParam(
expectedParam = "id=${idsList[0]}&id=${idsList[1]}"
) {
client.api.createShare(idsList).execute()
}
}
@Test
fun `Should pass description in request param`() {
val description = "description-banana"
mockWebServerRule.assertRequestParam(expectedParam = "description=$description") {
client.api.createShare(idsToShare = listOf("id1", "id2"), description = description)
.execute()
}
}
@Test
fun `Should pass expires in request param`() {
val expires = Calendar.getInstance().timeInMillis
mockWebServerRule.assertRequestParam(expectedParam = "expires=$expires") {
client.api.createShare(idsToShare = listOf("id1"), expires = expires).execute()
}
}
}

View File

@ -0,0 +1,33 @@
package org.moire.ultrasonic.api.subsonic
import org.junit.Test
/**
* Integration test for [SubsonicAPIDefinition.deleteBookmark] call.
*/
class SubsonicApiDeleteBookmarkTest : SubsonicAPIClientTest() {
@Test
fun `Should handle error response`() {
checkErrorCallParsed(mockWebServerRule) {
client.api.deleteBookmark("1").execute()
}
}
@Test
fun `Should handle ok response`() {
mockWebServerRule.enqueueResponse("ping_ok.json")
val response = client.api.deleteBookmark("1").execute()
assertResponseSuccessful(response)
}
@Test
fun `Should pass id in request params`() {
val id = "233"
mockWebServerRule.assertRequestParam(expectedParam = "id=$id") {
client.api.deleteBookmark(id).execute()
}
}
}

View File

@ -0,0 +1,36 @@
package org.moire.ultrasonic.api.subsonic
import org.junit.Test
/**
* Instrumentation test for [SubsonicAPIClient] for deletePlaylist call.
*/
class SubsonicApiDeletePlaylistTest : SubsonicAPIClientTest() {
@Test
fun `Should handle error response`() {
checkErrorCallParsed(mockWebServerRule) {
client.api.deletePlaylist("10").execute()
}
}
@Test
fun `Should handle ok response`() {
mockWebServerRule.enqueueResponse("ping_ok.json")
val response = client.api.deletePlaylist("10").execute()
assertResponseSuccessful(response)
}
@Test
fun `Should pass id param in request`() {
val id = "534"
mockWebServerRule.assertRequestParam(
responseResourceName = "ping_ok.json",
expectedParam = "id=$id"
) {
client.api.deletePlaylist(id).execute()
}
}
}

View File

@ -0,0 +1,33 @@
package org.moire.ultrasonic.api.subsonic
import org.junit.Test
/**
* Integration test for [SubsonicAPIDefinition.deleteShare] call.
*/
class SubsonicApiDeleteShareTest : SubsonicAPIClientTest() {
@Test
fun `Should handle error response`() {
checkErrorCallParsed(mockWebServerRule) {
client.api.deleteShare("123").execute()
}
}
@Test
fun `Should handle ok response`() {
mockWebServerRule.enqueueResponse("ping_ok.json")
val response = client.api.deleteShare("12").execute()
assertResponseSuccessful(response)
}
@Test
fun `Should pass id in request params`() {
val id = "224"
mockWebServerRule.assertRequestParam(expectedParam = "id=$id") {
client.api.deleteShare(id).execute()
}
}
}

View File

@ -0,0 +1,157 @@
package org.moire.ultrasonic.api.subsonic
import java.io.IOException
import org.amshove.kluent.`should be equal to`
import org.amshove.kluent.`should not be`
import org.amshove.kluent.`should throw`
import org.junit.Test
import org.moire.ultrasonic.api.subsonic.SubsonicError.Generic
import org.moire.ultrasonic.api.subsonic.SubsonicError.IncompatibleClientProtocolVersion
import org.moire.ultrasonic.api.subsonic.SubsonicError.IncompatibleServerProtocolVersion
import org.moire.ultrasonic.api.subsonic.SubsonicError.RequestedDataWasNotFound
import org.moire.ultrasonic.api.subsonic.SubsonicError.RequiredParamMissing
import org.moire.ultrasonic.api.subsonic.SubsonicError.TokenAuthNotSupportedForLDAP
import org.moire.ultrasonic.api.subsonic.SubsonicError.TrialPeriodIsOver
import org.moire.ultrasonic.api.subsonic.SubsonicError.UserNotAuthorizedForOperation
import org.moire.ultrasonic.api.subsonic.SubsonicError.WrongUsernameOrPassword
import org.moire.ultrasonic.api.subsonic.response.SubsonicResponse
import retrofit2.Response
/**
* Integration test that checks validity of api errors parsing.
*/
class SubsonicApiErrorsTest : SubsonicAPIClientTest() {
@Test
fun `Should parse wrong username or password error`() {
mockWebServerRule.enqueueResponse("wrong_username_or_password_error.json")
val response = client.api.ping().execute()
response.assertError(WrongUsernameOrPassword)
}
@Test
fun `Should parse generic error with message`() {
mockWebServerRule.enqueueResponse("generic_error.json")
val response = client.api.ping().execute()
response.assertError(Generic("Some generic error message."))
}
@Test
fun `Should fail on unknown error`() {
mockWebServerRule.enqueueResponse("unexpected_error.json")
val fail = {
client.api.ping().execute()
}
fail `should throw` IOException::class
}
@Test
fun `Should parse required param missing error`() {
mockWebServerRule.enqueueResponse("required_param_missing_error.json")
val response = client.api.ping().execute()
response.assertError(RequiredParamMissing)
}
@Test
fun `Should parse incompatible client protocol version error`() {
mockWebServerRule.enqueueResponse("incompatible_client_protocol_version_error.json")
val response = client.api.ping().execute()
response.assertError(IncompatibleClientProtocolVersion)
}
@Test
fun `Should parse incompatible server protocol version error`() {
mockWebServerRule.enqueueResponse("incompatible_server_protocol_version_error.json")
val response = client.api.ping().execute()
response.assertError(IncompatibleServerProtocolVersion)
}
@Test
fun `Should parse token auth not supported for ldap error`() {
mockWebServerRule.enqueueResponse("token_auth_not_supported_for_ldap_error.json")
val response = client.api.ping().execute()
response.assertError(TokenAuthNotSupportedForLDAP)
}
@Test
fun `Should parse user not authorized for operation error`() {
mockWebServerRule.enqueueResponse("user_not_authorized_for_operation_error.json")
val response = client.api.ping().execute()
response.assertError(UserNotAuthorizedForOperation)
}
@Test
fun `Should parse trial period is over error`() {
mockWebServerRule.enqueueResponse("trial_period_is_over_error.json")
val response = client.api.ping().execute()
response.assertError(TrialPeriodIsOver)
}
@Test
fun `Should parse requested data was not found error`() {
mockWebServerRule.enqueueResponse("requested_data_was_not_found_error.json")
val response = client.api.ping().execute()
response.assertError(RequestedDataWasNotFound)
}
@Test
fun `Should parse error with reversed tokens order`() {
mockWebServerRule.enqueueResponse("reversed_tokens_generic_error.json")
val response = client.api.ping().execute()
response.assertError(Generic("Video streaming not supported"))
}
@Test
fun `Should parse error if json contains error first before other fields`() {
mockWebServerRule.enqueueResponse("error_first_generic_error.json")
val response = client.api.ping().execute()
response.assertError(Generic("Video streaming not supported"))
}
@Test
fun `Should parse error if json doesn't contain message field`() {
mockWebServerRule.enqueueResponse("without_message_generic_error.json")
val response = client.api.ping().execute()
response.assertError(Generic(""))
}
@Test
fun `Should parse error if error json contains additional object`() {
mockWebServerRule.enqueueResponse("with_additional_json_object_generic_error.json")
val response = client.api.ping().execute()
response.assertError(Generic(""))
}
private fun Response<SubsonicResponse>.assertError(expectedError: SubsonicError) =
with(body()!!) {
error `should not be` null
error `should be equal to` expectedError
}
}

View File

@ -0,0 +1,130 @@
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.STARRED
/**
* Integration test for [SubsonicAPIClient] for getAlbumList2() call.
*/
@Suppress("NamingConventionViolation")
class SubsonicApiGetAlbumList2Test : SubsonicAPIClientTest() {
@Test
fun `Should handle error response`() {
val response = checkErrorCallParsed(mockWebServerRule) {
client.api.getAlbumList2(STARRED).execute()
}
response.albumList `should be equal to` emptyList()
}
@Test
fun `Should handle ok response`() {
mockWebServerRule.enqueueResponse("get_album_list_2_ok.json")
val response = client.api.getAlbumList2(STARRED).execute()
assertResponseSuccessful(response)
with(response.body()!!.albumList) {
this.size `should be equal to` 2
this[0] `should be equal to` Album(
id = "962", name = "Fury", artist = "Sick Puppies",
artistId = "473", coverArt = "al-962", songCount = 13, duration = 2591,
created = parseDate("2017-09-02T17:34:51.000Z"), year = 2016,
genre = "Alternative Rock"
)
this[1] `should be equal to` Album(
id = "961", name = "Endless Forms Most Beautiful",
artist = "Nightwish", artistId = "559", coverArt = "al-961", songCount = 22,
duration = 9469, created = parseDate("2017-09-02T16:22:47.000Z"),
year = 2015, genre = "Symphonic Metal"
)
}
}
@Test
fun `Should pass type in request params`() {
val type = AlbumListType.SORTED_BY_NAME
mockWebServerRule.assertRequestParam(
responseResourceName = "get_album_list_2_ok.json",
expectedParam = "type=${type.typeName}"
) {
client.api.getAlbumList2(type = type).execute()
}
}
@Test
fun `Should pass size in request param`() {
val size = 45
mockWebServerRule.assertRequestParam(
responseResourceName = "get_album_list_2_ok.json",
expectedParam = "size=$size"
) {
client.api.getAlbumList2(STARRED, size = size).execute()
}
}
@Test
fun `Should pass offset in request param`() {
val offset = 33
mockWebServerRule.assertRequestParam(
responseResourceName = "get_album_list_2_ok.json",
expectedParam = "offset=$offset"
) {
client.api.getAlbumList2(STARRED, offset = offset).execute()
}
}
@Test
fun `Should pass from year in request params`() {
val fromYear = 3030
mockWebServerRule.assertRequestParam(
responseResourceName = "get_album_list_2_ok.json",
expectedParam = "fromYear=$fromYear"
) {
client.api.getAlbumList2(STARRED, fromYear = fromYear).execute()
}
}
@Test
fun `Should pass toYear in request param`() {
val toYear = 2014
mockWebServerRule.assertRequestParam(
responseResourceName = "get_album_list_2_ok.json",
expectedParam = "toYear=$toYear"
) {
client.api.getAlbumList2(STARRED, toYear = toYear).execute()
}
}
@Test
fun `Should pass genre in request param`() {
val genre = "MathRock"
mockWebServerRule.assertRequestParam(
responseResourceName = "get_album_list_2_ok.json",
expectedParam = "genre=$genre"
) {
client.api.getAlbumList2(STARRED, genre = genre).execute()
}
}
@Test
fun `Should pass music folder id in request param`() {
val musicFolderId = "9422"
mockWebServerRule.assertRequestParam(
responseResourceName = "get_album_list_2_ok.json",
expectedParam = "musicFolderId=$musicFolderId"
) {
client.api.getAlbumList2(STARRED, musicFolderId = musicFolderId).execute()
}
}
}

View File

@ -0,0 +1,124 @@
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
/**
* Integration tests for [SubsonicAPIDefinition] for getAlbumList call.
*/
class SubsonicApiGetAlbumListRequestTest : SubsonicAPIClientTest() {
@Test
fun `Should handle error response`() {
val response = checkErrorCallParsed(mockWebServerRule) {
client.api.getAlbumList(BY_GENRE).execute()
}
response.albumList `should be equal to` emptyList()
}
@Test
fun `Should handle ok response`() {
mockWebServerRule.enqueueResponse("get_album_list_ok.json")
val response = client.api.getAlbumList(BY_GENRE).execute()
assertResponseSuccessful(response)
with(response.body()!!.albumList) {
size `should be equal to` 2
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,
created = parseDate("2017-09-02T16:22:49.000Z")
)
}
}
@Test
fun `Should pass type in request params`() {
val listType = AlbumListType.HIGHEST
mockWebServerRule.assertRequestParam(
responseResourceName = "get_album_list_ok.json",
expectedParam = "type=${listType.typeName}"
) {
client.api.getAlbumList(type = listType).execute()
}
}
@Test
fun `Should pass size in request params`() {
val size = 45
mockWebServerRule.assertRequestParam(
responseResourceName = "get_album_list_ok.json",
expectedParam = "size=$size"
) {
client.api.getAlbumList(type = BY_GENRE, size = size).execute()
}
}
@Test
fun `Should pass offset in request params`() {
val offset = 3
mockWebServerRule.assertRequestParam(
responseResourceName = "get_album_list_ok.json",
expectedParam = "offset=$offset"
) {
client.api.getAlbumList(type = BY_GENRE, offset = offset).execute()
}
}
@Test
fun `Should pass from year in request params`() {
val fromYear = 2001
mockWebServerRule.assertRequestParam(
responseResourceName = "get_album_list_ok.json",
expectedParam = "fromYear=$fromYear"
) {
client.api.getAlbumList(type = BY_GENRE, fromYear = fromYear).execute()
}
}
@Test
fun `Should pass to year in request params`() {
val toYear = 2017
mockWebServerRule.assertRequestParam(
responseResourceName = "get_album_list_ok.json",
expectedParam = "toYear=$toYear"
) {
client.api.getAlbumList(type = BY_GENRE, toYear = toYear).execute()
}
}
@Test
fun `Should pass genre in request params`() {
val genre = "Rock"
mockWebServerRule.assertRequestParam(
responseResourceName = "get_album_list_ok.json",
expectedParam = "genre=$genre"
) {
client.api.getAlbumList(type = BY_GENRE, genre = genre).execute()
}
}
@Test
fun `Should pass music folder id in request params`() {
val folderId = "545"
mockWebServerRule.assertRequestParam(
responseResourceName = "get_album_list_ok.json",
expectedParam = "musicFolderId=$folderId"
) {
client.api.getAlbumList(type = BY_GENRE, musicFolderId = folderId).execute()
}
}
}

View File

@ -0,0 +1,76 @@
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.MusicDirectoryChild
/**
* Integration test for [SubsonicAPIClient] for getAlbum call.
*/
class SubsonicApiGetAlbumTest : SubsonicAPIClientTest() {
@Test
fun `Should parse error responce`() {
val response = checkErrorCallParsed(mockWebServerRule) {
client.api.getAlbum("56").execute()
}
response.album `should not be` null
response.album `should be equal to` Album()
}
@Test
fun `Should add id to request params`() {
val id = "76"
mockWebServerRule.assertRequestParam(
responseResourceName = "get_album_ok.json",
expectedParam = "id=$id"
) {
client.api.getAlbum(id).execute()
}
}
@Test
fun `Should parse ok response`() {
mockWebServerRule.enqueueResponse("get_album_ok.json")
val response = client.api.getAlbum("512").execute()
assertResponseSuccessful(response)
with(response.body()!!.album) {
id `should be equal to` "618"
name `should be equal to` "Black Ice"
artist `should be equal to` "AC/DC"
artistId `should be equal to` "362"
coverArt `should be equal to` "al-618"
songCount `should be equal to` 15
duration `should be equal to` 3331
created `should be equal to` parseDate("2016-10-23T15:31:22.000Z")
year `should be equal to` 2008
genre `should be equal to` "Hard Rock"
songList.size `should be equal to` 15
songList[0] `should be equal to` MusicDirectoryChild(
id = "6491", parent = "6475",
isDir = false, title = "Rock 'n' Roll Train", album = "Black Ice",
artist = "AC/DC", track = 1, year = 2008, genre = "Hard Rock",
coverArt = "6475", size = 7205451, contentType = "audio/mpeg", suffix = "mp3",
duration = 261, bitRate = 219,
path = "AC_DC/Black Ice/01 Rock 'n' Roll Train.mp3",
isVideo = false, playCount = 0, discNumber = 1,
created = parseDate("2016-10-23T15:31:20.000Z"),
albumId = "618", artistId = "362", type = "music"
)
songList[5] `should be equal to` MusicDirectoryChild(
id = "6492", parent = "6475",
isDir = false, title = "Smash 'n' Grab", album = "Black Ice", artist = "AC/DC",
track = 6, year = 2008, genre = "Hard Rock", coverArt = "6475", size = 6697204,
contentType = "audio/mpeg", suffix = "mp3", duration = 246, bitRate = 216,
path = "AC_DC/Black Ice/06 Smash 'n' Grab.mp3", isVideo = false, playCount = 0,
discNumber = 1, created = parseDate("2016-10-23T15:31:20.000Z"),
albumId = "618", artistId = "362", type = "music"
)
}
}
}

View File

@ -0,0 +1,62 @@
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
/**
* Integration test for [SubsonicAPIClient] for getArtist call.
*/
class SubsonicApiGetArtistTest : SubsonicAPIClientTest() {
@Test
fun `Should parse error call`() {
val response = checkErrorCallParsed(mockWebServerRule) {
client.api.getArtist("101").execute()
}
response.artist `should not be` null
response.artist `should be equal to` Artist()
}
@Test
fun `Should pass id param in request`() {
val id = "929"
mockWebServerRule.assertRequestParam(
responseResourceName = "get_artist_ok.json",
expectedParam = "id=$id"
) {
client.api.getArtist(id).execute()
}
}
@Test
fun `Should parse ok response`() {
mockWebServerRule.enqueueResponse("get_artist_ok.json")
val response = client.api.getArtist("100").execute()
assertResponseSuccessful(response)
with(response.body()!!.artist) {
id `should be equal to` "362"
name `should be equal to` "AC/DC"
coverArt `should be equal to` "ar-362"
albumCount `should be equal to` 2
albumsList.size `should be equal to` 2
albumsList[0] `should be equal to` Album(
id = "618", name = "Black Ice", artist = "AC/DC",
artistId = "362", coverArt = "al-618", songCount = 15, duration = 3331,
created = parseDate("2016-10-23T15:31:22.000Z"),
year = 2008, genre = "Hard Rock"
)
albumsList[1] `should be equal to` Album(
id = "617", name = "Rock or Bust", artist = "AC/DC",
artistId = "362", coverArt = "al-617", songCount = 11, duration = 2095,
created = parseDate("2016-10-23T15:31:23.000Z"),
year = 2014, genre = "Hard Rock"
)
}
}
}

View File

@ -0,0 +1,73 @@
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.Artist
import org.moire.ultrasonic.api.subsonic.models.Index
import org.moire.ultrasonic.api.subsonic.models.Indexes
/**
* Integration test for [SubsonicAPIClient] for getArtists() request.
*/
class SubsonicApiGetArtistsTest : SubsonicAPIClientTest() {
@Test
fun `Should parse get artists error response`() {
val response = checkErrorCallParsed(mockWebServerRule) {
client.api.getArtists(null).execute()
}
response.indexes `should not be` null
response.indexes `should be equal to` Indexes()
}
@Test
fun `Should parse get artists ok reponse`() {
mockWebServerRule.enqueueResponse("get_artists_ok.json")
val response = client.api.getArtists(null).execute()
assertResponseSuccessful(response)
with(response.body()!!.indexes) {
lastModified `should be equal to` 0L
ignoredArticles `should be equal to` "The El La Los Las Le Les"
shortcutList `should be equal to` emptyList()
indexList.size `should be equal to` 2
indexList `should be equal to` listOf(
Index(
name = "A",
artists = listOf(
Artist(id = "362", name = "AC/DC", coverArt = "ar-362", albumCount = 2),
Artist(id = "254", name = "Acceptance", coverArt = "ar-254", albumCount = 1)
)
),
Index(
name = "T",
artists = listOf(
Artist(
id = "516", name = "Tangerine Dream", coverArt = "ar-516",
albumCount = 1
),
Artist(
id = "242", name = "Taproot", coverArt = "ar-242",
albumCount = 2
)
)
)
)
}
}
@Test
fun `Should pass param on query for get artists call`() {
mockWebServerRule.enqueueResponse("get_artists_ok.json")
val musicFolderId = "101"
mockWebServerRule.assertRequestParam(
responseResourceName = "get_artists_ok.json",
expectedParam = "musicFolderId=$musicFolderId"
) {
client.api.getArtists(musicFolderId).execute()
}
}
}

View File

@ -0,0 +1,66 @@
package org.moire.ultrasonic.api.subsonic
import okhttp3.mockwebserver.MockResponse
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
/**
* Integration test for [SubsonicAPIDefinition.getAvatar] call.
*/
class SubsonicApiGetAvatarTest : SubsonicAPIClientTest() {
@Test
fun `Should handle api error response`() {
mockWebServerRule.enqueueResponse("request_data_not_found_error_response.json")
val response = client.api.getAvatar("some-id").execute().toStreamResponse()
with(response) {
stream `should be` null
responseHttpCode `should be equal to` 200
apiError `should be equal to` SubsonicError.RequestedDataWasNotFound
}
}
@Test
fun `Should handle server error`() {
val httpErrorCode = 500
mockWebServerRule.mockWebServer.enqueue(MockResponse().setResponseCode(httpErrorCode))
val response = client.api.getAvatar("some-id").execute().toStreamResponse()
with(response) {
stream `should be equal to` null
responseHttpCode `should be equal to` httpErrorCode
apiError `should be` null
}
}
@Test
fun `Should return successful call stream`() {
mockWebServerRule.mockWebServer.enqueue(
MockResponse()
.setBody(mockWebServerRule.loadJsonResponse("ping_ok.json"))
)
val response = client.api.stream("some-id").execute().toStreamResponse()
with(response) {
responseHttpCode `should be equal to` 200
apiError `should be` null
stream `should not be` null
val expectedContent = mockWebServerRule.loadJsonResponse("ping_ok.json")
stream!!.bufferedReader().readText() `should be equal to` expectedContent
}
}
@Test
fun `Should pass username as param`() {
val username = "Guardian"
mockWebServerRule.assertRequestParam(expectedParam = "username=$username") {
client.api.getAvatar(username).execute()
}
}
}

View File

@ -0,0 +1,47 @@
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.MusicDirectoryChild
/**
* Integration test for [SubsonicAPIDefinition.getBookmarks] call.
*/
class SubsonicApiGetBookmarksTest : SubsonicAPIClientTest() {
@Test
fun `Should handle error response`() {
val response = checkErrorCallParsed(mockWebServerRule) {
client.api.getBookmarks().execute()
}
response.bookmarkList `should be equal to` emptyList()
}
@Test
fun `Should handle ok response`() {
mockWebServerRule.enqueueResponse("get_bookmarks_ok.json")
val response = client.api.getBookmarks().execute()
assertResponseSuccessful(response)
response.body()!!.bookmarkList.size `should be equal to` 1
with(response.body()!!.bookmarkList[0]) {
position `should be equal to` 107914
username `should be equal to` "CaptainEurope"
comment `should be equal to` "Look at this"
created `should be equal to` parseDate("2017-11-18T15:22:22.144Z")
changed `should be equal to` parseDate("2017-11-18T15:22:22.144Z")
entry `should be equal to` MusicDirectoryChild(
id = "10349", parent = "10342",
isDir = false, title = "Amerika", album = "Home of the Strange",
artist = "Young the Giant", track = 1, year = 2016, genre = "Indie Rock",
coverArt = "10342", size = 9628673, contentType = "audio/mpeg",
suffix = "mp3", duration = 240, bitRate = 320,
path = "Young the Giant/Home of the Strange/01 Amerika.mp3",
isVideo = false, playCount = 2, discNumber = 1,
created = parseDate("2017-11-01T17:46:52.000Z"),
albumId = "984", artistId = "571", type = "music"
)
}
}
}

View File

@ -0,0 +1,48 @@
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.ChatMessage
/**
* Integration test for [SubsonicAPIDefinition.getChatMessages] call.
*/
class SubsonicApiGetChatMessagesTest : SubsonicAPIClientTest() {
@Test
fun `Should handle error response`() {
val response = checkErrorCallParsed(mockWebServerRule) {
client.api.getChatMessages().execute()
}
response.chatMessages `should be equal to` emptyList()
}
@Test
fun `Should handle ok response`() {
mockWebServerRule.enqueueResponse("get_chat_messages_ok.json")
val response = client.api.getChatMessages().execute()
assertResponseSuccessful(response)
with(response.body()!!.chatMessages) {
size `should be equal to` 2
this[0] `should be equal to` ChatMessage(
username = "sindre", time = 1269771845310,
message = "Sindre was here"
)
this[1] `should be equal to` ChatMessage(
username = "ben", time = 1269771842504,
message = "Ben too"
)
}
}
@Test
fun `Should pass since in request param`() {
val since = 21388L
mockWebServerRule.assertRequestParam(expectedParam = "since=$since") {
client.api.getChatMessages(since = since).execute()
}
}
}

View File

@ -0,0 +1,75 @@
package org.moire.ultrasonic.api.subsonic
import okhttp3.mockwebserver.MockResponse
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
/**
* Integration test for [SubsonicAPIClient] for [SubsonicAPIDefinition.getCoverArt] call.
*/
class SubsonicApiGetCoverArtTest : SubsonicAPIClientTest() {
@Test
fun `Should handle api error response`() {
mockWebServerRule.enqueueResponse("request_data_not_found_error_response.json")
val response = client.api.getCoverArt("some-id").execute().toStreamResponse()
with(response) {
stream `should be` null
responseHttpCode `should be equal to` 200
apiError `should be equal to` SubsonicError.RequestedDataWasNotFound
}
}
@Test
fun `Should handle server error`() {
val httpErrorCode = 404
mockWebServerRule.mockWebServer.enqueue(MockResponse().setResponseCode(httpErrorCode))
val response = client.api.getCoverArt("some-id").execute().toStreamResponse()
with(response) {
stream `should be` null
responseHttpCode `should be equal to` 404
apiError `should be` null
}
}
@Test
fun `Should return successful call stream`() {
mockWebServerRule.mockWebServer.enqueue(
MockResponse()
.setBody(mockWebServerRule.loadJsonResponse("ping_ok.json"))
)
val response = client.api.getCoverArt("some-id").execute().toStreamResponse()
with(response) {
responseHttpCode `should be equal to` 200
apiError `should be` null
stream `should not be` null
val expectedContent = mockWebServerRule.loadJsonResponse("ping_ok.json")
stream!!.bufferedReader().readText() `should be equal to` expectedContent
}
}
@Test
fun `Should pass id as parameter`() {
val id = "ca123994"
mockWebServerRule.assertRequestParam("ping_ok.json", id) {
client.api.getCoverArt(id).execute()
}
}
@Test
fun `Should pass size as a parameter`() {
val size = 45600L
mockWebServerRule.assertRequestParam("ping_ok.json", size.toString()) {
client.api.getCoverArt("some-id", size).execute()
}
}
}

View File

@ -0,0 +1,36 @@
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.Genre
/**
* Integration test for [SubsonicAPIDefinition.getGenres] call.
*/
class SubsonicApiGetGenresTest : SubsonicAPIClientTest() {
@Test
fun `Should handle error response`() {
val response = checkErrorCallParsed(mockWebServerRule) {
client.api.getGenres().execute()
}
response.genresList `should be equal to` emptyList()
}
@Test
fun `Should handle ok response`() {
mockWebServerRule.enqueueResponse("get_genres_ok.json")
val response = client.api.getGenres().execute()
assertResponseSuccessful(response)
with(response.body()!!.genresList) {
size `should be equal to` 5
this[0] `should be equal to` Genre(1186, 103, "Rock")
this[1] `should be equal to` Genre(896, 72, "Electronic")
this[2] `should be equal to` Genre(790, 59, "Alternative Rock")
this[3] `should be equal to` Genre(622, 97, "Trance")
this[4] `should be equal to` Genre(476, 36, "Hard Rock")
}
}
}

View File

@ -0,0 +1,84 @@
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.Artist
import org.moire.ultrasonic.api.subsonic.models.Index
import org.moire.ultrasonic.api.subsonic.models.Indexes
/**
* Integration test for [SubsonicAPIClient] for getIndexes() request.
*/
class SubsonicApiGetIndexesTest : SubsonicAPIClientTest() {
@Test
fun `Should parse get indexes ok response`() {
mockWebServerRule.enqueueResponse("get_indexes_ok.json")
val response = client.api.getIndexes(null, null).execute()
assertResponseSuccessful(response)
response.body()!!.indexes `should not be` null
with(response.body()!!.indexes) {
lastModified `should be equal to` 1491069027523
ignoredArticles `should be equal to` "The El La Los Las Le Les"
shortcutList `should be equal to` listOf(
Artist(id = "889", name = "podcasts"),
Artist(id = "890", name = "audiobooks")
)
indexList `should be equal to` mutableListOf(
Index(
"A",
listOf(
Artist(
id = "50", name = "Ace Of Base",
starred = parseDate("2017-04-02T20:16:29.815Z")
),
Artist(id = "379", name = "A Perfect Circle")
)
),
Index(
"H",
listOf(
Artist(id = "299", name = "Haddaway"),
Artist(id = "297", name = "Halestorm")
)
)
)
}
}
@Test
fun `Should add music folder id as a query param for getIndexes api call`() {
val musicFolderId = "9"
mockWebServerRule.assertRequestParam(
responseResourceName = "get_indexes_ok.json",
expectedParam = "musicFolderId=$musicFolderId"
) {
client.api.getIndexes(musicFolderId, null).execute()
}
}
@Test
fun `Should add ifModifiedSince as a query param for getIndexes api call`() {
val ifModifiedSince = System.currentTimeMillis()
mockWebServerRule.assertRequestParam(
responseResourceName = "get_indexes_ok.json",
expectedParam = "ifModifiedSince=$ifModifiedSince"
) {
client.api.getIndexes(null, ifModifiedSince).execute()
}
}
@Test
fun `Should parse get indexes error response`() {
val response = checkErrorCallParsed(mockWebServerRule) {
client.api.getIndexes(null, null).execute()
}
response.indexes `should not be` null
response.indexes `should be equal to` Indexes()
}
}

View File

@ -0,0 +1,40 @@
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.License
/**
* Integration test [SubsonicAPIClient] for getLicense() request.
*/
class SubsonicApiGetLicenseTest : SubsonicAPIClientTest() {
@Test
fun `Should parse get license ok response`() {
mockWebServerRule.enqueueResponse("license_ok.json")
val response = client.api.getLicense().execute()
assertResponseSuccessful(response)
with(response.body()!!) {
assertBaseResponseOk()
license `should be equal to` License(
valid = true,
trialExpires = parseDate("2016-11-23T20:17:15.206Z"),
email = "someone@example.net",
licenseExpires = parseDate("8994-08-17T07:12:55.807Z")
)
}
}
@Test
fun `Should parse get license error response`() {
val response = checkErrorCallParsed(mockWebServerRule) {
client.api.getLicense().execute()
}
response.license `should not be` null
response.license.email `should be equal to` License().email
response.license.valid `should be equal to` License().valid
}
}

View File

@ -0,0 +1,55 @@
package org.moire.ultrasonic.api.subsonic
import org.amshove.kluent.`should be equal to`
import org.junit.Test
/**
* Integration test for [SubsonicAPIClient] for getLyrics() call.
*/
class SubsonicApiGetLyricsTest : SubsonicAPIClientTest() {
@Test
fun `Should handle error response`() {
checkErrorCallParsed(mockWebServerRule) {
client.api.getLyrics().execute()
}
}
@Test
fun `Should handle ok response`() {
mockWebServerRule.enqueueResponse("get_lyrics_ok.json")
val response = client.api.getLyrics().execute()
assertResponseSuccessful(response)
with(response.body()!!.lyrics) {
artist `should be equal to` "Amorphis"
title `should be equal to` "Alone"
text `should be equal to` "Tear dimmed rememberance\nIn a womb of time\nBreath upon " +
"me\nPossessed by the"
}
}
@Test
fun `Should pass artist param in request`() {
val artist = "some-artist"
mockWebServerRule.assertRequestParam(
responseResourceName = "get_lyrics_ok.json",
expectedParam = "artist=$artist"
) {
client.api.getLyrics(artist = artist).execute()
}
}
@Test
fun `Should pass title param in request`() {
val title = "some-title"
mockWebServerRule.assertRequestParam(
responseResourceName = "get_lyrics_ok.json",
expectedParam = "title=$title"
) {
client.api.getLyrics(title = title).execute()
}
}
}

View File

@ -0,0 +1,76 @@
package org.moire.ultrasonic.api.subsonic
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
import org.moire.ultrasonic.api.subsonic.models.MusicDirectoryChild
/**
* Integration test for [SubsonicAPIClient] for getMusicDirectory request.
*/
class SubsonicApiGetMusicDirectoryTest : SubsonicAPIClientTest() {
@Test
fun `Should parse getMusicDirectory error response`() {
val response = checkErrorCallParsed(mockWebServerRule) {
client.api.getMusicDirectory("1").execute()
}
response.musicDirectory `should not be` null
response.musicDirectory `should be equal to` MusicDirectory()
}
@Test
fun `GetMusicDirectory should add directory id to query params`() {
val directoryId = "124"
mockWebServerRule.assertRequestParam(
responseResourceName = "get_music_directory_ok.json",
expectedParam = "id=$directoryId"
) {
client.api.getMusicDirectory(directoryId).execute()
}
}
@Test
fun `Should parse get music directory ok response`() {
mockWebServerRule.enqueueResponse("get_music_directory_ok.json")
val response = client.api.getMusicDirectory("1").execute()
assertResponseSuccessful(response)
response.body()!!.musicDirectory `should not be` null
with(response.body()!!.musicDirectory) {
id `should be equal to` "4836"
parent `should be equal to` "300"
name `should be equal to` "12 Stones"
userRating `should be equal to` 5
averageRating `should be equal to` 5.0f
starred `should be equal to` null
playCount `should be equal to` 1
childList.size `should be` 2
childList[0] `should be equal to` MusicDirectoryChild(
id = "4844", parent = "4836",
isDir = false, title = "Crash", album = "12 Stones", artist = "12 Stones",
track = 1, year = 2002, genre = "Alternative Rock", coverArt = "4836",
size = 5348318L, contentType = "audio/mpeg", suffix = "mp3", duration = 222,
bitRate = 192, path = "12 Stones/12 Stones/01 Crash.mp3", isVideo = false,
playCount = 0, discNumber = 1,
created = parseDate("2016-10-23T15:19:10.000Z"),
albumId = "454", artistId = "288", type = "music"
)
childList[1] `should be equal to` MusicDirectoryChild(
id = "4845", parent = "4836",
isDir = false, title = "Broken", album = "12 Stones", artist = "12 Stones",
track = 2, year = 2002, genre = "Alternative Rock", coverArt = "4836",
size = 4309043L, contentType = "audio/mpeg", suffix = "mp3", duration = 179,
bitRate = 192, path = "12 Stones/12 Stones/02 Broken.mp3", isVideo = false,
playCount = 0, discNumber = 1,
created = parseDate("2016-10-23T15:19:09.000Z"),
albumId = "454", artistId = "288", type = "music"
)
}
}
}

View File

@ -0,0 +1,35 @@
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.MusicFolder
/**
* Integration test for [SubsonicAPIClient] for getMusicFolders() request.
*/
class SubsonicApiGetMusicFoldersTest : SubsonicAPIClientTest() {
@Test
fun `Should parse get music folders ok response`() {
mockWebServerRule.enqueueResponse("get_music_folders_ok.json")
val response = client.api.getMusicFolders().execute()
assertResponseSuccessful(response)
with(response.body()!!) {
assertBaseResponseOk()
musicFolders `should be equal to` listOf(
MusicFolder("0", "Music"),
MusicFolder("2", "Test")
)
}
}
@Test
fun `Should parse get music folders error response`() {
val response = checkErrorCallParsed(mockWebServerRule) {
client.api.getMusicFolders().execute()
}
response.musicFolders `should be equal to` emptyList()
}
}

View File

@ -0,0 +1,66 @@
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.MusicDirectoryChild
import org.moire.ultrasonic.api.subsonic.models.Playlist
/**
* Integration test for [SubsonicAPIClient] for getPlaylist call.
*/
class SubsonicApiGetPlaylistTest : SubsonicAPIClientTest() {
@Test
fun `Should parse error response`() {
val response = checkErrorCallParsed(mockWebServerRule) {
client.api.getPlaylist("10").execute()
}
response.playlist `should not be` null
response.playlist `should be equal to` Playlist()
}
@Test
fun `Should parse ok response`() {
mockWebServerRule.enqueueResponse("get_playlist_ok.json")
val response = client.api.getPlaylist("4").execute()
assertResponseSuccessful(response)
with(response.body()!!.playlist) {
id `should be equal to` "0"
name `should be equal to` "Aug 27, 2017 11:17 AM"
owner `should be equal to` "admin"
public `should be equal to` false
songCount `should be equal to` 16
duration `should be equal to` 3573
created `should be equal to` parseDate("2017-08-27T11:17:26.216Z")
changed `should be equal to` parseDate("2017-08-27T11:17:26.218Z")
coverArt `should be equal to` "pl-0"
entriesList.size `should be equal to` 2
entriesList[1] `should be equal to` MusicDirectoryChild(
id = "4215", parent = "4186",
isDir = false, title = "Going to Hell", album = "Going to Hell",
artist = "The Pretty Reckless", track = 2, year = 2014,
genre = "Hard Rock", coverArt = "4186", size = 11089627,
contentType = "audio/mpeg", suffix = "mp3", duration = 277, bitRate = 320,
path = "The Pretty Reckless/Going to Hell/02 Going to Hell.mp3",
isVideo = false, playCount = 0, discNumber = 1,
created = parseDate("2016-10-23T21:30:41.000Z"),
albumId = "388", artistId = "238", type = "music"
)
}
}
@Test
fun `Should pass id as request param`() {
val playlistId = "453"
mockWebServerRule.assertRequestParam(
responseResourceName = "get_playlist_ok.json",
expectedParam = "id=$playlistId"
) {
client.api.getPlaylist(playlistId).execute()
}
}
}

View File

@ -0,0 +1,53 @@
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.Playlist
/**
* Integration test for [SubsonicAPIClient] for getPlaylists call.
*/
class SubsonicApiGetPlaylistsTest : SubsonicAPIClientTest() {
@Test
fun `Should parse error call`() {
val response = checkErrorCallParsed(mockWebServerRule) {
client.api.getPlaylists().execute()
}
response.playlists `should not be` null
response.playlists `should be equal to` emptyList()
}
@Test
fun `Should parse ok response`() {
mockWebServerRule.enqueueResponse("get_playlists_ok.json")
val response = client.api.getPlaylists().execute()
assertResponseSuccessful(response)
with(response.body()!!.playlists) {
size `should be equal to` 1
this[0] `should be equal to` Playlist(
id = "0", name = "Aug 27, 2017 11:17 AM",
owner = "admin", public = false, songCount = 16, duration = 3573,
comment = "Some comment",
created = parseDate("2017-08-27T11:17:26.216Z"),
changed = parseDate("2017-08-27T11:17:26.218Z"),
coverArt = "pl-0"
)
}
}
@Test
fun `Should pass username as a parameter`() {
val username = "SomeUsername"
mockWebServerRule.assertRequestParam(
responseResourceName = "get_playlists_ok.json",
expectedParam = "username=$username"
) {
client.api.getPlaylists(username = username).execute()
}
}
}

View File

@ -0,0 +1,91 @@
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.MusicDirectoryChild
/**
* Integration test for [SubsonicAPIClient] for getPodcasts call.
*/
class SubsonicApiGetPodcastsTest : SubsonicAPIClientTest() {
@Test
fun `Should handle error response`() {
val response = checkErrorCallParsed(mockWebServerRule) {
client.api.getPodcasts().execute()
}
response.podcastChannels `should not be` null
response.podcastChannels `should be equal to` emptyList()
}
@Test
fun `Should handle ok response`() {
mockWebServerRule.enqueueResponse("get_podcasts_ok.json")
val response = client.api.getPodcasts().execute()
assertResponseSuccessful(response)
val podcastChannelsList = response.body()!!.podcastChannels
podcastChannelsList.size `should be equal to` 1
with(podcastChannelsList[0]) {
id `should be equal to` "2"
url `should be equal to` "http://feeds.codenewbie.org/cnpodcast.xml"
title `should be equal to` "CodeNewbie"
description `should be equal to` "Stories and interviews from people on their coding " +
"journey."
coverArt `should be equal to` "pod-2"
originalImageUrl `should be equal to` "http://codenewbie.blubrry.com/wp-content/" +
"uploads/powerpress/220808.jpg"
status `should be equal to` "completed"
errorMessage `should be equal to` ""
episodeList.size `should be equal to` 10
episodeList[0] `should be equal to` MusicDirectoryChild(
id = "148", parent = "9959",
isDir = false,
title = "S1:EP3 How to teach yourself computer science (Vaidehi Joshi)",
album = "CodeNewbie", artist = "podcasts", coverArt = "9959",
size = 38274221, contentType = "audio/mpeg", suffix = "mp3",
duration = 2397, bitRate = 128, isVideo = false, playCount = 0,
created = parseDate("2017-08-30T09:33:39.000Z"), type = "podcast",
streamId = "9982", channelId = "2",
description = "Vaidehi decided to take on a year-long challenge. " +
"She'd pick a computer science topic every week, do tons of research " +
"and write a technical blog post explaining it in simple terms and " +
"beautiful illustrations. And then she actually did it. She tells us " +
"about her project, basecs, how it's changed her as a developer, and " +
"how she handles the trolls and negativity from people who don't " +
"appreciate her work. Show Notes Technical Writer position at " +
"CodeNewbie basecs 100 Days of Code Conway's Game of Life Hexes and " +
"Other Magical Numbers (Vaidehi's blog post) Bits, Bytes, Building " +
"With Binary (Vaidehi's blog post) Rust",
status = "completed",
publishDate = parseDate("2017-08-29T00:01:01.000Z")
)
}
}
@Test
fun `Should pass include episodes in request`() {
val includeEpisodes = true
mockWebServerRule.assertRequestParam(
responseResourceName = "get_podcasts_ok.json",
expectedParam = "includeEpisodes=$includeEpisodes"
) {
client.api.getPodcasts(includeEpisodes = includeEpisodes).execute()
}
}
@Test
fun `Should pass id in request param`() {
val id = "249"
mockWebServerRule.assertRequestParam(
responseResourceName = "get_podcasts_ok.json",
expectedParam = "id=$id"
) {
client.api.getPodcasts(id = id).execute()
}
}
}

View File

@ -0,0 +1,101 @@
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.MusicDirectoryChild
/**
* Integration test for [SubsonicAPIClient] for getRandomSongs call.
*/
class SubsonicApiGetRandomSongsTest : SubsonicAPIClientTest() {
@Test
fun `Should handle error response`() {
val response = checkErrorCallParsed(mockWebServerRule) {
client.api.getRandomSongs().execute()
}
response.songsList `should be equal to` emptyList()
}
@Test
fun `Should handle ok response`() {
mockWebServerRule.enqueueResponse("get_random_songs_ok.json")
val response = client.api.getRandomSongs().execute()
assertResponseSuccessful(response)
with(response.body()!!.songsList) {
size `should be equal to` 3
this[1] `should be equal to` MusicDirectoryChild(
id = "3061", parent = "3050", isDir = false,
title = "Sure as Hell", album = "Who Are You Now?", artist = "This Providence",
track = 1, year = 2009, genre = "Indie Rock", coverArt = "3050",
size = 1969692, contentType = "audio/mpeg", suffix = "mp3", duration = 110,
bitRate = 142, path = "This Providence/Who Are You Now_/01 Sure as Hell.mp3",
isVideo = false, playCount = 0, discNumber = 1,
created = parseDate("2016-10-23T21:32:46.000Z"), albumId = "272",
artistId = "152", type = "music"
)
}
}
@Test
fun `Should pass size in request param`() {
val size = 384433
mockWebServerRule.assertRequestParam(
responseResourceName = "get_random_songs_ok.json",
expectedParam = "size=$size"
) {
client.api.getRandomSongs(size = size).execute()
}
}
@Test
fun `Should pass genre in request param`() {
val genre = "PostRock"
mockWebServerRule.assertRequestParam(
responseResourceName = "get_random_songs_ok.json",
expectedParam = "genre=$genre"
) {
client.api.getRandomSongs(genre = genre).execute()
}
}
@Test
fun `Should pass from year in request param`() {
val fromYear = 1919
mockWebServerRule.assertRequestParam(
responseResourceName = "get_random_songs_ok.json",
expectedParam = "fromYear=$fromYear"
) {
client.api.getRandomSongs(fromYear = fromYear).execute()
}
}
@Test
fun `Should pass to year in request params`() {
val toYear = 2012
mockWebServerRule.assertRequestParam(
responseResourceName = "get_random_songs_ok.json",
expectedParam = "toYear=$toYear"
) {
client.api.getRandomSongs(toYear = toYear).execute()
}
}
@Test
fun `Should pass music folder id in request param`() {
val musicFolderId = "4919"
mockWebServerRule.assertRequestParam(
responseResourceName = "get_random_songs_ok.json",
expectedParam = "musicFolderId=$musicFolderId"
) {
client.api.getRandomSongs(musicFolderId = musicFolderId).execute()
}
}
}

View File

@ -0,0 +1,51 @@
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.MusicDirectoryChild
/**
* Integration test for [SubsonicAPIDefinition.getShares] call.
*/
class SubsonicApiGetSharesTest : SubsonicAPIClientTest() {
@Test
fun `Should handle error response`() {
val response = checkErrorCallParsed(mockWebServerRule) {
client.api.getShares().execute()
}
response.shares `should be equal to` emptyList()
}
@Test
fun `Should handle ok response`() {
mockWebServerRule.enqueueResponse("get_shares_ok.json")
val response = client.api.getShares().execute()
assertResponseSuccessful(response)
response.body()!!.shares.size `should be equal to` 1
with(response.body()!!.shares[0]) {
id `should be equal to` "0"
url `should be equal to` "https://subsonic.com/ext/share/awdwo?jwt=eyJhbGciOiJIUzI1" +
"NiJ9.eyJwYXRoIjoiL2V4dC9zaGFyZS9hd2R3byIsImV4cCI6MTU0MTYyNjQzMX0.iy8dkt_ZZc8" +
"hJ692UxorHdHWFU2RB-fMCmCA4IJ_dTw"
username `should be equal to` "admin"
created `should be equal to` parseDate("2017-11-07T21:33:51.748Z")
expires `should be equal to` parseDate("2018-11-07T21:33:51.748Z")
lastVisited `should be equal to` parseDate("2018-11-07T21:33:51.748Z")
visitCount `should be equal to` 0
description `should be equal to` "Awesome link!"
items.size `should be equal to` 1
items[0] `should be equal to` MusicDirectoryChild(
id = "4212", parent = "4186", isDir = false,
title = "Heaven Knows", album = "Going to Hell", artist = "The Pretty Reckless",
track = 3, year = 2014, genre = "Hard Rock", coverArt = "4186", size = 9025090,
contentType = "audio/mpeg", suffix = "mp3", duration = 225, bitRate = 320,
path = "The Pretty Reckless/Going to Hell/03 Heaven Knows.mp3", isVideo = false,
playCount = 2, discNumber = 1, created = parseDate("2016-10-23T21:30:40.000Z"),
albumId = "388", artistId = "238", type = "music"
)
}
}
}

View File

@ -0,0 +1,87 @@
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.MusicDirectoryChild
/**
* Integration test for [SubsonicAPIDefinition.getSongsByGenre] call.
*/
class SubsonicApiGetSongsByGenreTest : SubsonicAPIClientTest() {
@Test
fun `Should handle error response`() {
val response = checkErrorCallParsed(mockWebServerRule) {
client.api.getSongsByGenre("Metal").execute()
}
response.songsList `should be equal to` emptyList()
}
@Test
fun `Should handle ok response`() {
mockWebServerRule.enqueueResponse("get_songs_by_genre_ok.json")
val response = client.api.getSongsByGenre("Trance").execute()
assertResponseSuccessful(response)
response.body()!!.songsList.size `should be equal to` 2
with(response.body()!!.songsList) {
this[0] `should be equal to` MusicDirectoryChild(
id = "575", parent = "576", isDir = false,
title = "Time Machine (Vadim Zhukov Remix)", album = "668",
artist = "Tasadi", year = 2008, genre = "Trance", size = 22467672,
contentType = "audio/mpeg", suffix = "mp3", duration = 561, bitRate = 320,
path = "Tasadi/668/00 Time Machine (Vadim Zhukov Remix).mp3",
isVideo = false, playCount = 0, created = parseDate("2016-10-23T21:58:29.000Z"),
albumId = "0", artistId = "0", type = "music"
)
this[1] `should be equal to` MusicDirectoryChild(
id = "621", parent = "622", isDir = false,
title = "My Heart (Vadim Zhukov Remix)", album = "668",
artist = "DJ Polyakov PPK Feat Kate Cameron", year = 2009, genre = "Trance",
size = 26805932, contentType = "audio/mpeg", suffix = "mp3", duration = 670,
bitRate = 320,
path = "DJ Polyakov PPK Feat Kate Cameron/668/00 My Heart (Vadim Zhukov " +
"Remix).mp3",
isVideo = false, playCount = 2,
created = parseDate("2016-10-23T21:58:29.000Z"),
albumId = "5", artistId = "4", type = "music"
)
}
}
@Test
fun `Should pass genre in request param`() {
val genre = "Rock"
mockWebServerRule.assertRequestParam(expectedParam = "genre=$genre") {
client.api.getSongsByGenre(genre = genre).execute()
}
}
@Test
fun `Should pass count in request param`() {
val count = 494
mockWebServerRule.assertRequestParam(expectedParam = "count=$count") {
client.api.getSongsByGenre("Trance", count = count).execute()
}
}
@Test
fun `Should pass offset in request param`() {
val offset = 31
mockWebServerRule.assertRequestParam(expectedParam = "offset=$offset") {
client.api.getSongsByGenre("Trance", offset = offset).execute()
}
}
@Test
fun `Should pass music folder id in request param`() {
val musicFolderId = "1010"
mockWebServerRule.assertRequestParam(expectedParam = "musicFolderId=$musicFolderId") {
client.api.getSongsByGenre("Trance", musicFolderId = musicFolderId).execute()
}
}
}

View File

@ -0,0 +1,51 @@
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.Artist
import org.moire.ultrasonic.api.subsonic.models.SearchTwoResult
/**
* Integration test for [SubsonicAPIClient] for getStarred2 call.
*/
@Suppress("NamingConventionViolation")
class SubsonicApiGetStarred2Test : SubsonicAPIClientTest() {
@Test
fun `Should handle error response`() {
val response = checkErrorCallParsed(mockWebServerRule) {
client.api.getStarred2().execute()
}
response.starred2 `should be equal to` SearchTwoResult()
}
@Test
fun `Should handle ok reponse`() {
mockWebServerRule.enqueueResponse("get_starred_2_ok.json")
val response = client.api.getStarred2().execute()
assertResponseSuccessful(response)
with(response.body()!!.starred2) {
albumList `should be equal to` emptyList()
artistList.size `should be equal to` 1
artistList[0] `should be equal to` Artist(
id = "364", name = "Parov Stelar",
starred = parseDate("2017-08-12T18:32:58.768Z")
)
songList `should be equal to` emptyList()
}
}
@Test
fun `Should pass music folder id in request param`() {
val musicFolderId = "441"
mockWebServerRule.assertRequestParam(
responseResourceName = "get_starred_2_ok.json",
expectedParam = "musicFolderId=$musicFolderId"
) {
client.api.getStarred2(musicFolderId = musicFolderId).execute()
}
}
}

View File

@ -0,0 +1,50 @@
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.Artist
import org.moire.ultrasonic.api.subsonic.models.SearchTwoResult
/**
* Integration test for [SubsonicAPIClient] for getStarred call.
*/
class SubsonicApiGetStarredTest : SubsonicAPIClientTest() {
@Test
fun `Should handle error response`() {
val response = checkErrorCallParsed(mockWebServerRule) {
client.api.getStarred().execute()
}
response.starred `should be equal to` SearchTwoResult()
}
@Test
fun `Should handle ok reponse`() {
mockWebServerRule.enqueueResponse("get_starred_ok.json")
val response = client.api.getStarred().execute()
assertResponseSuccessful(response)
with(response.body()!!.starred) {
albumList `should be equal to` emptyList()
artistList.size `should be equal to` 1
artistList[0] `should be equal to` Artist(
id = "364", name = "Parov Stelar",
starred = parseDate("2017-08-12T18:32:58.768Z")
)
songList `should be equal to` emptyList()
}
}
@Test
fun `Should pass music folder id in request param`() {
val musicFolderId = "441"
mockWebServerRule.assertRequestParam(
responseResourceName = "get_starred_ok.json",
expectedParam = "musicFolderId=$musicFolderId"
) {
client.api.getStarred(musicFolderId = musicFolderId).execute()
}
}
}

View File

@ -0,0 +1,56 @@
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.User
/**
* Integration test for [SubsonicAPIDefinition.getUser] call.
*/
class SubsonicApiGetUserTest : SubsonicAPIClientTest() {
@Test
fun `Should handle error response`() {
val response = checkErrorCallParsed(mockWebServerRule) {
client.api.getUser("some").execute()
}
response.user `should be equal to` User()
}
@Test
fun `Should handle ok response`() {
mockWebServerRule.enqueueResponse("get_user_ok.json")
val response = client.api.getUser("some").execute()
assertResponseSuccessful(response)
with(response.body()!!.user) {
username `should be equal to` "GodOfUniverse"
email `should be equal to` "some.mail@example.com"
scrobblingEnabled `should be equal to` false
adminRole `should be equal to` true
settingsRole `should be equal to` true
downloadRole `should be equal to` true
uploadRole `should be equal to` true
playlistRole `should be equal to` true
coverArtRole `should be equal to` true
commentRole `should be equal to` true
podcastRole `should be equal to` true
streamRole `should be equal to` true
jukeboxRole `should be equal to` true
shareRole `should be equal to` true
videoConverstionRole `should be equal to` false
folderList.size `should be equal to` 1
folderList[0] `should be equal to` 0
}
}
@Test
fun `Should pass username in request param`() {
val username = "Mighty"
mockWebServerRule.assertRequestParam(expectedParam = "username=$username") {
client.api.getUser(username).execute()
}
}
}

View File

@ -0,0 +1,40 @@
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.MusicDirectoryChild
/**
* Integration test for [SubsonicAPIDefinition.getVideos] call.
*/
class SubsonicApiGetVideosListTest : SubsonicAPIClientTest() {
@Test
fun `Should handle error response`() {
val response = checkErrorCallParsed(mockWebServerRule) {
client.api.getVideos().execute()
}
response.videosList `should be equal to` emptyList()
}
@Test
fun `Should handle ok response`() {
mockWebServerRule.enqueueResponse("get_videos_ok.json")
val response = client.api.getVideos().execute()
assertResponseSuccessful(response)
with(response.body()!!.videosList) {
size `should be equal to` 1
this[0] `should be equal to` MusicDirectoryChild(
id = "10402", parent = "10401",
isDir = false, title = "MVI_0512", album = "Incoming", size = 21889646,
contentType = "video/avi", suffix = "avi",
transcodedContentType = "video/x-flv", transcodedSuffix = "flv",
path = "Incoming/MVI_0512.avi", isVideo = true,
playCount = 0, created = parseDate("2017-11-19T12:34:33.000Z"),
type = "video"
)
}
}
}

View File

@ -0,0 +1,111 @@
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.JukeboxAction
import org.moire.ultrasonic.api.subsonic.models.JukeboxAction.GET
import org.moire.ultrasonic.api.subsonic.models.JukeboxAction.STATUS
import org.moire.ultrasonic.api.subsonic.models.JukeboxStatus
import org.moire.ultrasonic.api.subsonic.models.MusicDirectoryChild
/**
* Integration test for [SubsonicAPIDefinition.jukeboxControl] call.
*/
class SubsonicApiJukeboxControlTest : SubsonicAPIClientTest() {
@Test
fun `Should handle error response`() {
val response = checkErrorCallParsed(mockWebServerRule) {
client.api.jukeboxControl(GET).execute()
}
response.jukebox `should be equal to` JukeboxStatus()
}
@Test
fun `Should handle ok response with jukebox status`() {
mockWebServerRule.enqueueResponse("jukebox_control_status_ok.json")
val response = client.api.jukeboxControl(STATUS).execute()
assertResponseSuccessful(response)
with(response.body()!!.jukebox) {
currentIndex `should be equal to` 94
playing `should be equal to` true
gain `should be equal to` 0.32f
position `should be equal to` 3
playlistEntries `should be equal to` emptyList()
}
}
@Test
fun `Should handle ok response with jukebox playlist`() {
mockWebServerRule.enqueueResponse("jukebox_control_playlist_ok.json")
val response = client.api.jukeboxControl(GET).execute()
assertResponseSuccessful(response)
with(response.body()!!.jukebox) {
currentIndex `should be equal to` 887
playing `should be equal to` false
gain `should be equal to` 0.88f
position `should be equal to` 2
playlistEntries.size `should be equal to` 2
playlistEntries[1] `should be equal to` MusicDirectoryChild(
id = "4215", parent = "4186",
isDir = false, title = "Going to Hell", album = "Going to Hell",
artist = "The Pretty Reckless", track = 2, year = 2014, genre = "Hard Rock",
coverArt = "4186", size = 11089627, contentType = "audio/mpeg",
suffix = "mp3", duration = 277, bitRate = 320,
path = "The Pretty Reckless/Going to Hell/02 Going to Hell.mp3",
isVideo = false, playCount = 0, discNumber = 1,
created = parseDate("2016-10-23T21:30:41.000Z"), albumId = "388",
artistId = "238", type = "music"
)
}
}
@Test
fun `Should pass action in request params`() {
val action = JukeboxAction.SET_GAIN
mockWebServerRule.assertRequestParam(expectedParam = "action=$action") {
client.api.jukeboxControl(action).execute()
}
}
@Test
fun `Should pass index in request params`() {
val index = 440
mockWebServerRule.assertRequestParam(expectedParam = "index=$index") {
client.api.jukeboxControl(GET, index = index).execute()
}
}
@Test
fun `Should pass offset in request params`() {
val offset = 58223
mockWebServerRule.assertRequestParam(expectedParam = "offset=$offset") {
client.api.jukeboxControl(GET, offset = offset).execute()
}
}
@Test
fun `Should pass ids in request params`() {
val id = listOf("some-id1", "some-id2")
mockWebServerRule.assertRequestParam(expectedParam = "id=${id[0]}&id=${id[1]}") {
client.api.jukeboxControl(GET, ids = id).execute()
}
}
@Test
fun `Should pass gain in request params`() {
val gain = 0.73f
mockWebServerRule.assertRequestParam(expectedParam = "gain=$gain") {
client.api.jukeboxControl(GET, gain = gain).execute()
}
}
}

View File

@ -0,0 +1,42 @@
package org.moire.ultrasonic.api.subsonic
import org.amshove.kluent.`should contain`
import org.amshove.kluent.`should not contain`
import org.junit.Test
/**
* Integration test for [SubsonicAPIClient] that checks proper user password handling.
*/
class SubsonicApiPasswordTest : SubsonicAPIClientTest() {
@Test
fun `Should pass PasswordMD5Interceptor in query params for api version 1 13 0`() {
val clientV12 = SubsonicAPIClient(
config.copy(minimalProtocolVersion = SubsonicAPIVersions.V1_14_0)
)
mockWebServerRule.enqueueResponse("ping_ok.json")
clientV12.api.ping().execute()
with(mockWebServerRule.mockWebServer.takeRequest()) {
requestLine `should contain` "&s="
requestLine `should contain` "&t="
requestLine `should not contain` "&p=enc:"
}
}
@Test
fun `Should pass PasswordHexInterceptor in query params for api version 1 12 0`() {
val clientV11 = SubsonicAPIClient(
config.copy(minimalProtocolVersion = SubsonicAPIVersions.V1_12_0)
)
mockWebServerRule.enqueueResponse("ping_ok.json")
clientV11.api.ping().execute()
with(mockWebServerRule.mockWebServer.takeRequest()) {
requestLine `should not contain` "&s="
requestLine `should not contain` "&t="
requestLine `should contain` "&p=enc:"
}
}
}

View File

@ -0,0 +1,27 @@
package org.moire.ultrasonic.api.subsonic
import org.junit.Test
/**
* Integration test for [SubsonicAPIClient] that checks ping api call.
*/
class SubsonicApiPingRequestTest : SubsonicAPIClientTest() {
@Test
fun `Should parse ping ok response`() {
mockWebServerRule.enqueueResponse("ping_ok.json")
val response = client.api.ping().execute()
assertResponseSuccessful(response)
with(response.body()!!) {
assertBaseResponseOk()
}
}
@Test
fun `Should parse ping error response`() {
checkErrorCallParsed(mockWebServerRule) {
client.api.ping().execute()
}
}
}

View File

@ -0,0 +1,109 @@
package org.moire.ultrasonic.api.subsonic
import java.io.InputStream
import java.net.InetAddress
import java.security.KeyStore
import java.security.cert.CertificateFactory
import java.security.cert.X509Certificate
import javax.net.ssl.KeyManagerFactory
import javax.net.ssl.SSLContext
import javax.net.ssl.SSLHandshakeException
import javax.net.ssl.TrustManagerFactory
import okhttp3.mockwebserver.MockWebServer
import org.amshove.kluent.`should throw`
import org.junit.After
import org.junit.Before
import org.junit.Test
private const val PORT = 8443
private const val HOST = "localhost"
/**
* Integration test to check [SubsonicAPIClient] interaction with different SSL scenarios.
*/
class SubsonicApiSSLTest {
private val mockWebServer = MockWebServer()
@Before
fun setUp() {
val sslContext = createSSLContext(
loadResourceStream("self-signed.pem"),
loadResourceStream("self-signed.p12"),
""
)
mockWebServer.useHttps(sslContext.socketFactory, false)
mockWebServer.start(InetAddress.getByName(HOST), PORT)
}
@After
fun tearDown() {
mockWebServer.shutdown()
}
private fun createSSLContext(
certificatePemStream: InputStream,
certificatePkcs12Stream: InputStream,
password: String
): SSLContext {
var cert: X509Certificate?
val trustStore = KeyStore.getInstance(KeyStore.getDefaultType())
trustStore.load(null)
certificatePemStream.use {
cert = (
CertificateFactory.getInstance("X.509")
.generateCertificate(certificatePemStream)
) as X509Certificate
}
val alias = cert?.subjectX500Principal?.name
?: throw IllegalStateException("Failed to load certificate")
trustStore.setCertificateEntry(alias, cert)
val tmf = TrustManagerFactory.getInstance("X509")
tmf.init(trustStore)
val trustManagers = tmf.trustManagers
val sslContext = SSLContext.getInstance("TLS")
val ks = KeyStore.getInstance("PKCS12")
ks.load(certificatePkcs12Stream, password.toCharArray())
val kmf = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm())
kmf.init(ks, password.toCharArray())
sslContext.init(kmf.keyManagers, trustManagers, null)
return sslContext
}
@Test
fun `Should fail request if self-signed certificate support is disabled`() {
val client = createSubsonicClient(false)
mockWebServer.enqueueResponse("ping_ok.json")
val fail = {
client.api.ping().execute()
}
fail `should throw` SSLHandshakeException::class
}
@Test
fun `Should pass request if self-signed certificate support is enabled`() {
val client = createSubsonicClient(true)
mockWebServer.enqueueResponse("ping_ok.json")
val response = client.api.ping().execute()
assertResponseSuccessful(response)
}
private fun createSubsonicClient(allowSelfSignedCertificate: Boolean): SubsonicAPIClient {
val config = SubsonicClientConfiguration(
"https://$HOST:$PORT/",
USERNAME,
PASSWORD,
CLIENT_VERSION,
CLIENT_ID,
allowSelfSignedCertificate = allowSelfSignedCertificate
)
return SubsonicAPIClient(config)
}
}

View File

@ -0,0 +1,61 @@
package org.moire.ultrasonic.api.subsonic
import java.util.Calendar
import org.junit.Test
/**
* Integration test for [SubsonicAPIClient] for scrobble call.
*/
class SubsonicApiScrobbleTest : SubsonicAPIClientTest() {
@Test
fun `Should handle error response`() {
checkErrorCallParsed(mockWebServerRule) {
client.api.scrobble("id").execute()
}
}
@Test
fun `Should handle ok response`() {
mockWebServerRule.enqueueResponse("ping_ok.json")
val response = client.api.scrobble("id").execute()
assertResponseSuccessful(response)
}
@Test
fun `Should pass id param in request`() {
val id = "some-id"
mockWebServerRule.assertRequestParam(
responseResourceName = "ping_ok.json",
expectedParam = "id=$id"
) {
client.api.scrobble(id = id).execute()
}
}
@Test
fun `Should pass time param in request`() {
val time = Calendar.getInstance().timeInMillis
mockWebServerRule.assertRequestParam(
responseResourceName = "ping_ok.json",
expectedParam = "time=$time"
) {
client.api.scrobble(id = "some-id", time = time).execute()
}
}
@Test
fun `Should pass submission param in request`() {
val submission = false
mockWebServerRule.assertRequestParam(
responseResourceName = "ping_ok.json",
expectedParam = "submission=$submission"
) {
client.api.scrobble(id = "some-id", submission = submission).execute()
}
}
}

View File

@ -0,0 +1,134 @@
package org.moire.ultrasonic.api.subsonic
import java.util.Calendar
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.MusicDirectoryChild
import org.moire.ultrasonic.api.subsonic.models.SearchResult
/**
* Integration test for [SubsonicAPIClient] for search call.
*/
class SubsonicApiSearchTest : SubsonicAPIClientTest() {
@Test
fun `Should parse error response`() {
val response = checkErrorCallParsed(mockWebServerRule) {
client.api.search().execute()
}
response.searchResult `should not be` null
response.searchResult `should be equal to` SearchResult()
}
@Test
fun `Should parse ok response`() {
mockWebServerRule.enqueueResponse("search_ok.json")
val response = client.api.search().execute()
assertResponseSuccessful(response)
with(response.body()!!.searchResult) {
offset `should be equal to` 10
totalHits `should be equal to` 53
matchList.size `should be equal to` 1
matchList[0] `should be equal to` MusicDirectoryChild(
id = "5831", parent = "5766",
isDir = false, title = "You'll Be Under My Wheels",
album = "Need for Speed Most Wanted", artist = "The Prodigy",
track = 17, year = 2005, genre = "Rap", coverArt = "5766",
size = 5607024, contentType = "audio/mpeg", suffix = "mp3", duration = 233,
bitRate = 192,
path = "Compilations/Need for Speed Most Wanted/17 You'll Be Under My Wheels" +
".mp3",
isVideo = false, playCount = 0, discNumber = 1,
created = parseDate("2016-10-23T20:09:02.000Z"), albumId = "568",
artistId = "505", type = "music"
)
}
}
@Test
fun `Should pass artist param`() {
val artist = "some-artist"
mockWebServerRule.assertRequestParam(
responseResourceName = "search_ok.json",
expectedParam = "artist=$artist"
) {
client.api.search(artist = artist).execute()
}
}
@Test
fun `Should pass album param`() {
val album = "some-album"
mockWebServerRule.assertRequestParam(
responseResourceName = "search_ok.json",
expectedParam = "album=$album"
) {
client.api.search(album = album).execute()
}
}
@Test
fun `Should pass title param`() {
val title = "some-title"
mockWebServerRule.assertRequestParam(
responseResourceName = "search_ok.json",
expectedParam = "title=$title"
) {
client.api.search(title = title).execute()
}
}
@Test
fun `Should contain any param`() {
val any = "AnyString"
mockWebServerRule.assertRequestParam(
responseResourceName = "search_ok.json",
expectedParam = "any=$any"
) {
client.api.search(any = any).execute()
}
}
@Test
fun `Should contain count param`() {
val count = 11
mockWebServerRule.assertRequestParam(
responseResourceName = "search_ok.json",
expectedParam = "count=$count"
) {
client.api.search(count = count).execute()
}
}
@Test
fun `Should contain offset param`() {
val offset = 54
mockWebServerRule.assertRequestParam(
responseResourceName = "search_ok.json",
expectedParam = "offset=$offset"
) {
client.api.search(offset = offset).execute()
}
}
@Test
fun `Should contain newerThan param`() {
val newerThan = Calendar.getInstance()
mockWebServerRule.assertRequestParam(
responseResourceName = "search_ok.json",
expectedParam = "newerThan=${newerThan.time.time}"
) {
client.api.search(newerThan = newerThan.time.time).execute()
}
}
}

View File

@ -0,0 +1,146 @@
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.SearchThreeResult
/**
* Integration test for [SubsonicAPIClient] for search3 call.
*/
class SubsonicApiSearchThreeTest : SubsonicAPIClientTest() {
@Test
fun `Should parse error response`() {
val response = checkErrorCallParsed(mockWebServerRule) {
client.api.search3("some-query").execute()
}
response.searchResult `should not be` null
response.searchResult `should be equal to` SearchThreeResult()
}
@Test
fun `Should parse ok response`() {
mockWebServerRule.enqueueResponse("search3_ok.json")
val response = client.api.search3("some-query").execute()
assertResponseSuccessful(response)
with(response.body()!!.searchResult) {
artistList.size `should be equal to` 1
artistList[0] `should be equal to` Artist(
id = "505", name = "The Prodigy",
coverArt = "ar-505", albumCount = 5
)
albumList.size `should be equal to` 1
albumList[0] `should be equal to` Album(
id = "855",
name = "Always Outnumbered, Never Outgunned",
artist = "The Prodigy", artistId = "505", coverArt = "al-855", songCount = 12,
duration = 3313, created = parseDate("2016-10-23T20:57:27.000Z"),
year = 2004, genre = "Electronic"
)
songList.size `should be equal to` 1
songList[0] `should be equal to` MusicDirectoryChild(
id = "5831", parent = "5766",
isDir = false,
title = "You'll Be Under My Wheels", album = "Need for Speed Most Wanted",
artist = "The Prodigy", track = 17, year = 2005, genre = "Rap",
coverArt = "5766", size = 5607024, contentType = "audio/mpeg",
suffix = "mp3", duration = 233, bitRate = 192,
path = "Compilations/Need for Speed Most Wanted/17 You'll Be Under My Wheels" +
".mp3",
isVideo = false, playCount = 0, discNumber = 1,
created = parseDate("2016-10-23T20:09:02.000Z"), albumId = "568",
artistId = "505", type = "music"
)
}
}
@Test
fun `Should pass query as request param`() {
val query = "some-wip-query"
mockWebServerRule.assertRequestParam(
responseResourceName = "search3_ok.json",
expectedParam = "query=$query"
) {
client.api.search3(query = query).execute()
}
}
@Test
fun `Should pass artist count as request param`() {
val artistCount = 67
mockWebServerRule.assertRequestParam(
responseResourceName = "search3_ok.json",
expectedParam = "artistCount=$artistCount"
) {
client.api.search3("some", artistCount = artistCount).execute()
}
}
@Test
fun `Should pass artist offset as request param`() {
val artistOffset = 34
mockWebServerRule.assertRequestParam(
responseResourceName = "search3_ok.json",
expectedParam = "artistOffset=$artistOffset"
) {
client.api.search3("some", artistOffset = artistOffset).execute()
}
}
@Test
fun `Should pass album count as request param`() {
val albumCount = 21
mockWebServerRule.assertRequestParam(
responseResourceName = "search3_ok.json",
expectedParam = "albumCount=$albumCount"
) {
client.api.search3("some", albumCount = albumCount).execute()
}
}
@Test
fun `Should pass album offset as request param`() {
val albumOffset = 43
mockWebServerRule.assertRequestParam(
responseResourceName = "search3_ok.json",
expectedParam = "albumOffset=$albumOffset"
) {
client.api.search3("some", albumOffset = albumOffset).execute()
}
}
@Test
fun `Should pass song count as request param`() {
val songCount = 15
mockWebServerRule.assertRequestParam(
responseResourceName = "search3_ok.json",
expectedParam = "songCount=$songCount"
) {
client.api.search3("some", songCount = songCount).execute()
}
}
@Test
fun `Should pass music folder id as request param`() {
val musicFolderId = "43"
mockWebServerRule.assertRequestParam(
responseResourceName = "search3_ok.json",
expectedParam = "musicFolderId=$musicFolderId"
) {
client.api.search3("some", musicFolderId = musicFolderId).execute()
}
}
}

View File

@ -0,0 +1,142 @@
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
/**
* Integration test for [SubsonicAPIClient] for search2 call.
*/
class SubsonicApiSearchTwoTest : SubsonicAPIClientTest() {
@Test
fun `Should handle error response`() {
val response = checkErrorCallParsed(mockWebServerRule) {
client.api.search2("some-query").execute()
}
response.searchResult `should not be` null
response.searchResult `should be equal to` SearchTwoResult()
}
@Test
fun `Should parse ok response`() {
mockWebServerRule.enqueueResponse("search2_ok.json")
val response = client.api.search2("some-query").execute()
assertResponseSuccessful(response)
with(response.body()!!.searchResult) {
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` 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")
)
songList.size `should be equal to` 1
songList[0] `should be equal to` MusicDirectoryChild(
id = "5831", parent = "5766",
isDir = false,
title = "You'll Be Under My Wheels", album = "Need for Speed Most Wanted",
artist = "The Prodigy", track = 17, year = 2005, genre = "Rap",
coverArt = "5766", size = 5607024, contentType = "audio/mpeg",
suffix = "mp3", duration = 233, bitRate = 192,
path = "Compilations/Need for Speed Most Wanted/17 You'll Be Under My Wheels" +
".mp3",
isVideo = false, playCount = 0, discNumber = 1,
created = parseDate("2016-10-23T20:09:02.000Z"),
albumId = "568", artistId = "505", type = "music"
)
}
}
@Test
fun `Should pass query id in request param`() {
val query = "some"
mockWebServerRule.assertRequestParam(
responseResourceName = "search2_ok.json",
expectedParam = "query=$query"
) {
client.api.search2(query).execute()
}
}
@Test
fun `Should pass artist count in request param`() {
val artistCount = 45
mockWebServerRule.assertRequestParam(
responseResourceName = "search2_ok.json",
expectedParam = "artistCount=$artistCount"
) {
client.api.search2("some", artistCount = artistCount).execute()
}
}
@Test
fun `Should pass artist offset in request param`() {
val artistOffset = 13
mockWebServerRule.assertRequestParam(
responseResourceName = "search2_ok.json",
expectedParam = "artistOffset=$artistOffset"
) {
client.api.search2("some", artistOffset = artistOffset).execute()
}
}
@Test
fun `Should pass album count in request param`() {
val albumCount = 30
mockWebServerRule.assertRequestParam(
responseResourceName = "search2_ok.json",
expectedParam = "albumCount=$albumCount"
) {
client.api.search2("some", albumCount = albumCount).execute()
}
}
@Test
fun `Should pass album offset in request param`() {
val albumOffset = 91
mockWebServerRule.assertRequestParam(
responseResourceName = "search2_ok.json",
expectedParam = "albumOffset=$albumOffset"
) {
client.api.search2("some", albumOffset = albumOffset).execute()
}
}
@Test
fun `Should pass song count in request param`() {
val songCount = 22
mockWebServerRule.assertRequestParam(
responseResourceName = "search2_ok.json",
expectedParam = "songCount=$songCount"
) {
client.api.search2("some", songCount = songCount).execute()
}
}
@Test
fun `Should pass music folder id in request param`() {
val musicFolderId = "565"
mockWebServerRule.assertRequestParam(
responseResourceName = "search2_ok.json",
expectedParam = "musicFolderId=$musicFolderId"
) {
client.api.search2("some", musicFolderId = musicFolderId).execute()
}
}
}

View File

@ -0,0 +1,59 @@
package org.moire.ultrasonic.api.subsonic
import org.amshove.kluent.`should be`
import org.junit.Test
import org.moire.ultrasonic.api.subsonic.response.SubsonicResponse
/**
* Integration test for [SubsonicAPIClient] for setRating request.
*/
class SubsonicApiSetRatingTest : SubsonicAPIClientTest() {
@Test
fun `Should parse setRating ok response`() {
val id = "110"
val rating = 3
mockWebServerRule.enqueueResponse("ping_ok.json")
val response = client.api.setRating(id, rating).execute()
assertResponseSuccessful(response)
response.body()?.status `should be` SubsonicResponse.Status.OK
}
@Test
fun `Should parse setRating error response`() {
val id = "110223"
val rating = 5
checkErrorCallParsed(mockWebServerRule) {
client.api.setRating(id, rating).execute()
}
}
@Test
fun `Should pass id parameter`() {
val id = "110"
val rating = 5
mockWebServerRule.assertRequestParam(
responseResourceName = "ping_ok.json",
expectedParam = "id=$id"
) {
client.api.setRating(id, rating).execute()
}
}
@Test
fun `Should pass rating parameter`() {
val id = "110"
val rating = 5
mockWebServerRule.assertRequestParam(
responseResourceName = "ping_ok.json",
expectedParam = "rating=$rating"
) {
client.api.setRating(id, rating).execute()
}
}
}

View File

@ -0,0 +1,63 @@
package org.moire.ultrasonic.api.subsonic
import org.amshove.kluent.`should be`
import org.junit.Test
import org.moire.ultrasonic.api.subsonic.response.SubsonicResponse
/**
* Integration test for [SubsonicAPIClient] for star request.
*/
class SubsonicApiStarTest : SubsonicAPIClientTest() {
@Test
fun `Should parse star ok response`() {
mockWebServerRule.enqueueResponse("ping_ok.json")
val response = client.api.star().execute()
assertResponseSuccessful(response)
response.body()?.status `should be` SubsonicResponse.Status.OK
}
@Test
fun `Should parse star error response`() {
checkErrorCallParsed(mockWebServerRule) {
client.api.star().execute()
}
}
@Test
fun `Should pass id param`() {
val id = "110"
mockWebServerRule.assertRequestParam(
responseResourceName = "ping_ok.json",
expectedParam = "id=$id"
) {
client.api.star(id = id).execute()
}
}
@Test
fun `Should pass artist id param`() {
val artistId = "123"
mockWebServerRule.assertRequestParam(
responseResourceName = "ping_ok.json",
expectedParam = "artistId=$artistId"
) {
client.api.star(artistId = artistId).execute()
}
}
@Test
fun `Should pass album id param`() {
val albumId = "1001"
mockWebServerRule.assertRequestParam(
responseResourceName = "ping_ok.json",
expectedParam = "albumId=$albumId"
) {
client.api.star(albumId = albumId).execute()
}
}
}

View File

@ -0,0 +1,138 @@
package org.moire.ultrasonic.api.subsonic
import okhttp3.mockwebserver.MockResponse
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
/**
* Integration test for [SubsonicAPIClient] for [SubsonicAPIDefinition.stream] call.
*/
class SubsonicApiStreamTest : SubsonicAPIClientTest() {
@Test
fun `Should handle api error response`() {
mockWebServerRule.enqueueResponse("request_data_not_found_error_response.json")
val response = client.api.stream("some-id").execute().toStreamResponse()
with(response) {
stream `should be` null
responseHttpCode `should be equal to` 200
apiError `should be equal to` SubsonicError.RequestedDataWasNotFound
}
}
@Test
fun `Should handle server error`() {
val httpErrorCode = 404
mockWebServerRule.mockWebServer.enqueue(MockResponse().setResponseCode(httpErrorCode))
val response = client.api.stream("some-id").execute().toStreamResponse()
with(response) {
stream `should be` null
responseHttpCode `should be equal to` httpErrorCode
apiError `should be` null
}
}
@Test
fun `Should return successful call stream`() {
mockWebServerRule.mockWebServer.enqueue(
MockResponse()
.setBody(mockWebServerRule.loadJsonResponse("ping_ok.json"))
)
val response = client.api.stream("some-id").execute().toStreamResponse()
with(response) {
responseHttpCode `should be equal to` 200
apiError `should be` null
stream `should not be` null
val expectedContent = mockWebServerRule.loadJsonResponse("ping_ok.json")
stream!!.bufferedReader().readText() `should be equal to` expectedContent
}
}
@Test
fun `Should pass id as parameter`() {
val id = "asdo123"
mockWebServerRule.assertRequestParam("ping_ok.json", id) {
client.api.stream(id = id).execute()
}
}
@Test
fun `Should pass max bit rate as param`() {
val maxBitRate = 360
mockWebServerRule.assertRequestParam(
"ping_ok.json",
"maxBitRate=$maxBitRate"
) {
client.api.stream("some-id", maxBitRate = maxBitRate).execute()
}
}
@Test
fun `Should pass format as param`() {
val format = "aac"
mockWebServerRule.assertRequestParam(
"ping_ok.json",
"format=$format"
) {
client.api.stream("some-id", format = format).execute()
}
}
@Test
fun `Should pass time offset as param`() {
val timeOffset = 155
mockWebServerRule.assertRequestParam(
"ping_ok.json",
"timeOffset=$timeOffset"
) {
client.api.stream("some-id", timeOffset = timeOffset).execute()
}
}
@Test
fun `Should pass video size as param`() {
val videoSize = "44144"
mockWebServerRule.assertRequestParam(
"ping_ok.json",
"size=$videoSize"
) {
client.api.stream("some-id", videoSize = videoSize).execute()
}
}
@Test
fun `Should pass estimate content length as param`() {
val estimateContentLength = true
mockWebServerRule.assertRequestParam(
"ping_ok.json",
"estimateContentLength=$estimateContentLength"
) {
client.api.stream("some-id", estimateContentLength = estimateContentLength).execute()
}
}
@Test
fun `Should pass converted as param`() {
val converted = false
mockWebServerRule.assertRequestParam(
"ping_ok.json",
"converted=$converted"
) {
client.api.stream("some-id", converted = converted).execute()
}
}
}

View File

@ -0,0 +1,66 @@
package org.moire.ultrasonic.api.subsonic
import org.amshove.kluent.`should be`
import org.junit.Test
import org.moire.ultrasonic.api.subsonic.response.SubsonicResponse
/**
* Integration test for [SubsonicAPIClient] for unstar call.
*/
class SubsonicApiUnstarTest : SubsonicAPIClientTest() {
@Test
fun `Should parse ok response`() {
mockWebServerRule.enqueueResponse("ping_ok.json")
val response = client.api.unstar().execute()
assertResponseSuccessful(response)
response.body()?.status `should be` SubsonicResponse.Status.OK
}
@Test
fun `Should parse error response`() {
checkErrorCallParsed(
mockWebServerRule,
{
client.api.unstar().execute()
}
)
}
@Test
fun `Should pass id param`() {
val id = "545"
mockWebServerRule.assertRequestParam(
responseResourceName = "ping_ok.json",
expectedParam = "id=$id"
) {
client.api.unstar(id = id).execute()
}
}
@Test
fun `Should pass artistId param`() {
val artistId = "644"
mockWebServerRule.assertRequestParam(
responseResourceName = "ping_ok.json",
expectedParam = "artistId=$artistId"
) {
client.api.unstar(artistId = artistId).execute()
}
}
@Test
fun `Should pass albumId param`() {
val albumId = "3344"
mockWebServerRule.assertRequestParam(
responseResourceName = "ping_ok.json",
expectedParam = "albumId=$albumId"
) {
client.api.unstar(albumId = albumId).execute()
}
}
}

View File

@ -0,0 +1,97 @@
package org.moire.ultrasonic.api.subsonic
import org.junit.Test
/**
* Integration test for [SubsonicAPIClient] for updatePlaylist call.
*/
class SubsonicApiUpdatePlaylistTest : SubsonicAPIClientTest() {
@Test
fun `Should handle error response`() {
checkErrorCallParsed(mockWebServerRule) {
client.api.updatePlaylist("10").execute()
}
}
@Test
fun `Should handle ok response`() {
mockWebServerRule.enqueueResponse("ping_ok.json")
val response = client.api.updatePlaylist("15").execute()
assertResponseSuccessful(response)
}
@Test
fun `Should pass playlist id param in request`() {
val id = "5453"
mockWebServerRule.assertRequestParam(
responseResourceName = "ping_ok.json",
expectedParam = "playlistId=$id"
) {
client.api.updatePlaylist(id = id).execute()
}
}
@Test
fun `Should pass name param in request`() {
val name = "some-name"
mockWebServerRule.assertRequestParam(
responseResourceName = "ping_ok.json",
expectedParam = "name=$name"
) {
client.api.updatePlaylist("22", name = name).execute()
}
}
@Test
fun `Should pass comment param in request`() {
val comment = "some-unusual-comment"
mockWebServerRule.assertRequestParam(
responseResourceName = "ping_ok.json",
expectedParam = "comment=$comment"
) {
client.api.updatePlaylist("42", comment = comment).execute()
}
}
@Test
fun `Should pass public param in request`() {
val public = true
mockWebServerRule.assertRequestParam(
responseResourceName = "ping_ok.json",
expectedParam = "public=$public"
) {
client.api.updatePlaylist("53", public = public).execute()
}
}
@Test
fun `Should pass song ids to update in request`() {
val songIds = listOf("45", "81")
mockWebServerRule.assertRequestParam(
responseResourceName = "ping_ok.json",
expectedParam = "songIdToAdd=${songIds[0]}&songIdToAdd=${songIds[1]}"
) {
client.api.updatePlaylist("25", songIdsToAdd = songIds).execute()
}
}
@Test
fun `Should pass song indexes to remove in request`() {
val songIndexesToRemove = listOf(129, 1)
mockWebServerRule.assertRequestParam(
responseResourceName = "ping_ok.json",
expectedParam = "songIndexToRemove=${songIndexesToRemove[0]}&" +
"songIndexToRemove=${songIndexesToRemove[1]}"
) {
client.api.updatePlaylist("49", songIndexesToRemove = songIndexesToRemove).execute()
}
}
}

View File

@ -0,0 +1,51 @@
package org.moire.ultrasonic.api.subsonic
import org.junit.Test
/**
* Integration test for [SubsonicAPIDefinition.updateShare] call.
*/
class SubsonicApiUpdateShareTest : SubsonicAPIClientTest() {
@Test
fun `Should handle error response`() {
checkErrorCallParsed(mockWebServerRule) {
client.api.updateShare("11").execute()
}
}
@Test
fun `Should handle ok response`() {
mockWebServerRule.enqueueResponse("ping_ok.json")
val response = client.api.updateShare("12").execute()
assertResponseSuccessful(response)
}
@Test
fun `Should pass id in request params`() {
val id = "4432"
mockWebServerRule.assertRequestParam(expectedParam = "id=$id") {
client.api.updateShare(id = id).execute()
}
}
@Test
fun `Should pass description in request params`() {
val description = "some-description"
mockWebServerRule.assertRequestParam(expectedParam = "description=$description") {
client.api.updateShare("123", description = description).execute()
}
}
@Test
fun `Should pass expires in request params`() {
val expires = 223123123L
mockWebServerRule.assertRequestParam(expectedParam = "expires=$expires") {
client.api.updateShare("12", expires = expires).execute()
}
}
}

View File

@ -0,0 +1,52 @@
package org.moire.ultrasonic.api.subsonic
import org.amshove.kluent.`should be`
import org.junit.Before
import org.junit.Test
/**
* Integration test for [VersionAwareJacksonConverterFactory].
*/
class VersionAwareJacksonConverterFactoryTest : SubsonicAPIClientTest() {
private val initialProtocolVersion = SubsonicAPIVersions.V1_1_0
private var updatedProtocolVersion = SubsonicAPIVersions.V1_1_0
@Before
override fun setUp() {
config = SubsonicClientConfiguration(
mockWebServerRule.mockWebServer.url("/").toString(),
USERNAME,
PASSWORD,
initialProtocolVersion,
CLIENT_ID
)
client = SubsonicAPIClient(config)
}
@Test
fun `Should update version from response`() {
mockWebServerRule.enqueueResponse("ping_ok.json")
client.api.ping().execute()
client.protocolVersion.`should be`(SubsonicAPIVersions.V1_13_0)
}
@Test
fun `Should update version from response with utf-8 bom`() {
mockWebServerRule.enqueueResponse("ping_ok_utf8_bom.json")
client.api.ping().execute()
client.protocolVersion.`should be`(SubsonicAPIVersions.V1_16_0)
}
@Test
fun `Should not update version if response json doesn't contain version`() {
mockWebServerRule.enqueueResponse("non_subsonic_response.json")
client.api.stream("1234").execute()
client.protocolVersion.`should be`(initialProtocolVersion)
}
}

View File

@ -0,0 +1,35 @@
package org.moire.ultrasonic.api.subsonic.interceptors
import okhttp3.Interceptor
import okhttp3.OkHttpClient
import okhttp3.Request
import org.junit.Before
import org.junit.Rule
import org.moire.ultrasonic.api.subsonic.rules.MockWebServerRule
/**
* Base class for testing [okhttp3.Interceptor] implementations.
*/
abstract class BaseInterceptorTest {
@Rule @JvmField val mockWebServerRule = MockWebServerRule()
lateinit var client: OkHttpClient
abstract val interceptor: Interceptor
@Before
fun setUp() {
client = OkHttpClient.Builder().addInterceptor(interceptor).build()
}
/**
* Creates [Request] to use with [mockWebServerRule].
*
* @param additionalParams passes [Request.Builder] to add additionally required
* params to the [Request].
*/
fun createRequest(additionalParams: (Request.Builder) -> Unit): Request = Request.Builder()
.url(mockWebServerRule.mockWebServer.url("/"))
.also { additionalParams(it) }
.build()
}

View File

@ -0,0 +1,33 @@
package org.moire.ultrasonic.api.subsonic.interceptors
import okhttp3.Interceptor
import okhttp3.mockwebserver.MockResponse
import org.amshove.kluent.`should contain`
import org.amshove.kluent.`should not contain`
import org.apache.commons.codec.binary.Hex
import org.junit.Test
import org.moire.ultrasonic.api.subsonic.PASSWORD
/**
* Integration test for [PasswordHexInterceptor].
*/
class PasswordHexInterceptorTest : BaseInterceptorTest() {
private val password = "some-password"
override val interceptor: Interceptor get() = PasswordHexInterceptor(password)
@Test
fun `Should pass hex encoded password in query params`() {
mockWebServerRule.mockWebServer.enqueue(MockResponse())
val request = createRequest { }
client.newCall(request).execute()
with(mockWebServerRule.mockWebServer.takeRequest()) {
requestLine `should not contain` "s="
requestLine `should not contain` "t="
val encodedPassword = String(Hex.encodeHex(PASSWORD.toByteArray(), false))
requestLine `should contain` "p=enc:$encodedPassword"
}
}
}

View File

@ -0,0 +1,42 @@
package org.moire.ultrasonic.api.subsonic.interceptors
import java.security.MessageDigest
import okhttp3.Interceptor
import okhttp3.mockwebserver.MockResponse
import org.amshove.kluent.`should contain`
import org.amshove.kluent.`should not contain`
import org.apache.commons.codec.binary.Hex
import org.junit.Test
/**
* Integration test for [PasswordMD5Interceptor].
*/
class PasswordMD5InterceptorTest : BaseInterceptorTest() {
private val password = "some-password"
override val interceptor: Interceptor get() = PasswordMD5Interceptor(password)
@Test
fun `Should pass password hash and salt in query params`() {
mockWebServerRule.mockWebServer.enqueue(MockResponse())
val request = createRequest { }
client.newCall(request).execute()
with(mockWebServerRule.mockWebServer.takeRequest()) {
requestLine `should contain` "s="
requestLine `should contain` "t="
requestLine `should not contain` "p=enc:"
val salt = requestLine.split('&').find { it.startsWith("s=") }
?.substringAfter('=')?.substringBefore(" ")
val expectedToken = String(
Hex.encodeHex(
MessageDigest.getInstance("MD5")
.digest("$password$salt".toByteArray()),
true
)
)
requestLine `should contain` "t=$expectedToken"
}
}
}

View File

@ -0,0 +1,59 @@
package org.moire.ultrasonic.api.subsonic.interceptors
import okhttp3.Interceptor
import okhttp3.mockwebserver.MockResponse
import org.amshove.kluent.`should be equal to`
import org.amshove.kluent.`should contain`
import org.amshove.kluent.`should not contain`
import org.junit.Test
/**
* Unit test for [RangeHeaderInterceptor].
*/
class RangeHeaderInterceptorTest : BaseInterceptorTest() {
override val interceptor: Interceptor
get() = RangeHeaderInterceptor()
@Test
fun `Should update uppercase range header`() {
mockWebServerRule.mockWebServer.enqueue(MockResponse())
val offset = 111
val request = createRequest {
it.addHeader("Range", "$offset")
}
client.newCall(request).execute()
val executedRequest = mockWebServerRule.mockWebServer.takeRequest()
executedRequest.headers.names() `should contain` "Range"
executedRequest.headers["Range"]!! `should be equal to` "bytes=$offset-"
}
@Test
fun `Should not add range header if request doesnt contain it`() {
mockWebServerRule.mockWebServer.enqueue(MockResponse())
val request = createRequest { }
client.newCall(request).execute()
val executedRequest = mockWebServerRule.mockWebServer.takeRequest()
executedRequest.headers.names() `should not contain` "Range"
executedRequest.headers.names() `should not contain` "range"
}
@Test
fun `Should update lowercase range header`() {
mockWebServerRule.mockWebServer.enqueue(MockResponse())
val offset = 51233
val request = createRequest {
it.addHeader("range", "$offset")
}
client.newCall(request).execute()
val executedRequest = mockWebServerRule.mockWebServer.takeRequest()
executedRequest.headers.names() `should contain` "Range"
executedRequest.headers["Range"]!! `should be equal to` "bytes=$offset-"
}
}

View File

@ -0,0 +1,31 @@
package org.moire.ultrasonic.api.subsonic.interceptors
import kotlin.LazyThreadSafetyMode.NONE
import okhttp3.Interceptor
import org.amshove.kluent.`should contain`
import org.junit.Test
import org.moire.ultrasonic.api.subsonic.SubsonicAPIVersions
import org.moire.ultrasonic.api.subsonic.enqueueResponse
/**
* Integration test for [VersionInterceptor].
*/
class VersionInterceptorTest : BaseInterceptorTest() {
private val initialProtocolVersion = SubsonicAPIVersions.V1_1_0
override val interceptor: Interceptor by lazy(NONE) {
VersionInterceptor(initialProtocolVersion)
}
@Test
fun `Should add initial protocol version to request`() {
mockWebServerRule.enqueueResponse("ping_ok.json")
val request = createRequest {}
client.newCall(request).execute()
val requestLine = mockWebServerRule.mockWebServer.takeRequest().requestLine
requestLine `should contain` "v=${initialProtocolVersion.restApiVersion}"
}
}

View File

@ -0,0 +1,26 @@
package org.moire.ultrasonic.api.subsonic.rules
import okhttp3.mockwebserver.MockWebServer
import org.junit.rules.TestRule
import org.junit.runner.Description
import org.junit.runners.model.Statement
/**
* Starts mock web server for test and shut it down after.
*/
class MockWebServerRule : TestRule {
val mockWebServer = MockWebServer()
override fun apply(base: Statement?, description: Description?): Statement {
return object : Statement() {
override fun evaluate() {
try {
mockWebServer.start()
base?.evaluate()
} finally {
mockWebServer.shutdown()
}
}
}
}
}

View File

@ -0,0 +1,10 @@
{
"subsonic-response": {
"error": {
"message": "Video streaming not supported",
"code": 0
},
"version": "1.8.0",
"status": "failed"
}
}

View File

@ -0,0 +1,10 @@
{
"subsonic-response": {
"status": "failed",
"version": "1.15.0",
"error": {
"code": 0,
"message": "Some generic error message."
}
}
}

View File

@ -0,0 +1,31 @@
{
"subsonic-response" : {
"status" : "ok",
"version" : "1.15.0",
"albumList2" : {
"album" : [ {
"id" : "962",
"name" : "Fury",
"artist" : "Sick Puppies",
"artistId" : "473",
"coverArt" : "al-962",
"songCount" : 13,
"duration" : 2591,
"created" : "2017-09-02T17:34:51.000Z",
"year" : 2016,
"genre" : "Alternative Rock"
}, {
"id" : "961",
"name" : "Endless Forms Most Beautiful",
"artist" : "Nightwish",
"artistId" : "559",
"coverArt" : "al-961",
"songCount" : 22,
"duration" : 9469,
"created" : "2017-09-02T16:22:47.000Z",
"year" : 2015,
"genre" : "Symphonic Metal"
} ]
}
}
}

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