Change base package name from org to audio
This commit is contained in:
parent
e8810a4619
commit
208c7e584b
|
@ -29,7 +29,7 @@ deploy-develop:
|
||||||
script:
|
script:
|
||||||
- eval `ssh-agent -s`
|
- eval `ssh-agent -s`
|
||||||
- ssh-add <(echo "$SSH_PRIVATE_KEY")
|
- ssh-add <(echo "$SSH_PRIVATE_KEY")
|
||||||
- scp -o StrictHostKeyChecking=no app/build/outputs/apk/debug/app-debug.apk fdroid@apps.funkwhale.audio:/srv/fdroid/fdroid/develop/repo/org.funkwhale.ffa.dev-$CI_COMMIT_SHORT_SHA.apk
|
- scp -o StrictHostKeyChecking=no app/build/outputs/apk/debug/app-debug.apk fdroid@apps.funkwhale.audio:/srv/fdroid/fdroid/develop/repo/audio.funkwhale.ffa.dev-$CI_COMMIT_SHORT_SHA.apk
|
||||||
- ssh -o StrictHostKeyChecking=no fdroid@apps.funkwhale.audio 'docker run --rm -u $(id -u):$(id -g) -v /srv/fdroid/fdroid/develop:/repo registry.gitlab.com/fdroid/docker-executable-fdroidserver:master update'
|
- ssh -o StrictHostKeyChecking=no fdroid@apps.funkwhale.audio 'docker run --rm -u $(id -u):$(id -g) -v /srv/fdroid/fdroid/develop:/repo registry.gitlab.com/fdroid/docker-executable-fdroidserver:master update'
|
||||||
tags:
|
tags:
|
||||||
- shell
|
- shell
|
||||||
|
|
|
@ -38,7 +38,7 @@ android {
|
||||||
compileSdkVersion(29)
|
compileSdkVersion(29)
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId = "org.funkwhale.ffa"
|
applicationId = "audio.funkwhale.ffa"
|
||||||
|
|
||||||
minSdkVersion(23)
|
minSdkVersion(23)
|
||||||
targetSdkVersion(29)
|
targetSdkVersion(29)
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
-keep class org.funkwhale.ffa.** { *; }
|
-keep class audio.funkwhale.ffa.** { *; }
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
package="org.funkwhale.ffa">
|
package="audio.funkwhale.ffa">
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
<permission android:name="android.permission.MEDIA_CONTENT_CONTROL" />
|
<permission android:name="android.permission.MEDIA_CONTENT_CONTROL" />
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:name="org.funkwhale.ffa.FFA"
|
android:name="audio.funkwhale.ffa.FFA"
|
||||||
android:allowBackup="false"
|
android:allowBackup="false"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.funkwhale.ffa
|
package audio.funkwhale.ffa
|
||||||
|
|
||||||
import android.app.Application
|
import android.app.Application
|
||||||
import androidx.appcompat.app.AppCompatDelegate
|
import androidx.appcompat.app.AppCompatDelegate
|
||||||
|
@ -13,17 +13,17 @@ import com.google.android.exoplayer2.upstream.cache.SimpleCache
|
||||||
import com.preference.PowerPreference
|
import com.preference.PowerPreference
|
||||||
import kotlinx.coroutines.channels.BroadcastChannel
|
import kotlinx.coroutines.channels.BroadcastChannel
|
||||||
import kotlinx.coroutines.channels.ConflatedBroadcastChannel
|
import kotlinx.coroutines.channels.ConflatedBroadcastChannel
|
||||||
import org.funkwhale.ffa.playback.MediaSession
|
import audio.funkwhale.ffa.playback.MediaSession
|
||||||
import org.funkwhale.ffa.playback.QueueManager
|
import audio.funkwhale.ffa.playback.QueueManager
|
||||||
import org.funkwhale.ffa.utils.*
|
import audio.funkwhale.ffa.utils.*
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
class FFA : Application() {
|
class FFA : Application() {
|
||||||
companion object {
|
companion object {
|
||||||
private var instance: FFA = FFA()
|
private var instance: audio.funkwhale.ffa.FFA = audio.funkwhale.ffa.FFA()
|
||||||
|
|
||||||
fun get(): FFA = instance
|
fun get(): audio.funkwhale.ffa.FFA = audio.funkwhale.ffa.FFA.Companion.instance
|
||||||
}
|
}
|
||||||
|
|
||||||
var defaultExceptionHandler: Thread.UncaughtExceptionHandler? = null
|
var defaultExceptionHandler: Thread.UncaughtExceptionHandler? = null
|
||||||
|
@ -70,7 +70,7 @@ class FFA : Application() {
|
||||||
|
|
||||||
Thread.setDefaultUncaughtExceptionHandler(CrashReportHandler())
|
Thread.setDefaultUncaughtExceptionHandler(CrashReportHandler())
|
||||||
|
|
||||||
instance = this
|
audio.funkwhale.ffa.FFA.Companion.instance = this
|
||||||
|
|
||||||
when (PowerPreference.getDefaultFile().getString("night_mode")) {
|
when (PowerPreference.getDefaultFile().getString("night_mode")) {
|
||||||
"on" -> AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES)
|
"on" -> AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES)
|
|
@ -1,4 +1,4 @@
|
||||||
package org.funkwhale.ffa.activities
|
package audio.funkwhale.ffa.activities
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
@ -12,12 +12,12 @@ import kotlinx.coroutines.delay
|
||||||
import kotlinx.coroutines.flow.collect
|
import kotlinx.coroutines.flow.collect
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
import org.funkwhale.ffa.FFA
|
import audio.funkwhale.ffa.FFA
|
||||||
import org.funkwhale.ffa.R
|
import audio.funkwhale.ffa.R
|
||||||
import org.funkwhale.ffa.adapters.DownloadsAdapter
|
import audio.funkwhale.ffa.adapters.DownloadsAdapter
|
||||||
import org.funkwhale.ffa.utils.Event
|
import audio.funkwhale.ffa.utils.Event
|
||||||
import org.funkwhale.ffa.utils.EventBus
|
import audio.funkwhale.ffa.utils.EventBus
|
||||||
import org.funkwhale.ffa.utils.getMetadata
|
import audio.funkwhale.ffa.utils.getMetadata
|
||||||
|
|
||||||
class DownloadsActivity : AppCompatActivity() {
|
class DownloadsActivity : AppCompatActivity() {
|
||||||
lateinit var adapter: DownloadsAdapter
|
lateinit var adapter: DownloadsAdapter
|
||||||
|
@ -60,7 +60,7 @@ class DownloadsActivity : AppCompatActivity() {
|
||||||
|
|
||||||
private fun refresh() {
|
private fun refresh() {
|
||||||
lifecycleScope.launch(Main) {
|
lifecycleScope.launch(Main) {
|
||||||
val cursor = FFA.get().exoDownloadManager.downloadIndex.getDownloads()
|
val cursor = audio.funkwhale.ffa.FFA.get().exoDownloadManager.downloadIndex.getDownloads()
|
||||||
|
|
||||||
adapter.downloads.clear()
|
adapter.downloads.clear()
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ class DownloadsActivity : AppCompatActivity() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private suspend fun refreshProgress() {
|
private suspend fun refreshProgress() {
|
||||||
val cursor = FFA.get().exoDownloadManager.downloadIndex.getDownloads()
|
val cursor = audio.funkwhale.ffa.FFA.get().exoDownloadManager.downloadIndex.getDownloads()
|
||||||
|
|
||||||
while (cursor.moveToNext()) {
|
while (cursor.moveToNext()) {
|
||||||
val download = cursor.download
|
val download = cursor.download
|
|
@ -1,4 +1,4 @@
|
||||||
package org.funkwhale.ffa.activities
|
package audio.funkwhale.ffa.activities
|
||||||
|
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
|
@ -9,7 +9,7 @@ import android.view.ViewGroup
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import org.funkwhale.ffa.R
|
import audio.funkwhale.ffa.R
|
||||||
import kotlinx.android.synthetic.main.activity_licences.*
|
import kotlinx.android.synthetic.main.activity_licences.*
|
||||||
import kotlinx.android.synthetic.main.row_licence.view.*
|
import kotlinx.android.synthetic.main.row_licence.view.*
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.funkwhale.ffa.activities
|
package audio.funkwhale.ffa.activities
|
||||||
|
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.content.res.Configuration
|
import android.content.res.Configuration
|
||||||
|
@ -9,10 +9,10 @@ import android.view.ViewGroup
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.core.view.doOnLayout
|
import androidx.core.view.doOnLayout
|
||||||
import androidx.lifecycle.lifecycleScope
|
import androidx.lifecycle.lifecycleScope
|
||||||
import org.funkwhale.ffa.R
|
import audio.funkwhale.ffa.R
|
||||||
import org.funkwhale.ffa.fragments.LoginDialog
|
import audio.funkwhale.ffa.fragments.LoginDialog
|
||||||
import org.funkwhale.ffa.utils.AppContext
|
import audio.funkwhale.ffa.utils.AppContext
|
||||||
import org.funkwhale.ffa.utils.Userinfo
|
import audio.funkwhale.ffa.utils.Userinfo
|
||||||
import com.github.kittinunf.fuel.Fuel
|
import com.github.kittinunf.fuel.Fuel
|
||||||
import com.github.kittinunf.fuel.coroutines.awaitObjectResponseResult
|
import com.github.kittinunf.fuel.coroutines.awaitObjectResponseResult
|
||||||
import com.github.kittinunf.fuel.gson.gsonDeserializerOf
|
import com.github.kittinunf.fuel.gson.gsonDeserializerOf
|
|
@ -1,4 +1,4 @@
|
||||||
package org.funkwhale.ffa.activities
|
package audio.funkwhale.ffa.activities
|
||||||
|
|
||||||
import android.animation.Animator
|
import android.animation.Animator
|
||||||
import android.animation.AnimatorListenerAdapter
|
import android.animation.AnimatorListenerAdapter
|
||||||
|
@ -37,17 +37,17 @@ import kotlinx.coroutines.Dispatchers.Main
|
||||||
import kotlinx.coroutines.flow.collect
|
import kotlinx.coroutines.flow.collect
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
import org.funkwhale.ffa.FFA
|
import audio.funkwhale.ffa.FFA
|
||||||
import org.funkwhale.ffa.R
|
import audio.funkwhale.ffa.R
|
||||||
import org.funkwhale.ffa.fragments.*
|
import audio.funkwhale.ffa.fragments.*
|
||||||
import org.funkwhale.ffa.playback.MediaControlsManager
|
import audio.funkwhale.ffa.playback.MediaControlsManager
|
||||||
import org.funkwhale.ffa.playback.PinService
|
import audio.funkwhale.ffa.playback.PinService
|
||||||
import org.funkwhale.ffa.playback.PlayerService
|
import audio.funkwhale.ffa.playback.PlayerService
|
||||||
import org.funkwhale.ffa.repositories.FavoritedRepository
|
import audio.funkwhale.ffa.repositories.FavoritedRepository
|
||||||
import org.funkwhale.ffa.repositories.FavoritesRepository
|
import audio.funkwhale.ffa.repositories.FavoritesRepository
|
||||||
import org.funkwhale.ffa.repositories.Repository
|
import audio.funkwhale.ffa.repositories.Repository
|
||||||
import org.funkwhale.ffa.utils.*
|
import audio.funkwhale.ffa.utils.*
|
||||||
import org.funkwhale.ffa.views.DisableableFrameLayout
|
import audio.funkwhale.ffa.views.DisableableFrameLayout
|
||||||
|
|
||||||
class MainActivity : AppCompatActivity() {
|
class MainActivity : AppCompatActivity() {
|
||||||
enum class ResultCode(val code: Int) {
|
enum class ResultCode(val code: Int) {
|
||||||
|
@ -253,7 +253,7 @@ class MainActivity : AppCompatActivity() {
|
||||||
|
|
||||||
if (resultCode == ResultCode.LOGOUT.code) {
|
if (resultCode == ResultCode.LOGOUT.code) {
|
||||||
Intent(this, LoginActivity::class.java).apply {
|
Intent(this, LoginActivity::class.java).apply {
|
||||||
FFA.get().deleteAllData()
|
audio.funkwhale.ffa.FFA.get().deleteAllData()
|
||||||
|
|
||||||
flags =
|
flags =
|
||||||
Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP
|
Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP
|
||||||
|
@ -292,7 +292,7 @@ class MainActivity : AppCompatActivity() {
|
||||||
EventBus.get().collect { message ->
|
EventBus.get().collect { message ->
|
||||||
when (message) {
|
when (message) {
|
||||||
is Event.LogOut -> {
|
is Event.LogOut -> {
|
||||||
FFA.get().deleteAllData()
|
audio.funkwhale.ffa.FFA.get().deleteAllData()
|
||||||
|
|
||||||
startActivity(Intent(this@MainActivity, LoginActivity::class.java).apply {
|
startActivity(Intent(this@MainActivity, LoginActivity::class.java).apply {
|
||||||
flags = Intent.FLAG_ACTIVITY_NO_HISTORY
|
flags = Intent.FLAG_ACTIVITY_NO_HISTORY
|
|
@ -1,4 +1,4 @@
|
||||||
package org.funkwhale.ffa.activities
|
package audio.funkwhale.ffa.activities
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
@ -6,13 +6,13 @@ import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.lifecycle.Lifecycle
|
import androidx.lifecycle.Lifecycle
|
||||||
import androidx.lifecycle.lifecycleScope
|
import androidx.lifecycle.lifecycleScope
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import org.funkwhale.ffa.R
|
import audio.funkwhale.ffa.R
|
||||||
import org.funkwhale.ffa.adapters.SearchAdapter
|
import audio.funkwhale.ffa.adapters.SearchAdapter
|
||||||
import org.funkwhale.ffa.fragments.AddToPlaylistDialog
|
import audio.funkwhale.ffa.fragments.AddToPlaylistDialog
|
||||||
import org.funkwhale.ffa.fragments.AlbumsFragment
|
import audio.funkwhale.ffa.fragments.AlbumsFragment
|
||||||
import org.funkwhale.ffa.fragments.ArtistsFragment
|
import audio.funkwhale.ffa.fragments.ArtistsFragment
|
||||||
import org.funkwhale.ffa.repositories.*
|
import audio.funkwhale.ffa.repositories.*
|
||||||
import org.funkwhale.ffa.utils.*
|
import audio.funkwhale.ffa.utils.*
|
||||||
import com.google.android.exoplayer2.offline.Download
|
import com.google.android.exoplayer2.offline.Download
|
||||||
import kotlinx.android.synthetic.main.activity_search.*
|
import kotlinx.android.synthetic.main.activity_search.*
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
|
@ -1,4 +1,4 @@
|
||||||
package org.funkwhale.ffa.activities
|
package audio.funkwhale.ffa.activities
|
||||||
|
|
||||||
import android.content.*
|
import android.content.*
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
@ -10,12 +10,12 @@ import androidx.preference.ListPreference
|
||||||
import androidx.preference.Preference
|
import androidx.preference.Preference
|
||||||
import androidx.preference.PreferenceFragmentCompat
|
import androidx.preference.PreferenceFragmentCompat
|
||||||
import androidx.preference.SeekBarPreference
|
import androidx.preference.SeekBarPreference
|
||||||
import org.funkwhale.ffa.BuildConfig
|
import audio.funkwhale.ffa.BuildConfig
|
||||||
import org.funkwhale.ffa.FFA
|
import audio.funkwhale.ffa.FFA
|
||||||
import org.funkwhale.ffa.R
|
import audio.funkwhale.ffa.R
|
||||||
import org.funkwhale.ffa.utils.Cache
|
import audio.funkwhale.ffa.utils.Cache
|
||||||
import org.funkwhale.ffa.utils.Command
|
import audio.funkwhale.ffa.utils.Command
|
||||||
import org.funkwhale.ffa.utils.CommandBus
|
import audio.funkwhale.ffa.utils.CommandBus
|
||||||
|
|
||||||
class SettingsActivity : AppCompatActivity() {
|
class SettingsActivity : AppCompatActivity() {
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
@ -82,7 +82,7 @@ class SettingsFragment : PreferenceFragmentCompat(), SharedPreferences.OnSharedP
|
||||||
.setPositiveButton(android.R.string.yes) { _, _ ->
|
.setPositiveButton(android.R.string.yes) { _, _ ->
|
||||||
CommandBus.send(Command.ClearQueue)
|
CommandBus.send(Command.ClearQueue)
|
||||||
|
|
||||||
FFA.get().deleteAllData()
|
audio.funkwhale.ffa.FFA.get().deleteAllData()
|
||||||
|
|
||||||
activity?.setResult(MainActivity.ResultCode.LOGOUT.code)
|
activity?.setResult(MainActivity.ResultCode.LOGOUT.code)
|
||||||
activity?.finish()
|
activity?.finish()
|
||||||
|
@ -150,7 +150,7 @@ class SettingsFragment : PreferenceFragmentCompat(), SharedPreferences.OnSharedP
|
||||||
}
|
}
|
||||||
|
|
||||||
preferenceManager.findPreference<Preference>("version")?.let {
|
preferenceManager.findPreference<Preference>("version")?.let {
|
||||||
it.summary = "${BuildConfig.VERSION_NAME} (${BuildConfig.VERSION_CODE})"
|
it.summary = "${audio.funkwhale.ffa.BuildConfig.VERSION_NAME} (${audio.funkwhale.ffa.BuildConfig.VERSION_CODE})"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,12 +1,12 @@
|
||||||
package org.funkwhale.ffa.activities
|
package audio.funkwhale.ffa.activities
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import org.funkwhale.ffa.FFA
|
import audio.funkwhale.ffa.FFA
|
||||||
import org.funkwhale.ffa.utils.AppContext
|
import audio.funkwhale.ffa.utils.AppContext
|
||||||
import org.funkwhale.ffa.utils.Settings
|
import audio.funkwhale.ffa.utils.Settings
|
||||||
|
|
||||||
class SplashActivity : AppCompatActivity() {
|
class SplashActivity : AppCompatActivity() {
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
@ -21,7 +21,7 @@ class SplashActivity : AppCompatActivity() {
|
||||||
}
|
}
|
||||||
|
|
||||||
false -> Intent(this@SplashActivity, LoginActivity::class.java).apply {
|
false -> Intent(this@SplashActivity, LoginActivity::class.java).apply {
|
||||||
FFA.get().deleteAllData()
|
audio.funkwhale.ffa.FFA.get().deleteAllData()
|
||||||
|
|
||||||
flags = Intent.FLAG_ACTIVITY_NO_ANIMATION
|
flags = Intent.FLAG_ACTIVITY_NO_ANIMATION
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
package org.funkwhale.ffa.adapters
|
package audio.funkwhale.ffa.adapters
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import org.funkwhale.ffa.R
|
import audio.funkwhale.ffa.R
|
||||||
import org.funkwhale.ffa.fragments.OtterAdapter
|
import audio.funkwhale.ffa.fragments.OtterAdapter
|
||||||
import org.funkwhale.ffa.utils.Album
|
import audio.funkwhale.ffa.utils.Album
|
||||||
import org.funkwhale.ffa.utils.maybeLoad
|
import audio.funkwhale.ffa.utils.maybeLoad
|
||||||
import org.funkwhale.ffa.utils.maybeNormalizeUrl
|
import audio.funkwhale.ffa.utils.maybeNormalizeUrl
|
||||||
import com.squareup.picasso.Picasso
|
import com.squareup.picasso.Picasso
|
||||||
import jp.wasabeef.picasso.transformations.RoundedCornersTransformation
|
import jp.wasabeef.picasso.transformations.RoundedCornersTransformation
|
||||||
import kotlinx.android.synthetic.main.row_album.view.*
|
import kotlinx.android.synthetic.main.row_album.view.*
|
|
@ -1,15 +1,15 @@
|
||||||
package org.funkwhale.ffa.adapters
|
package audio.funkwhale.ffa.adapters
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import org.funkwhale.ffa.R
|
import audio.funkwhale.ffa.R
|
||||||
import org.funkwhale.ffa.fragments.OtterAdapter
|
import audio.funkwhale.ffa.fragments.OtterAdapter
|
||||||
import org.funkwhale.ffa.utils.Album
|
import audio.funkwhale.ffa.utils.Album
|
||||||
import org.funkwhale.ffa.utils.maybeLoad
|
import audio.funkwhale.ffa.utils.maybeLoad
|
||||||
import org.funkwhale.ffa.utils.maybeNormalizeUrl
|
import audio.funkwhale.ffa.utils.maybeNormalizeUrl
|
||||||
import com.squareup.picasso.Picasso
|
import com.squareup.picasso.Picasso
|
||||||
import jp.wasabeef.picasso.transformations.RoundedCornersTransformation
|
import jp.wasabeef.picasso.transformations.RoundedCornersTransformation
|
||||||
import kotlinx.android.synthetic.main.row_album_grid.view.*
|
import kotlinx.android.synthetic.main.row_album_grid.view.*
|
|
@ -1,15 +1,15 @@
|
||||||
package org.funkwhale.ffa.adapters
|
package audio.funkwhale.ffa.adapters
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import org.funkwhale.ffa.R
|
import audio.funkwhale.ffa.R
|
||||||
import org.funkwhale.ffa.fragments.OtterAdapter
|
import audio.funkwhale.ffa.fragments.OtterAdapter
|
||||||
import org.funkwhale.ffa.utils.Artist
|
import audio.funkwhale.ffa.utils.Artist
|
||||||
import org.funkwhale.ffa.utils.maybeLoad
|
import audio.funkwhale.ffa.utils.maybeLoad
|
||||||
import org.funkwhale.ffa.utils.maybeNormalizeUrl
|
import audio.funkwhale.ffa.utils.maybeNormalizeUrl
|
||||||
import com.squareup.picasso.Picasso
|
import com.squareup.picasso.Picasso
|
||||||
import jp.wasabeef.picasso.transformations.RoundedCornersTransformation
|
import jp.wasabeef.picasso.transformations.RoundedCornersTransformation
|
||||||
import kotlinx.android.synthetic.main.row_artist.view.*
|
import kotlinx.android.synthetic.main.row_artist.view.*
|
|
@ -1,10 +1,10 @@
|
||||||
package org.funkwhale.ffa.adapters
|
package audio.funkwhale.ffa.adapters
|
||||||
|
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.fragment.app.FragmentManager
|
import androidx.fragment.app.FragmentManager
|
||||||
import androidx.fragment.app.FragmentPagerAdapter
|
import androidx.fragment.app.FragmentPagerAdapter
|
||||||
import org.funkwhale.ffa.R
|
import audio.funkwhale.ffa.R
|
||||||
import org.funkwhale.ffa.fragments.*
|
import audio.funkwhale.ffa.fragments.*
|
||||||
|
|
||||||
class BrowseTabsAdapter(val context: Fragment, manager: FragmentManager) : FragmentPagerAdapter(manager, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT) {
|
class BrowseTabsAdapter(val context: Fragment, manager: FragmentManager) : FragmentPagerAdapter(manager, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT) {
|
||||||
var tabs = mutableListOf<Fragment>()
|
var tabs = mutableListOf<Fragment>()
|
|
@ -1,4 +1,4 @@
|
||||||
package org.funkwhale.ffa.adapters
|
package audio.funkwhale.ffa.adapters
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.graphics.drawable.Icon
|
import android.graphics.drawable.Icon
|
||||||
|
@ -6,9 +6,9 @@ import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import org.funkwhale.ffa.R
|
import audio.funkwhale.ffa.R
|
||||||
import org.funkwhale.ffa.playback.PinService
|
import audio.funkwhale.ffa.playback.PinService
|
||||||
import org.funkwhale.ffa.utils.*
|
import audio.funkwhale.ffa.utils.*
|
||||||
import com.google.android.exoplayer2.offline.Download
|
import com.google.android.exoplayer2.offline.Download
|
||||||
import com.google.android.exoplayer2.offline.DownloadService
|
import com.google.android.exoplayer2.offline.DownloadService
|
||||||
import kotlinx.android.synthetic.main.row_download.view.*
|
import kotlinx.android.synthetic.main.row_download.view.*
|
|
@ -1,4 +1,4 @@
|
||||||
package org.funkwhale.ffa.adapters
|
package audio.funkwhale.ffa.adapters
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
@ -10,9 +10,9 @@ import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.appcompat.widget.PopupMenu
|
import androidx.appcompat.widget.PopupMenu
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import org.funkwhale.ffa.R
|
import audio.funkwhale.ffa.R
|
||||||
import org.funkwhale.ffa.fragments.OtterAdapter
|
import audio.funkwhale.ffa.fragments.OtterAdapter
|
||||||
import org.funkwhale.ffa.utils.*
|
import audio.funkwhale.ffa.utils.*
|
||||||
import com.squareup.picasso.Picasso
|
import com.squareup.picasso.Picasso
|
||||||
import jp.wasabeef.picasso.transformations.RoundedCornersTransformation
|
import jp.wasabeef.picasso.transformations.RoundedCornersTransformation
|
||||||
import kotlinx.android.synthetic.main.row_track.view.*
|
import kotlinx.android.synthetic.main.row_track.view.*
|
|
@ -1,4 +1,4 @@
|
||||||
package org.funkwhale.ffa.adapters
|
package audio.funkwhale.ffa.adapters
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
@ -9,9 +9,9 @@ import androidx.appcompat.widget.PopupMenu
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import androidx.recyclerview.widget.ItemTouchHelper
|
import androidx.recyclerview.widget.ItemTouchHelper
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import org.funkwhale.ffa.R
|
import audio.funkwhale.ffa.R
|
||||||
import org.funkwhale.ffa.fragments.OtterAdapter
|
import audio.funkwhale.ffa.fragments.OtterAdapter
|
||||||
import org.funkwhale.ffa.utils.*
|
import audio.funkwhale.ffa.utils.*
|
||||||
import com.squareup.picasso.Picasso
|
import com.squareup.picasso.Picasso
|
||||||
import jp.wasabeef.picasso.transformations.RoundedCornersTransformation
|
import jp.wasabeef.picasso.transformations.RoundedCornersTransformation
|
||||||
import kotlinx.android.synthetic.main.row_track.view.*
|
import kotlinx.android.synthetic.main.row_track.view.*
|
|
@ -1,4 +1,4 @@
|
||||||
package org.funkwhale.ffa.adapters
|
package audio.funkwhale.ffa.adapters
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
|
@ -6,10 +6,10 @@ import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import org.funkwhale.ffa.R
|
import audio.funkwhale.ffa.R
|
||||||
import org.funkwhale.ffa.fragments.OtterAdapter
|
import audio.funkwhale.ffa.fragments.OtterAdapter
|
||||||
import org.funkwhale.ffa.utils.Playlist
|
import audio.funkwhale.ffa.utils.Playlist
|
||||||
import org.funkwhale.ffa.utils.toDurationString
|
import audio.funkwhale.ffa.utils.toDurationString
|
||||||
import com.squareup.picasso.Picasso
|
import com.squareup.picasso.Picasso
|
||||||
import jp.wasabeef.picasso.transformations.RoundedCornersTransformation
|
import jp.wasabeef.picasso.transformations.RoundedCornersTransformation
|
||||||
import kotlinx.android.synthetic.main.row_playlist.view.*
|
import kotlinx.android.synthetic.main.row_playlist.view.*
|
|
@ -1,17 +1,17 @@
|
||||||
package org.funkwhale.ffa.adapters
|
package audio.funkwhale.ffa.adapters
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import org.funkwhale.ffa.R
|
import audio.funkwhale.ffa.R
|
||||||
import org.funkwhale.ffa.fragments.OtterAdapter
|
import audio.funkwhale.ffa.fragments.OtterAdapter
|
||||||
import org.funkwhale.ffa.utils.AppContext
|
import audio.funkwhale.ffa.utils.AppContext
|
||||||
import org.funkwhale.ffa.utils.Event
|
import audio.funkwhale.ffa.utils.Event
|
||||||
import org.funkwhale.ffa.utils.EventBus
|
import audio.funkwhale.ffa.utils.EventBus
|
||||||
import org.funkwhale.ffa.utils.Radio
|
import audio.funkwhale.ffa.utils.Radio
|
||||||
import org.funkwhale.ffa.views.LoadingImageView
|
import audio.funkwhale.ffa.views.LoadingImageView
|
||||||
import com.preference.PowerPreference
|
import com.preference.PowerPreference
|
||||||
import kotlinx.android.synthetic.main.row_radio.view.*
|
import kotlinx.android.synthetic.main.row_radio.view.*
|
||||||
import kotlinx.android.synthetic.main.row_radio_header.view.*
|
import kotlinx.android.synthetic.main.row_radio_header.view.*
|
|
@ -1,4 +1,4 @@
|
||||||
package org.funkwhale.ffa.adapters
|
package audio.funkwhale.ffa.adapters
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
@ -12,8 +12,8 @@ import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.appcompat.widget.PopupMenu
|
import androidx.appcompat.widget.PopupMenu
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import org.funkwhale.ffa.R
|
import audio.funkwhale.ffa.R
|
||||||
import org.funkwhale.ffa.utils.*
|
import audio.funkwhale.ffa.utils.*
|
||||||
import com.squareup.picasso.Picasso
|
import com.squareup.picasso.Picasso
|
||||||
import jp.wasabeef.picasso.transformations.RoundedCornersTransformation
|
import jp.wasabeef.picasso.transformations.RoundedCornersTransformation
|
||||||
import kotlinx.android.synthetic.main.row_track.view.*
|
import kotlinx.android.synthetic.main.row_track.view.*
|
|
@ -1,4 +1,4 @@
|
||||||
package org.funkwhale.ffa.adapters
|
package audio.funkwhale.ffa.adapters
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
@ -9,9 +9,9 @@ import androidx.appcompat.widget.PopupMenu
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import androidx.recyclerview.widget.ItemTouchHelper
|
import androidx.recyclerview.widget.ItemTouchHelper
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import org.funkwhale.ffa.R
|
import audio.funkwhale.ffa.R
|
||||||
import org.funkwhale.ffa.fragments.OtterAdapter
|
import audio.funkwhale.ffa.fragments.OtterAdapter
|
||||||
import org.funkwhale.ffa.utils.*
|
import audio.funkwhale.ffa.utils.*
|
||||||
import com.squareup.picasso.Picasso
|
import com.squareup.picasso.Picasso
|
||||||
import jp.wasabeef.picasso.transformations.RoundedCornersTransformation
|
import jp.wasabeef.picasso.transformations.RoundedCornersTransformation
|
||||||
import kotlinx.android.synthetic.main.row_track.view.*
|
import kotlinx.android.synthetic.main.row_track.view.*
|
|
@ -1,4 +1,4 @@
|
||||||
package org.funkwhale.ffa.fragments
|
package audio.funkwhale.ffa.fragments
|
||||||
|
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import android.app.AlertDialog
|
import android.app.AlertDialog
|
||||||
|
@ -6,10 +6,10 @@ import android.view.View
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import androidx.core.widget.addTextChangedListener
|
import androidx.core.widget.addTextChangedListener
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import org.funkwhale.ffa.R
|
import audio.funkwhale.ffa.R
|
||||||
import org.funkwhale.ffa.adapters.PlaylistsAdapter
|
import audio.funkwhale.ffa.adapters.PlaylistsAdapter
|
||||||
import org.funkwhale.ffa.repositories.ManagementPlaylistsRepository
|
import audio.funkwhale.ffa.repositories.ManagementPlaylistsRepository
|
||||||
import org.funkwhale.ffa.utils.*
|
import audio.funkwhale.ffa.utils.*
|
||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
||||||
import kotlinx.android.synthetic.main.dialog_add_to_playlist.*
|
import kotlinx.android.synthetic.main.dialog_add_to_playlist.*
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
|
@ -1,4 +1,4 @@
|
||||||
package org.funkwhale.ffa.fragments
|
package audio.funkwhale.ffa.fragments
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
@ -13,13 +13,13 @@ import androidx.recyclerview.widget.RecyclerView
|
||||||
import androidx.swiperefreshlayout.widget.CircularProgressDrawable
|
import androidx.swiperefreshlayout.widget.CircularProgressDrawable
|
||||||
import androidx.transition.Fade
|
import androidx.transition.Fade
|
||||||
import androidx.transition.Slide
|
import androidx.transition.Slide
|
||||||
import org.funkwhale.ffa.R
|
import audio.funkwhale.ffa.R
|
||||||
import org.funkwhale.ffa.activities.MainActivity
|
import audio.funkwhale.ffa.activities.MainActivity
|
||||||
import org.funkwhale.ffa.adapters.AlbumsAdapter
|
import audio.funkwhale.ffa.adapters.AlbumsAdapter
|
||||||
import org.funkwhale.ffa.repositories.AlbumsRepository
|
import audio.funkwhale.ffa.repositories.AlbumsRepository
|
||||||
import org.funkwhale.ffa.repositories.ArtistTracksRepository
|
import audio.funkwhale.ffa.repositories.ArtistTracksRepository
|
||||||
import org.funkwhale.ffa.repositories.Repository
|
import audio.funkwhale.ffa.repositories.Repository
|
||||||
import org.funkwhale.ffa.utils.*
|
import audio.funkwhale.ffa.utils.*
|
||||||
import com.squareup.picasso.Picasso
|
import com.squareup.picasso.Picasso
|
||||||
import jp.wasabeef.picasso.transformations.RoundedCornersTransformation
|
import jp.wasabeef.picasso.transformations.RoundedCornersTransformation
|
||||||
import kotlinx.android.synthetic.main.fragment_albums.*
|
import kotlinx.android.synthetic.main.fragment_albums.*
|
|
@ -1,4 +1,4 @@
|
||||||
package org.funkwhale.ffa.fragments
|
package audio.funkwhale.ffa.fragments
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
@ -7,12 +7,12 @@ import androidx.recyclerview.widget.GridLayoutManager
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import androidx.transition.Fade
|
import androidx.transition.Fade
|
||||||
import androidx.transition.Slide
|
import androidx.transition.Slide
|
||||||
import org.funkwhale.ffa.R
|
import audio.funkwhale.ffa.R
|
||||||
import org.funkwhale.ffa.activities.MainActivity
|
import audio.funkwhale.ffa.activities.MainActivity
|
||||||
import org.funkwhale.ffa.adapters.AlbumsGridAdapter
|
import audio.funkwhale.ffa.adapters.AlbumsGridAdapter
|
||||||
import org.funkwhale.ffa.repositories.AlbumsRepository
|
import audio.funkwhale.ffa.repositories.AlbumsRepository
|
||||||
import org.funkwhale.ffa.utils.Album
|
import audio.funkwhale.ffa.utils.Album
|
||||||
import org.funkwhale.ffa.utils.AppContext
|
import audio.funkwhale.ffa.utils.AppContext
|
||||||
import kotlinx.android.synthetic.main.fragment_albums_grid.*
|
import kotlinx.android.synthetic.main.fragment_albums_grid.*
|
||||||
|
|
||||||
class AlbumsGridFragment : OtterFragment<Album, AlbumsGridAdapter>() {
|
class AlbumsGridFragment : OtterFragment<Album, AlbumsGridAdapter>() {
|
|
@ -1,4 +1,4 @@
|
||||||
package org.funkwhale.ffa.fragments
|
package audio.funkwhale.ffa.fragments
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
@ -9,13 +9,13 @@ import androidx.fragment.app.Fragment
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import androidx.transition.Fade
|
import androidx.transition.Fade
|
||||||
import androidx.transition.Slide
|
import androidx.transition.Slide
|
||||||
import org.funkwhale.ffa.R
|
import audio.funkwhale.ffa.R
|
||||||
import org.funkwhale.ffa.activities.MainActivity
|
import audio.funkwhale.ffa.activities.MainActivity
|
||||||
import org.funkwhale.ffa.adapters.ArtistsAdapter
|
import audio.funkwhale.ffa.adapters.ArtistsAdapter
|
||||||
import org.funkwhale.ffa.repositories.ArtistsRepository
|
import audio.funkwhale.ffa.repositories.ArtistsRepository
|
||||||
import org.funkwhale.ffa.utils.AppContext
|
import audio.funkwhale.ffa.utils.AppContext
|
||||||
import org.funkwhale.ffa.utils.Artist
|
import audio.funkwhale.ffa.utils.Artist
|
||||||
import org.funkwhale.ffa.utils.onViewPager
|
import audio.funkwhale.ffa.utils.onViewPager
|
||||||
import kotlinx.android.synthetic.main.fragment_artists.*
|
import kotlinx.android.synthetic.main.fragment_artists.*
|
||||||
|
|
||||||
class ArtistsFragment : OtterFragment<Artist, ArtistsAdapter>() {
|
class ArtistsFragment : OtterFragment<Artist, ArtistsAdapter>() {
|
|
@ -1,12 +1,12 @@
|
||||||
package org.funkwhale.ffa.fragments
|
package audio.funkwhale.ffa.fragments
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import org.funkwhale.ffa.R
|
import audio.funkwhale.ffa.R
|
||||||
import org.funkwhale.ffa.adapters.BrowseTabsAdapter
|
import audio.funkwhale.ffa.adapters.BrowseTabsAdapter
|
||||||
import kotlinx.android.synthetic.main.fragment_browse.view.*
|
import kotlinx.android.synthetic.main.fragment_browse.view.*
|
||||||
|
|
||||||
class BrowseFragment : Fragment() {
|
class BrowseFragment : Fragment() {
|
|
@ -1,13 +1,13 @@
|
||||||
package org.funkwhale.ffa.fragments
|
package audio.funkwhale.ffa.fragments
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.lifecycle.lifecycleScope
|
import androidx.lifecycle.lifecycleScope
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import org.funkwhale.ffa.R
|
import audio.funkwhale.ffa.R
|
||||||
import org.funkwhale.ffa.adapters.FavoritesAdapter
|
import audio.funkwhale.ffa.adapters.FavoritesAdapter
|
||||||
import org.funkwhale.ffa.repositories.FavoritesRepository
|
import audio.funkwhale.ffa.repositories.FavoritesRepository
|
||||||
import org.funkwhale.ffa.repositories.TracksRepository
|
import audio.funkwhale.ffa.repositories.TracksRepository
|
||||||
import org.funkwhale.ffa.utils.*
|
import audio.funkwhale.ffa.utils.*
|
||||||
import com.google.android.exoplayer2.offline.Download
|
import com.google.android.exoplayer2.offline.Download
|
||||||
import kotlinx.android.synthetic.main.fragment_favorites.*
|
import kotlinx.android.synthetic.main.fragment_favorites.*
|
||||||
import kotlinx.coroutines.Dispatchers.IO
|
import kotlinx.coroutines.Dispatchers.IO
|
|
@ -1,4 +1,4 @@
|
||||||
package org.funkwhale.ffa.fragments
|
package audio.funkwhale.ffa.fragments
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
|
@ -7,9 +7,9 @@ import android.view.ViewGroup
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.lifecycle.lifecycleScope
|
import androidx.lifecycle.lifecycleScope
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import org.funkwhale.ffa.R
|
import audio.funkwhale.ffa.R
|
||||||
import org.funkwhale.ffa.adapters.TracksAdapter
|
import audio.funkwhale.ffa.adapters.TracksAdapter
|
||||||
import org.funkwhale.ffa.utils.*
|
import audio.funkwhale.ffa.utils.*
|
||||||
import kotlinx.android.synthetic.main.partial_queue.*
|
import kotlinx.android.synthetic.main.partial_queue.*
|
||||||
import kotlinx.android.synthetic.main.partial_queue.view.*
|
import kotlinx.android.synthetic.main.partial_queue.view.*
|
||||||
import kotlinx.coroutines.Dispatchers.Main
|
import kotlinx.coroutines.Dispatchers.Main
|
|
@ -1,10 +1,10 @@
|
||||||
package org.funkwhale.ffa.fragments
|
package audio.funkwhale.ffa.fragments
|
||||||
|
|
||||||
import android.app.AlertDialog
|
import android.app.AlertDialog
|
||||||
import android.app.Dialog
|
import android.app.Dialog
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.fragment.app.DialogFragment
|
import androidx.fragment.app.DialogFragment
|
||||||
import org.funkwhale.ffa.R
|
import audio.funkwhale.ffa.R
|
||||||
|
|
||||||
class LoginDialog : DialogFragment() {
|
class LoginDialog : DialogFragment() {
|
||||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
|
@ -1,4 +1,4 @@
|
||||||
package org.funkwhale.ffa.fragments
|
package audio.funkwhale.ffa.fragments
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
|
@ -9,9 +9,9 @@ import androidx.lifecycle.lifecycleScope
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import androidx.recyclerview.widget.SimpleItemAnimator
|
import androidx.recyclerview.widget.SimpleItemAnimator
|
||||||
import org.funkwhale.ffa.repositories.HttpUpstream
|
import audio.funkwhale.ffa.repositories.HttpUpstream
|
||||||
import org.funkwhale.ffa.repositories.Repository
|
import audio.funkwhale.ffa.repositories.Repository
|
||||||
import org.funkwhale.ffa.utils.*
|
import audio.funkwhale.ffa.utils.*
|
||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
||||||
import kotlinx.android.synthetic.main.fragment_artists.*
|
import kotlinx.android.synthetic.main.fragment_artists.*
|
||||||
import kotlinx.coroutines.Dispatchers.IO
|
import kotlinx.coroutines.Dispatchers.IO
|
|
@ -1,4 +1,4 @@
|
||||||
package org.funkwhale.ffa.fragments
|
package audio.funkwhale.ffa.fragments
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.Gravity
|
import android.view.Gravity
|
||||||
|
@ -7,12 +7,12 @@ import androidx.appcompat.widget.PopupMenu
|
||||||
import androidx.core.os.bundleOf
|
import androidx.core.os.bundleOf
|
||||||
import androidx.lifecycle.lifecycleScope
|
import androidx.lifecycle.lifecycleScope
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import org.funkwhale.ffa.R
|
import audio.funkwhale.ffa.R
|
||||||
import org.funkwhale.ffa.adapters.PlaylistTracksAdapter
|
import audio.funkwhale.ffa.adapters.PlaylistTracksAdapter
|
||||||
import org.funkwhale.ffa.repositories.FavoritesRepository
|
import audio.funkwhale.ffa.repositories.FavoritesRepository
|
||||||
import org.funkwhale.ffa.repositories.ManagementPlaylistsRepository
|
import audio.funkwhale.ffa.repositories.ManagementPlaylistsRepository
|
||||||
import org.funkwhale.ffa.repositories.PlaylistTracksRepository
|
import audio.funkwhale.ffa.repositories.PlaylistTracksRepository
|
||||||
import org.funkwhale.ffa.utils.*
|
import audio.funkwhale.ffa.utils.*
|
||||||
import com.squareup.picasso.Picasso
|
import com.squareup.picasso.Picasso
|
||||||
import jp.wasabeef.picasso.transformations.RoundedCornersTransformation
|
import jp.wasabeef.picasso.transformations.RoundedCornersTransformation
|
||||||
import kotlinx.android.synthetic.main.fragment_tracks.*
|
import kotlinx.android.synthetic.main.fragment_tracks.*
|
|
@ -1,4 +1,4 @@
|
||||||
package org.funkwhale.ffa.fragments
|
package audio.funkwhale.ffa.fragments
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
@ -6,12 +6,12 @@ import android.view.animation.AccelerateDecelerateInterpolator
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import androidx.transition.Fade
|
import androidx.transition.Fade
|
||||||
import androidx.transition.Slide
|
import androidx.transition.Slide
|
||||||
import org.funkwhale.ffa.R
|
import audio.funkwhale.ffa.R
|
||||||
import org.funkwhale.ffa.activities.MainActivity
|
import audio.funkwhale.ffa.activities.MainActivity
|
||||||
import org.funkwhale.ffa.adapters.PlaylistsAdapter
|
import audio.funkwhale.ffa.adapters.PlaylistsAdapter
|
||||||
import org.funkwhale.ffa.repositories.PlaylistsRepository
|
import audio.funkwhale.ffa.repositories.PlaylistsRepository
|
||||||
import org.funkwhale.ffa.utils.AppContext
|
import audio.funkwhale.ffa.utils.AppContext
|
||||||
import org.funkwhale.ffa.utils.Playlist
|
import audio.funkwhale.ffa.utils.Playlist
|
||||||
import kotlinx.android.synthetic.main.fragment_playlists.*
|
import kotlinx.android.synthetic.main.fragment_playlists.*
|
||||||
|
|
||||||
class PlaylistsFragment : OtterFragment<Playlist, PlaylistsAdapter>() {
|
class PlaylistsFragment : OtterFragment<Playlist, PlaylistsAdapter>() {
|
|
@ -1,4 +1,4 @@
|
||||||
package org.funkwhale.ffa.fragments
|
package audio.funkwhale.ffa.fragments
|
||||||
|
|
||||||
import android.app.Dialog
|
import android.app.Dialog
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
@ -8,10 +8,10 @@ import android.view.ViewGroup
|
||||||
import androidx.fragment.app.DialogFragment
|
import androidx.fragment.app.DialogFragment
|
||||||
import androidx.lifecycle.lifecycleScope
|
import androidx.lifecycle.lifecycleScope
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import org.funkwhale.ffa.R
|
import audio.funkwhale.ffa.R
|
||||||
import org.funkwhale.ffa.adapters.TracksAdapter
|
import audio.funkwhale.ffa.adapters.TracksAdapter
|
||||||
import org.funkwhale.ffa.repositories.FavoritesRepository
|
import audio.funkwhale.ffa.repositories.FavoritesRepository
|
||||||
import org.funkwhale.ffa.utils.*
|
import audio.funkwhale.ffa.utils.*
|
||||||
import com.google.android.material.bottomsheet.BottomSheetBehavior
|
import com.google.android.material.bottomsheet.BottomSheetBehavior
|
||||||
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
|
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
|
||||||
import kotlinx.android.synthetic.main.fragment_queue.*
|
import kotlinx.android.synthetic.main.fragment_queue.*
|
|
@ -1,13 +1,13 @@
|
||||||
package org.funkwhale.ffa.fragments
|
package audio.funkwhale.ffa.fragments
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.core.view.forEach
|
import androidx.core.view.forEach
|
||||||
import androidx.lifecycle.lifecycleScope
|
import androidx.lifecycle.lifecycleScope
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import org.funkwhale.ffa.R
|
import audio.funkwhale.ffa.R
|
||||||
import org.funkwhale.ffa.adapters.RadiosAdapter
|
import audio.funkwhale.ffa.adapters.RadiosAdapter
|
||||||
import org.funkwhale.ffa.repositories.RadiosRepository
|
import audio.funkwhale.ffa.repositories.RadiosRepository
|
||||||
import org.funkwhale.ffa.utils.*
|
import audio.funkwhale.ffa.utils.*
|
||||||
import kotlinx.android.synthetic.main.fragment_radios.*
|
import kotlinx.android.synthetic.main.fragment_radios.*
|
||||||
import kotlinx.coroutines.Dispatchers.Main
|
import kotlinx.coroutines.Dispatchers.Main
|
||||||
import kotlinx.coroutines.flow.collect
|
import kotlinx.coroutines.flow.collect
|
|
@ -1,4 +1,4 @@
|
||||||
package org.funkwhale.ffa.fragments
|
package audio.funkwhale.ffa.fragments
|
||||||
|
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
@ -10,10 +10,10 @@ import android.view.ViewGroup.LayoutParams
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import androidx.core.os.bundleOf
|
import androidx.core.os.bundleOf
|
||||||
import androidx.fragment.app.DialogFragment
|
import androidx.fragment.app.DialogFragment
|
||||||
import org.funkwhale.ffa.R
|
import audio.funkwhale.ffa.R
|
||||||
import org.funkwhale.ffa.utils.Track
|
import audio.funkwhale.ffa.utils.Track
|
||||||
import org.funkwhale.ffa.utils.mustNormalizeUrl
|
import audio.funkwhale.ffa.utils.mustNormalizeUrl
|
||||||
import org.funkwhale.ffa.utils.toDurationString
|
import audio.funkwhale.ffa.utils.toDurationString
|
||||||
import kotlinx.android.synthetic.main.fragment_track_info_details.*
|
import kotlinx.android.synthetic.main.fragment_track_info_details.*
|
||||||
|
|
||||||
class TrackInfoDetailsFragment : DialogFragment() {
|
class TrackInfoDetailsFragment : DialogFragment() {
|
|
@ -1,4 +1,4 @@
|
||||||
package org.funkwhale.ffa.fragments
|
package audio.funkwhale.ffa.fragments
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.Gravity
|
import android.view.Gravity
|
||||||
|
@ -7,12 +7,12 @@ import androidx.appcompat.widget.PopupMenu
|
||||||
import androidx.core.os.bundleOf
|
import androidx.core.os.bundleOf
|
||||||
import androidx.lifecycle.lifecycleScope
|
import androidx.lifecycle.lifecycleScope
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import org.funkwhale.ffa.R
|
import audio.funkwhale.ffa.R
|
||||||
import org.funkwhale.ffa.adapters.TracksAdapter
|
import audio.funkwhale.ffa.adapters.TracksAdapter
|
||||||
import org.funkwhale.ffa.repositories.FavoritedRepository
|
import audio.funkwhale.ffa.repositories.FavoritedRepository
|
||||||
import org.funkwhale.ffa.repositories.FavoritesRepository
|
import audio.funkwhale.ffa.repositories.FavoritesRepository
|
||||||
import org.funkwhale.ffa.repositories.TracksRepository
|
import audio.funkwhale.ffa.repositories.TracksRepository
|
||||||
import org.funkwhale.ffa.utils.*
|
import audio.funkwhale.ffa.utils.*
|
||||||
import com.google.android.exoplayer2.offline.Download
|
import com.google.android.exoplayer2.offline.Download
|
||||||
import com.preference.PowerPreference
|
import com.preference.PowerPreference
|
||||||
import com.squareup.picasso.Picasso
|
import com.squareup.picasso.Picasso
|
|
@ -1,4 +1,4 @@
|
||||||
package org.funkwhale.ffa.playback
|
package audio.funkwhale.ffa.playback
|
||||||
|
|
||||||
import android.app.Notification
|
import android.app.Notification
|
||||||
import android.app.PendingIntent
|
import android.app.PendingIntent
|
||||||
|
@ -10,12 +10,12 @@ import androidx.core.app.NotificationCompat
|
||||||
import androidx.core.app.NotificationManagerCompat
|
import androidx.core.app.NotificationManagerCompat
|
||||||
import androidx.media.app.NotificationCompat.MediaStyle
|
import androidx.media.app.NotificationCompat.MediaStyle
|
||||||
import androidx.media.session.MediaButtonReceiver
|
import androidx.media.session.MediaButtonReceiver
|
||||||
import org.funkwhale.ffa.FFA
|
import audio.funkwhale.ffa.FFA
|
||||||
import org.funkwhale.ffa.R
|
import audio.funkwhale.ffa.R
|
||||||
import org.funkwhale.ffa.activities.MainActivity
|
import audio.funkwhale.ffa.activities.MainActivity
|
||||||
import org.funkwhale.ffa.utils.AppContext
|
import audio.funkwhale.ffa.utils.AppContext
|
||||||
import org.funkwhale.ffa.utils.Track
|
import audio.funkwhale.ffa.utils.Track
|
||||||
import org.funkwhale.ffa.utils.maybeNormalizeUrl
|
import audio.funkwhale.ffa.utils.maybeNormalizeUrl
|
||||||
import com.squareup.picasso.Picasso
|
import com.squareup.picasso.Picasso
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
import kotlinx.coroutines.Dispatchers.Default
|
import kotlinx.coroutines.Dispatchers.Default
|
||||||
|
@ -99,7 +99,7 @@ class MediaControlsManager(val context: Service, private val scope: CoroutineSco
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FFA.get().mediaSession.connector.invalidateMediaSessionMetadata()
|
audio.funkwhale.ffa.FFA.get().mediaSession.connector.invalidateMediaSessionMetadata()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package org.funkwhale.ffa.playback
|
package audio.funkwhale.ffa.playback
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
|
@ -6,8 +6,8 @@ import android.os.Bundle
|
||||||
import android.os.ResultReceiver
|
import android.os.ResultReceiver
|
||||||
import android.support.v4.media.session.MediaSessionCompat
|
import android.support.v4.media.session.MediaSessionCompat
|
||||||
import android.support.v4.media.session.PlaybackStateCompat
|
import android.support.v4.media.session.PlaybackStateCompat
|
||||||
import org.funkwhale.ffa.utils.Command
|
import audio.funkwhale.ffa.utils.Command
|
||||||
import org.funkwhale.ffa.utils.CommandBus
|
import audio.funkwhale.ffa.utils.CommandBus
|
||||||
import com.google.android.exoplayer2.ControlDispatcher
|
import com.google.android.exoplayer2.ControlDispatcher
|
||||||
import com.google.android.exoplayer2.Player
|
import com.google.android.exoplayer2.Player
|
||||||
import com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector
|
import com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector
|
|
@ -1,4 +1,4 @@
|
||||||
package org.funkwhale.ffa.playback
|
package audio.funkwhale.ffa.playback
|
||||||
|
|
||||||
import android.app.Notification
|
import android.app.Notification
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
@ -16,17 +16,17 @@ import kotlinx.coroutines.Dispatchers.Main
|
||||||
import kotlinx.coroutines.Job
|
import kotlinx.coroutines.Job
|
||||||
import kotlinx.coroutines.flow.collect
|
import kotlinx.coroutines.flow.collect
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import org.funkwhale.ffa.FFA
|
import audio.funkwhale.ffa.FFA
|
||||||
import org.funkwhale.ffa.R
|
import audio.funkwhale.ffa.R
|
||||||
import org.funkwhale.ffa.utils.AppContext
|
import audio.funkwhale.ffa.utils.AppContext
|
||||||
import org.funkwhale.ffa.utils.DownloadInfo
|
import audio.funkwhale.ffa.utils.DownloadInfo
|
||||||
import org.funkwhale.ffa.utils.Event
|
import audio.funkwhale.ffa.utils.Event
|
||||||
import org.funkwhale.ffa.utils.EventBus
|
import audio.funkwhale.ffa.utils.EventBus
|
||||||
import org.funkwhale.ffa.utils.Request
|
import audio.funkwhale.ffa.utils.Request
|
||||||
import org.funkwhale.ffa.utils.RequestBus
|
import audio.funkwhale.ffa.utils.RequestBus
|
||||||
import org.funkwhale.ffa.utils.Response
|
import audio.funkwhale.ffa.utils.Response
|
||||||
import org.funkwhale.ffa.utils.Track
|
import audio.funkwhale.ffa.utils.Track
|
||||||
import org.funkwhale.ffa.utils.mustNormalizeUrl
|
import audio.funkwhale.ffa.utils.mustNormalizeUrl
|
||||||
import java.util.Collections
|
import java.util.Collections
|
||||||
|
|
||||||
class PinService : DownloadService(AppContext.NOTIFICATION_DOWNLOADS) {
|
class PinService : DownloadService(AppContext.NOTIFICATION_DOWNLOADS) {
|
||||||
|
@ -74,7 +74,7 @@ class PinService : DownloadService(AppContext.NOTIFICATION_DOWNLOADS) {
|
||||||
return super.onStartCommand(intent, flags, startId)
|
return super.onStartCommand(intent, flags, startId)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getDownloadManager() = FFA.get().exoDownloadManager.apply {
|
override fun getDownloadManager() = audio.funkwhale.ffa.FFA.get().exoDownloadManager.apply {
|
||||||
addListener(DownloadListener())
|
addListener(DownloadListener())
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.funkwhale.ffa.playback
|
package audio.funkwhale.ffa.playback
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.app.Service
|
import android.app.Service
|
||||||
|
@ -26,9 +26,9 @@ import kotlinx.coroutines.*
|
||||||
import kotlinx.coroutines.Dispatchers.IO
|
import kotlinx.coroutines.Dispatchers.IO
|
||||||
import kotlinx.coroutines.Dispatchers.Main
|
import kotlinx.coroutines.Dispatchers.Main
|
||||||
import kotlinx.coroutines.flow.collect
|
import kotlinx.coroutines.flow.collect
|
||||||
import org.funkwhale.ffa.FFA
|
import audio.funkwhale.ffa.FFA
|
||||||
import org.funkwhale.ffa.R
|
import audio.funkwhale.ffa.R
|
||||||
import org.funkwhale.ffa.utils.*
|
import audio.funkwhale.ffa.utils.*
|
||||||
|
|
||||||
class PlayerService : Service() {
|
class PlayerService : Service() {
|
||||||
companion object {
|
companion object {
|
||||||
|
@ -63,12 +63,12 @@ class PlayerService : Service() {
|
||||||
when (key.keyCode) {
|
when (key.keyCode) {
|
||||||
KeyEvent.KEYCODE_MEDIA_PLAY, KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE -> {
|
KeyEvent.KEYCODE_MEDIA_PLAY, KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE -> {
|
||||||
if (hasAudioFocus(true)) MediaButtonReceiver.handleIntent(
|
if (hasAudioFocus(true)) MediaButtonReceiver.handleIntent(
|
||||||
FFA.get().mediaSession.session,
|
audio.funkwhale.ffa.FFA.get().mediaSession.session,
|
||||||
intent
|
intent
|
||||||
)
|
)
|
||||||
Unit
|
Unit
|
||||||
}
|
}
|
||||||
else -> MediaButtonReceiver.handleIntent(FFA.get().mediaSession.session, intent)
|
else -> MediaButtonReceiver.handleIntent(audio.funkwhale.ffa.FFA.get().mediaSession.session, intent)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -108,7 +108,7 @@ class PlayerService : Service() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mediaControlsManager = MediaControlsManager(this, scope, FFA.get().mediaSession.session)
|
mediaControlsManager = MediaControlsManager(this, scope, audio.funkwhale.ffa.FFA.get().mediaSession.session)
|
||||||
|
|
||||||
player = SimpleExoPlayer.Builder(this).build().apply {
|
player = SimpleExoPlayer.Builder(this).build().apply {
|
||||||
playWhenReady = false
|
playWhenReady = false
|
||||||
|
@ -118,9 +118,9 @@ class PlayerService : Service() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FFA.get().mediaSession.active = true
|
audio.funkwhale.ffa.FFA.get().mediaSession.active = true
|
||||||
|
|
||||||
FFA.get().mediaSession.connector.apply {
|
audio.funkwhale.ffa.FFA.get().mediaSession.connector.apply {
|
||||||
setPlayer(player)
|
setPlayer(player)
|
||||||
|
|
||||||
setMediaMetadataProvider {
|
setMediaMetadataProvider {
|
||||||
|
@ -271,7 +271,7 @@ class PlayerService : Service() {
|
||||||
setPlaybackState(false)
|
setPlaybackState(false)
|
||||||
player.release()
|
player.release()
|
||||||
|
|
||||||
FFA.get().mediaSession.active = false
|
audio.funkwhale.ffa.FFA.get().mediaSession.active = false
|
||||||
|
|
||||||
super.onDestroy()
|
super.onDestroy()
|
||||||
}
|
}
|
|
@ -1,10 +1,10 @@
|
||||||
package org.funkwhale.ffa.playback
|
package audio.funkwhale.ffa.playback
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import org.funkwhale.ffa.FFA
|
import audio.funkwhale.ffa.FFA
|
||||||
import org.funkwhale.ffa.R
|
import audio.funkwhale.ffa.R
|
||||||
import org.funkwhale.ffa.utils.*
|
import audio.funkwhale.ffa.utils.*
|
||||||
import com.github.kittinunf.fuel.gson.gsonDeserializerOf
|
import com.github.kittinunf.fuel.gson.gsonDeserializerOf
|
||||||
import com.google.android.exoplayer2.source.ConcatenatingMediaSource
|
import com.google.android.exoplayer2.source.ConcatenatingMediaSource
|
||||||
import com.google.android.exoplayer2.source.ProgressiveMediaSource
|
import com.google.android.exoplayer2.source.ProgressiveMediaSource
|
||||||
|
@ -30,10 +30,10 @@ class QueueManager(val context: Context) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val playbackCache = CacheDataSourceFactory(FFA.get().exoCache, http)
|
val playbackCache = CacheDataSourceFactory(audio.funkwhale.ffa.FFA.get().exoCache, http)
|
||||||
|
|
||||||
return CacheDataSourceFactory(
|
return CacheDataSourceFactory(
|
||||||
FFA.get().exoDownloadCache,
|
audio.funkwhale.ffa.FFA.get().exoDownloadCache,
|
||||||
playbackCache,
|
playbackCache,
|
||||||
FileDataSource.Factory(),
|
FileDataSource.Factory(),
|
||||||
null,
|
null,
|
|
@ -1,10 +1,10 @@
|
||||||
package org.funkwhale.ffa.playback
|
package audio.funkwhale.ffa.playback
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import org.funkwhale.ffa.R
|
import audio.funkwhale.ffa.R
|
||||||
import org.funkwhale.ffa.repositories.FavoritedRepository
|
import audio.funkwhale.ffa.repositories.FavoritedRepository
|
||||||
import org.funkwhale.ffa.repositories.Repository
|
import audio.funkwhale.ffa.repositories.Repository
|
||||||
import org.funkwhale.ffa.utils.*
|
import audio.funkwhale.ffa.utils.*
|
||||||
import com.github.kittinunf.fuel.Fuel
|
import com.github.kittinunf.fuel.Fuel
|
||||||
import com.github.kittinunf.fuel.coroutines.awaitObjectResponseResult
|
import com.github.kittinunf.fuel.coroutines.awaitObjectResponseResult
|
||||||
import com.github.kittinunf.fuel.coroutines.awaitObjectResult
|
import com.github.kittinunf.fuel.coroutines.awaitObjectResult
|
|
@ -1,10 +1,10 @@
|
||||||
package org.funkwhale.ffa.repositories
|
package audio.funkwhale.ffa.repositories
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import org.funkwhale.ffa.utils.Album
|
import audio.funkwhale.ffa.utils.Album
|
||||||
import org.funkwhale.ffa.utils.AlbumsCache
|
import audio.funkwhale.ffa.utils.AlbumsCache
|
||||||
import org.funkwhale.ffa.utils.AlbumsResponse
|
import audio.funkwhale.ffa.utils.AlbumsResponse
|
||||||
import org.funkwhale.ffa.utils.OtterResponse
|
import audio.funkwhale.ffa.utils.OtterResponse
|
||||||
import com.github.kittinunf.fuel.gson.gsonDeserializerOf
|
import com.github.kittinunf.fuel.gson.gsonDeserializerOf
|
||||||
import com.google.gson.reflect.TypeToken
|
import com.google.gson.reflect.TypeToken
|
||||||
import java.io.BufferedReader
|
import java.io.BufferedReader
|
|
@ -1,10 +1,10 @@
|
||||||
package org.funkwhale.ffa.repositories
|
package audio.funkwhale.ffa.repositories
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import org.funkwhale.ffa.utils.OtterResponse
|
import audio.funkwhale.ffa.utils.OtterResponse
|
||||||
import org.funkwhale.ffa.utils.Track
|
import audio.funkwhale.ffa.utils.Track
|
||||||
import org.funkwhale.ffa.utils.TracksCache
|
import audio.funkwhale.ffa.utils.TracksCache
|
||||||
import org.funkwhale.ffa.utils.TracksResponse
|
import audio.funkwhale.ffa.utils.TracksResponse
|
||||||
import com.github.kittinunf.fuel.gson.gsonDeserializerOf
|
import com.github.kittinunf.fuel.gson.gsonDeserializerOf
|
||||||
import com.google.gson.reflect.TypeToken
|
import com.google.gson.reflect.TypeToken
|
||||||
import java.io.BufferedReader
|
import java.io.BufferedReader
|
|
@ -1,10 +1,10 @@
|
||||||
package org.funkwhale.ffa.repositories
|
package audio.funkwhale.ffa.repositories
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import org.funkwhale.ffa.utils.Artist
|
import audio.funkwhale.ffa.utils.Artist
|
||||||
import org.funkwhale.ffa.utils.ArtistsCache
|
import audio.funkwhale.ffa.utils.ArtistsCache
|
||||||
import org.funkwhale.ffa.utils.ArtistsResponse
|
import audio.funkwhale.ffa.utils.ArtistsResponse
|
||||||
import org.funkwhale.ffa.utils.OtterResponse
|
import audio.funkwhale.ffa.utils.OtterResponse
|
||||||
import com.github.kittinunf.fuel.gson.gsonDeserializerOf
|
import com.github.kittinunf.fuel.gson.gsonDeserializerOf
|
||||||
import com.google.gson.reflect.TypeToken
|
import com.google.gson.reflect.TypeToken
|
||||||
import java.io.BufferedReader
|
import java.io.BufferedReader
|
|
@ -1,8 +1,8 @@
|
||||||
package org.funkwhale.ffa.repositories
|
package audio.funkwhale.ffa.repositories
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import org.funkwhale.ffa.FFA
|
import audio.funkwhale.ffa.FFA
|
||||||
import org.funkwhale.ffa.utils.*
|
import audio.funkwhale.ffa.utils.*
|
||||||
import com.github.kittinunf.fuel.Fuel
|
import com.github.kittinunf.fuel.Fuel
|
||||||
import com.github.kittinunf.fuel.coroutines.awaitByteArrayResponseResult
|
import com.github.kittinunf.fuel.coroutines.awaitByteArrayResponseResult
|
||||||
import com.github.kittinunf.fuel.gson.gsonDeserializerOf
|
import com.github.kittinunf.fuel.gson.gsonDeserializerOf
|
||||||
|
@ -32,7 +32,7 @@ class FavoritesRepository(override val context: Context?) : Repository<Track, Tr
|
||||||
|
|
||||||
track.bestUpload()?.let { upload ->
|
track.bestUpload()?.let { upload ->
|
||||||
maybeNormalizeUrl(upload.listen_url)?.let { url ->
|
maybeNormalizeUrl(upload.listen_url)?.let { url ->
|
||||||
track.cached = FFA.get().exoCache.isCached(url, 0, upload.duration * 1000L)
|
track.cached = audio.funkwhale.ffa.FFA.get().exoCache.isCached(url, 0, upload.duration * 1000L)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package org.funkwhale.ffa.repositories
|
package audio.funkwhale.ffa.repositories
|
||||||
|
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import org.funkwhale.ffa.utils.*
|
import audio.funkwhale.ffa.utils.*
|
||||||
import com.github.kittinunf.fuel.Fuel
|
import com.github.kittinunf.fuel.Fuel
|
||||||
import com.github.kittinunf.fuel.core.FuelError
|
import com.github.kittinunf.fuel.core.FuelError
|
||||||
import com.github.kittinunf.fuel.core.ResponseDeserializable
|
import com.github.kittinunf.fuel.core.ResponseDeserializable
|
|
@ -1,10 +1,10 @@
|
||||||
package org.funkwhale.ffa.repositories
|
package audio.funkwhale.ffa.repositories
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import org.funkwhale.ffa.utils.OtterResponse
|
import audio.funkwhale.ffa.utils.OtterResponse
|
||||||
import org.funkwhale.ffa.utils.PlaylistTrack
|
import audio.funkwhale.ffa.utils.PlaylistTrack
|
||||||
import org.funkwhale.ffa.utils.PlaylistTracksCache
|
import audio.funkwhale.ffa.utils.PlaylistTracksCache
|
||||||
import org.funkwhale.ffa.utils.PlaylistTracksResponse
|
import audio.funkwhale.ffa.utils.PlaylistTracksResponse
|
||||||
import com.github.kittinunf.fuel.gson.gsonDeserializerOf
|
import com.github.kittinunf.fuel.gson.gsonDeserializerOf
|
||||||
import com.google.gson.reflect.TypeToken
|
import com.google.gson.reflect.TypeToken
|
||||||
import kotlinx.coroutines.flow.map
|
import kotlinx.coroutines.flow.map
|
|
@ -1,7 +1,7 @@
|
||||||
package org.funkwhale.ffa.repositories
|
package audio.funkwhale.ffa.repositories
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import org.funkwhale.ffa.utils.*
|
import audio.funkwhale.ffa.utils.*
|
||||||
import com.github.kittinunf.fuel.Fuel
|
import com.github.kittinunf.fuel.Fuel
|
||||||
import com.github.kittinunf.fuel.coroutines.awaitByteArrayResponseResult
|
import com.github.kittinunf.fuel.coroutines.awaitByteArrayResponseResult
|
||||||
import com.github.kittinunf.fuel.coroutines.awaitObjectResponseResult
|
import com.github.kittinunf.fuel.coroutines.awaitObjectResponseResult
|
|
@ -1,10 +1,10 @@
|
||||||
package org.funkwhale.ffa.repositories
|
package audio.funkwhale.ffa.repositories
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import org.funkwhale.ffa.utils.OtterResponse
|
import audio.funkwhale.ffa.utils.OtterResponse
|
||||||
import org.funkwhale.ffa.utils.Radio
|
import audio.funkwhale.ffa.utils.Radio
|
||||||
import org.funkwhale.ffa.utils.RadiosCache
|
import audio.funkwhale.ffa.utils.RadiosCache
|
||||||
import org.funkwhale.ffa.utils.RadiosResponse
|
import audio.funkwhale.ffa.utils.RadiosResponse
|
||||||
import com.github.kittinunf.fuel.gson.gsonDeserializerOf
|
import com.github.kittinunf.fuel.gson.gsonDeserializerOf
|
||||||
import com.google.gson.reflect.TypeToken
|
import com.google.gson.reflect.TypeToken
|
||||||
import java.io.BufferedReader
|
import java.io.BufferedReader
|
|
@ -1,9 +1,9 @@
|
||||||
package org.funkwhale.ffa.repositories
|
package audio.funkwhale.ffa.repositories
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import org.funkwhale.ffa.utils.AppContext
|
import audio.funkwhale.ffa.utils.AppContext
|
||||||
import org.funkwhale.ffa.utils.Cache
|
import audio.funkwhale.ffa.utils.Cache
|
||||||
import org.funkwhale.ffa.utils.CacheItem
|
import audio.funkwhale.ffa.utils.CacheItem
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
import kotlinx.coroutines.Dispatchers.IO
|
import kotlinx.coroutines.Dispatchers.IO
|
||||||
import kotlinx.coroutines.Job
|
import kotlinx.coroutines.Job
|
|
@ -1,8 +1,8 @@
|
||||||
package org.funkwhale.ffa.repositories
|
package audio.funkwhale.ffa.repositories
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import org.funkwhale.ffa.FFA
|
import audio.funkwhale.ffa.FFA
|
||||||
import org.funkwhale.ffa.utils.*
|
import audio.funkwhale.ffa.utils.*
|
||||||
import com.github.kittinunf.fuel.gson.gsonDeserializerOf
|
import com.github.kittinunf.fuel.gson.gsonDeserializerOf
|
||||||
import com.google.gson.reflect.TypeToken
|
import com.google.gson.reflect.TypeToken
|
||||||
import kotlinx.coroutines.flow.map
|
import kotlinx.coroutines.flow.map
|
||||||
|
@ -33,7 +33,7 @@ class TracksSearchRepository(override val context: Context?, var query: String)
|
||||||
track.bestUpload()?.let { upload ->
|
track.bestUpload()?.let { upload ->
|
||||||
val url = mustNormalizeUrl(upload.listen_url)
|
val url = mustNormalizeUrl(upload.listen_url)
|
||||||
|
|
||||||
track.cached = FFA.get().exoCache.isCached(url, 0, upload.duration * 1000L)
|
track.cached = audio.funkwhale.ffa.FFA.get().exoCache.isCached(url, 0, upload.duration * 1000L)
|
||||||
}
|
}
|
||||||
|
|
||||||
track
|
track
|
|
@ -1,8 +1,8 @@
|
||||||
package org.funkwhale.ffa.repositories
|
package audio.funkwhale.ffa.repositories
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import org.funkwhale.ffa.FFA
|
import audio.funkwhale.ffa.FFA
|
||||||
import org.funkwhale.ffa.utils.*
|
import audio.funkwhale.ffa.utils.*
|
||||||
import com.github.kittinunf.fuel.gson.gsonDeserializerOf
|
import com.github.kittinunf.fuel.gson.gsonDeserializerOf
|
||||||
import com.google.android.exoplayer2.offline.Download
|
import com.google.android.exoplayer2.offline.Download
|
||||||
import com.google.gson.reflect.TypeToken
|
import com.google.gson.reflect.TypeToken
|
||||||
|
@ -20,7 +20,7 @@ class TracksRepository(override val context: Context?, albumId: Int) : Repositor
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
fun getDownloadedIds(): List<Int>? {
|
fun getDownloadedIds(): List<Int>? {
|
||||||
val cursor = FFA.get().exoDownloadManager.downloadIndex.getDownloads()
|
val cursor = audio.funkwhale.ffa.FFA.get().exoDownloadManager.downloadIndex.getDownloads()
|
||||||
val ids: MutableList<Int> = mutableListOf()
|
val ids: MutableList<Int> = mutableListOf()
|
||||||
|
|
||||||
while (cursor.moveToNext()) {
|
while (cursor.moveToNext()) {
|
||||||
|
@ -52,7 +52,7 @@ class TracksRepository(override val context: Context?, albumId: Int) : Repositor
|
||||||
track.bestUpload()?.let { upload ->
|
track.bestUpload()?.let { upload ->
|
||||||
val url = mustNormalizeUrl(upload.listen_url)
|
val url = mustNormalizeUrl(upload.listen_url)
|
||||||
|
|
||||||
track.cached = FFA.get().exoCache.isCached(url, 0, upload.duration * 1000L)
|
track.cached = audio.funkwhale.ffa.FFA.get().exoCache.isCached(url, 0, upload.duration * 1000L)
|
||||||
}
|
}
|
||||||
|
|
||||||
track
|
track
|
|
@ -1,4 +1,4 @@
|
||||||
package org.funkwhale.ffa.utils
|
package audio.funkwhale.ffa.utils
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
|
@ -8,7 +8,7 @@ import android.content.BroadcastReceiver
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import org.funkwhale.ffa.R
|
import audio.funkwhale.ffa.R
|
||||||
import com.github.kittinunf.fuel.core.FuelManager
|
import com.github.kittinunf.fuel.core.FuelManager
|
||||||
import com.github.kittinunf.fuel.core.Method
|
import com.github.kittinunf.fuel.core.Method
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package org.funkwhale.ffa.utils
|
package audio.funkwhale.ffa.utils
|
||||||
|
|
||||||
import org.funkwhale.ffa.FFA
|
|
||||||
import com.google.android.exoplayer2.offline.Download
|
import com.google.android.exoplayer2.offline.Download
|
||||||
import com.google.android.exoplayer2.offline.DownloadCursor
|
import com.google.android.exoplayer2.offline.DownloadCursor
|
||||||
import kotlinx.coroutines.Dispatchers.IO
|
import kotlinx.coroutines.Dispatchers.IO
|
||||||
|
@ -71,21 +70,21 @@ sealed class Response {
|
||||||
object EventBus {
|
object EventBus {
|
||||||
fun send(event: Event) {
|
fun send(event: Event) {
|
||||||
GlobalScope.launch(IO) {
|
GlobalScope.launch(IO) {
|
||||||
FFA.get().eventBus.offer(event)
|
audio.funkwhale.ffa.FFA.get().eventBus.offer(event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun get() = FFA.get().eventBus.asFlow()
|
fun get() = audio.funkwhale.ffa.FFA.get().eventBus.asFlow()
|
||||||
}
|
}
|
||||||
|
|
||||||
object CommandBus {
|
object CommandBus {
|
||||||
fun send(command: Command) {
|
fun send(command: Command) {
|
||||||
GlobalScope.launch(IO) {
|
GlobalScope.launch(IO) {
|
||||||
FFA.get().commandBus.offer(command)
|
audio.funkwhale.ffa.FFA.get().commandBus.offer(command)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun get() = FFA.get().commandBus.asFlow()
|
fun get() = audio.funkwhale.ffa.FFA.get().commandBus.asFlow()
|
||||||
}
|
}
|
||||||
|
|
||||||
object RequestBus {
|
object RequestBus {
|
||||||
|
@ -94,22 +93,22 @@ object RequestBus {
|
||||||
GlobalScope.launch(IO) {
|
GlobalScope.launch(IO) {
|
||||||
request.channel = it
|
request.channel = it
|
||||||
|
|
||||||
FFA.get().requestBus.offer(request)
|
audio.funkwhale.ffa.FFA.get().requestBus.offer(request)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun get() = FFA.get().requestBus.asFlow()
|
fun get() = audio.funkwhale.ffa.FFA.get().requestBus.asFlow()
|
||||||
}
|
}
|
||||||
|
|
||||||
object ProgressBus {
|
object ProgressBus {
|
||||||
fun send(current: Int, duration: Int, percent: Int) {
|
fun send(current: Int, duration: Int, percent: Int) {
|
||||||
GlobalScope.launch(IO) {
|
GlobalScope.launch(IO) {
|
||||||
FFA.get().progressBus.send(Triple(current, duration, percent))
|
audio.funkwhale.ffa.FFA.get().progressBus.send(Triple(current, duration, percent))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun get() = FFA.get().progressBus.asFlow().conflate()
|
fun get() = audio.funkwhale.ffa.FFA.get().progressBus.asFlow().conflate()
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend inline fun <reified T> Channel<Response>.wait(): T? {
|
suspend inline fun <reified T> Channel<Response>.wait(): T? {
|
|
@ -1,7 +1,7 @@
|
||||||
package org.funkwhale.ffa.utils
|
package audio.funkwhale.ffa.utils
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import org.funkwhale.ffa.activities.FwCredentials
|
import audio.funkwhale.ffa.activities.FwCredentials
|
||||||
import com.github.kittinunf.fuel.Fuel
|
import com.github.kittinunf.fuel.Fuel
|
||||||
import com.github.kittinunf.fuel.core.FuelError
|
import com.github.kittinunf.fuel.core.FuelError
|
||||||
import com.github.kittinunf.fuel.coroutines.awaitObjectResponseResult
|
import com.github.kittinunf.fuel.coroutines.awaitObjectResponseResult
|
|
@ -1,10 +1,10 @@
|
||||||
package org.funkwhale.ffa.utils
|
package audio.funkwhale.ffa.utils
|
||||||
|
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import org.funkwhale.ffa.R
|
import audio.funkwhale.ffa.R
|
||||||
import org.funkwhale.ffa.fragments.BrowseFragment
|
import audio.funkwhale.ffa.fragments.BrowseFragment
|
||||||
import org.funkwhale.ffa.repositories.Repository
|
import audio.funkwhale.ffa.repositories.Repository
|
||||||
import com.github.kittinunf.fuel.core.Request
|
import com.github.kittinunf.fuel.core.Request
|
||||||
import com.google.android.exoplayer2.offline.Download
|
import com.google.android.exoplayer2.offline.Download
|
||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
|
@ -1,4 +1,4 @@
|
||||||
package org.funkwhale.ffa.utils
|
package audio.funkwhale.ffa.utils
|
||||||
|
|
||||||
import com.google.android.exoplayer2.offline.Download
|
import com.google.android.exoplayer2.offline.Download
|
||||||
import com.preference.PowerPreference
|
import com.preference.PowerPreference
|
|
@ -1,4 +1,4 @@
|
||||||
package org.funkwhale.ffa.utils
|
package audio.funkwhale.ffa.utils
|
||||||
|
|
||||||
import com.github.kittinunf.fuel.Fuel
|
import com.github.kittinunf.fuel.Fuel
|
||||||
import com.github.kittinunf.fuel.coroutines.awaitObjectResponseResult
|
import com.github.kittinunf.fuel.coroutines.awaitObjectResponseResult
|
|
@ -1,4 +1,4 @@
|
||||||
package org.funkwhale.ffa.utils
|
package audio.funkwhale.ffa.utils
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
|
@ -16,7 +16,7 @@ private fun logClassName(): String {
|
||||||
val known = setOf(
|
val known = setOf(
|
||||||
"dalvik.system.VMStack",
|
"dalvik.system.VMStack",
|
||||||
"java.lang.Thread",
|
"java.lang.Thread",
|
||||||
"org.funkwhale.ffa.utils.UtilKt"
|
"audio.funkwhale.ffa.utils.UtilKt"
|
||||||
)
|
)
|
||||||
|
|
||||||
Thread.currentThread().stackTrace.forEach {
|
Thread.currentThread().stackTrace.forEach {
|
|
@ -1,4 +1,4 @@
|
||||||
package org.funkwhale.ffa.views
|
package audio.funkwhale.ffa.views
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.util.AttributeSet
|
import android.util.AttributeSet
|
|
@ -1,11 +1,11 @@
|
||||||
package org.funkwhale.ffa.views
|
package audio.funkwhale.ffa.views
|
||||||
|
|
||||||
import android.animation.ObjectAnimator
|
import android.animation.ObjectAnimator
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.graphics.drawable.Drawable
|
import android.graphics.drawable.Drawable
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
import org.funkwhale.ffa.R
|
import audio.funkwhale.ffa.R
|
||||||
|
|
||||||
object LoadingImageView {
|
object LoadingImageView {
|
||||||
fun start(context: Context?, image: ImageView): ObjectAnimator? {
|
fun start(context: Context?, image: ImageView): ObjectAnimator? {
|
|
@ -1,4 +1,4 @@
|
||||||
package org.funkwhale.ffa.views
|
package audio.funkwhale.ffa.views
|
||||||
|
|
||||||
import android.animation.ValueAnimator
|
import android.animation.ValueAnimator
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
@ -9,7 +9,7 @@ import android.view.MotionEvent
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewTreeObserver
|
import android.view.ViewTreeObserver
|
||||||
import android.view.animation.DecelerateInterpolator
|
import android.view.animation.DecelerateInterpolator
|
||||||
import org.funkwhale.ffa.R
|
import audio.funkwhale.ffa.R
|
||||||
import com.google.android.material.card.MaterialCardView
|
import com.google.android.material.card.MaterialCardView
|
||||||
import kotlinx.android.synthetic.main.partial_now_playing.view.*
|
import kotlinx.android.synthetic.main.partial_now_playing.view.*
|
||||||
import kotlin.math.abs
|
import kotlin.math.abs
|
|
@ -1,4 +1,4 @@
|
||||||
package org.funkwhale.ffa.views
|
package audio.funkwhale.ffa.views
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.util.AttributeSet
|
import android.util.AttributeSet
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<org.funkwhale.ffa.views.NowPlayingView
|
<audio.funkwhale.ffa.views.NowPlayingView
|
||||||
android:id="@+id/now_playing"
|
android:id="@+id/now_playing"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize"
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
|
|
||||||
<include layout="@layout/partial_now_playing" />
|
<include layout="@layout/partial_now_playing" />
|
||||||
|
|
||||||
</org.funkwhale.ffa.views.NowPlayingView>
|
</audio.funkwhale.ffa.views.NowPlayingView>
|
||||||
|
|
||||||
<com.google.android.material.bottomappbar.BottomAppBar
|
<com.google.android.material.bottomappbar.BottomAppBar
|
||||||
android:id="@+id/appbar"
|
android:id="@+id/appbar"
|
||||||
|
|
|
@ -79,7 +79,7 @@
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
app:layout_constraintGuide_percent=".50" />
|
app:layout_constraintGuide_percent=".50" />
|
||||||
|
|
||||||
<org.funkwhale.ffa.views.SquareImageView
|
<audio.funkwhale.ffa.views.SquareImageView
|
||||||
android:id="@+id/cover_top_left"
|
android:id="@+id/cover_top_left"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
|
@ -91,7 +91,7 @@
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:src="@tools:sample/avatars" />
|
tools:src="@tools:sample/avatars" />
|
||||||
|
|
||||||
<org.funkwhale.ffa.views.SquareImageView
|
<audio.funkwhale.ffa.views.SquareImageView
|
||||||
android:id="@+id/cover_top_right"
|
android:id="@+id/cover_top_right"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
|
@ -103,7 +103,7 @@
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:src="@tools:sample/avatars" />
|
tools:src="@tools:sample/avatars" />
|
||||||
|
|
||||||
<org.funkwhale.ffa.views.SquareImageView
|
<audio.funkwhale.ffa.views.SquareImageView
|
||||||
android:id="@+id/cover_bottom_left"
|
android:id="@+id/cover_bottom_left"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
|
@ -115,7 +115,7 @@
|
||||||
app:layout_constraintTop_toTopOf="@id/vertical"
|
app:layout_constraintTop_toTopOf="@id/vertical"
|
||||||
tools:src="@tools:sample/avatars" />
|
tools:src="@tools:sample/avatars" />
|
||||||
|
|
||||||
<org.funkwhale.ffa.views.SquareImageView
|
<audio.funkwhale.ffa.views.SquareImageView
|
||||||
android:id="@+id/cover_bottom_right"
|
android:id="@+id/cover_bottom_right"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize"
|
||||||
android:layout_marginEnd="16dp">
|
android:layout_marginEnd="16dp">
|
||||||
|
|
||||||
<org.funkwhale.ffa.views.SquareImageView
|
<audio.funkwhale.ffa.views.SquareImageView
|
||||||
android:id="@+id/now_playing_cover"
|
android:id="@+id/now_playing_cover"
|
||||||
android:layout_width="?attr/actionBarSize"
|
android:layout_width="?attr/actionBarSize"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize"
|
||||||
|
|
|
@ -6,14 +6,14 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/surface">
|
android:background="@color/surface">
|
||||||
|
|
||||||
<org.funkwhale.ffa.views.DisableableFrameLayout
|
<audio.funkwhale.ffa.views.DisableableFrameLayout
|
||||||
android:id="@+id/container"
|
android:id="@+id/container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginBottom="?attr/actionBarSize"
|
android:layout_marginBottom="?attr/actionBarSize"
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||||
|
|
||||||
<org.funkwhale.ffa.views.NowPlayingView
|
<audio.funkwhale.ffa.views.NowPlayingView
|
||||||
android:id="@+id/now_playing"
|
android:id="@+id/now_playing"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize"
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
<include layout="@layout/partial_now_playing" />
|
<include layout="@layout/partial_now_playing" />
|
||||||
|
|
||||||
</org.funkwhale.ffa.views.NowPlayingView>
|
</audio.funkwhale.ffa.views.NowPlayingView>
|
||||||
|
|
||||||
<com.google.android.material.bottomappbar.BottomAppBar
|
<com.google.android.material.bottomappbar.BottomAppBar
|
||||||
android:id="@+id/appbar"
|
android:id="@+id/appbar"
|
||||||
|
|
|
@ -81,7 +81,7 @@
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
app:layout_constraintGuide_percent=".50" />
|
app:layout_constraintGuide_percent=".50" />
|
||||||
|
|
||||||
<org.funkwhale.ffa.views.SquareImageView
|
<audio.funkwhale.ffa.views.SquareImageView
|
||||||
android:id="@+id/cover_top_left"
|
android:id="@+id/cover_top_left"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
|
@ -93,7 +93,7 @@
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:src="@tools:sample/avatars" />
|
tools:src="@tools:sample/avatars" />
|
||||||
|
|
||||||
<org.funkwhale.ffa.views.SquareImageView
|
<audio.funkwhale.ffa.views.SquareImageView
|
||||||
android:id="@+id/cover_top_right"
|
android:id="@+id/cover_top_right"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
|
@ -105,7 +105,7 @@
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:src="@tools:sample/avatars" />
|
tools:src="@tools:sample/avatars" />
|
||||||
|
|
||||||
<org.funkwhale.ffa.views.SquareImageView
|
<audio.funkwhale.ffa.views.SquareImageView
|
||||||
android:id="@+id/cover_bottom_left"
|
android:id="@+id/cover_bottom_left"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
|
@ -117,7 +117,7 @@
|
||||||
app:layout_constraintTop_toTopOf="@id/vertical"
|
app:layout_constraintTop_toTopOf="@id/vertical"
|
||||||
tools:src="@tools:sample/avatars" />
|
tools:src="@tools:sample/avatars" />
|
||||||
|
|
||||||
<org.funkwhale.ffa.views.SquareImageView
|
<audio.funkwhale.ffa.views.SquareImageView
|
||||||
android:id="@+id/cover_bottom_right"
|
android:id="@+id/cover_bottom_right"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize"
|
||||||
android:layout_marginEnd="16dp">
|
android:layout_marginEnd="16dp">
|
||||||
|
|
||||||
<org.funkwhale.ffa.views.SquareImageView
|
<audio.funkwhale.ffa.views.SquareImageView
|
||||||
android:id="@+id/now_playing_cover"
|
android:id="@+id/now_playing_cover"
|
||||||
android:layout_width="?attr/actionBarSize"
|
android:layout_width="?attr/actionBarSize"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize"
|
||||||
|
@ -111,7 +111,7 @@
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:padding="8dp">
|
android:padding="8dp">
|
||||||
|
|
||||||
<org.funkwhale.ffa.views.SquareImageView
|
<audio.funkwhale.ffa.views.SquareImageView
|
||||||
android:id="@+id/now_playing_details_cover"
|
android:id="@+id/now_playing_details_cover"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
android:transitionGroup="true"
|
android:transitionGroup="true"
|
||||||
tools:showIn="@layout/fragment_albums">
|
tools:showIn="@layout/fragment_albums">
|
||||||
|
|
||||||
<org.funkwhale.ffa.views.SquareImageView
|
<audio.funkwhale.ffa.views.SquareImageView
|
||||||
android:id="@+id/art"
|
android:id="@+id/art"
|
||||||
android:layout_width="48dp"
|
android:layout_width="48dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
android:transitionGroup="true"
|
android:transitionGroup="true"
|
||||||
tools:showIn="@layout/fragment_albums_grid">
|
tools:showIn="@layout/fragment_albums_grid">
|
||||||
|
|
||||||
<org.funkwhale.ffa.views.SquareImageView
|
<audio.funkwhale.ffa.views.SquareImageView
|
||||||
android:id="@+id/cover"
|
android:id="@+id/cover"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
android:transitionGroup="true"
|
android:transitionGroup="true"
|
||||||
tools:showIn="@layout/fragment_artists">
|
tools:showIn="@layout/fragment_artists">
|
||||||
|
|
||||||
<org.funkwhale.ffa.views.SquareImageView
|
<audio.funkwhale.ffa.views.SquareImageView
|
||||||
android:id="@+id/art"
|
android:id="@+id/art"
|
||||||
android:layout_width="48dp"
|
android:layout_width="48dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
app:layout_constraintGuide_percent=".50" />
|
app:layout_constraintGuide_percent=".50" />
|
||||||
|
|
||||||
<org.funkwhale.ffa.views.SquareImageView
|
<audio.funkwhale.ffa.views.SquareImageView
|
||||||
android:id="@+id/cover_top_left"
|
android:id="@+id/cover_top_left"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:src="@tools:sample/avatars" />
|
tools:src="@tools:sample/avatars" />
|
||||||
|
|
||||||
<org.funkwhale.ffa.views.SquareImageView
|
<audio.funkwhale.ffa.views.SquareImageView
|
||||||
android:id="@+id/cover_top_right"
|
android:id="@+id/cover_top_right"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:src="@tools:sample/avatars" />
|
tools:src="@tools:sample/avatars" />
|
||||||
|
|
||||||
<org.funkwhale.ffa.views.SquareImageView
|
<audio.funkwhale.ffa.views.SquareImageView
|
||||||
android:id="@+id/cover_bottom_left"
|
android:id="@+id/cover_bottom_left"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
|
@ -71,7 +71,7 @@
|
||||||
app:layout_constraintTop_toTopOf="@id/vertical"
|
app:layout_constraintTop_toTopOf="@id/vertical"
|
||||||
tools:src="@tools:sample/avatars" />
|
tools:src="@tools:sample/avatars" />
|
||||||
|
|
||||||
<org.funkwhale.ffa.views.SquareImageView
|
<audio.funkwhale.ffa.views.SquareImageView
|
||||||
android:id="@+id/cover_bottom_right"
|
android:id="@+id/cover_bottom_right"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
android:transitionGroup="true"
|
android:transitionGroup="true"
|
||||||
tools:showIn="@layout/fragment_radios">
|
tools:showIn="@layout/fragment_radios">
|
||||||
|
|
||||||
<org.funkwhale.ffa.views.SquareImageView
|
<audio.funkwhale.ffa.views.SquareImageView
|
||||||
android:id="@+id/art"
|
android:id="@+id/art"
|
||||||
android:layout_width="48dp"
|
android:layout_width="48dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
android:transitionGroup="true"
|
android:transitionGroup="true"
|
||||||
tools:showIn="@layout/fragment_tracks">
|
tools:showIn="@layout/fragment_tracks">
|
||||||
|
|
||||||
<org.funkwhale.ffa.views.SquareImageView
|
<audio.funkwhale.ffa.views.SquareImageView
|
||||||
android:id="@+id/handle"
|
android:id="@+id/handle"
|
||||||
android:layout_width="18dp"
|
android:layout_width="18dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
<org.funkwhale.ffa.views.SquareImageView
|
<audio.funkwhale.ffa.views.SquareImageView
|
||||||
android:id="@+id/cover"
|
android:id="@+id/cover"
|
||||||
android:layout_width="48dp"
|
android:layout_width="48dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|
Loading…
Reference in New Issue