Change base package name from org to audio

housekeeping/remove-warnings
Ryan Harg 2021-07-12 10:14:26 +02:00
rodzic e8810a4619
commit 208c7e584b
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 89106F3A84E6958C
78 zmienionych plików z 344 dodań i 345 usunięć

Wyświetl plik

@ -29,7 +29,7 @@ deploy-develop:
script:
- eval `ssh-agent -s`
- 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'
tags:
- shell

Wyświetl plik

@ -38,7 +38,7 @@ android {
compileSdkVersion(29)
defaultConfig {
applicationId = "org.funkwhale.ffa"
applicationId = "audio.funkwhale.ffa"
minSdkVersion(23)
targetSdkVersion(29)

Wyświetl plik

@ -1 +1 @@
-keep class org.funkwhale.ffa.** { *; }
-keep class audio.funkwhale.ffa.** { *; }

Wyświetl plik

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
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.FOREGROUND_SERVICE" />
@ -9,7 +9,7 @@
<permission android:name="android.permission.MEDIA_CONTENT_CONTROL" />
<application
android:name="org.funkwhale.ffa.FFA"
android:name="audio.funkwhale.ffa.FFA"
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"

Wyświetl plik

@ -1,4 +1,4 @@
package org.funkwhale.ffa
package audio.funkwhale.ffa
import android.app.Application
import androidx.appcompat.app.AppCompatDelegate
@ -13,17 +13,17 @@ import com.google.android.exoplayer2.upstream.cache.SimpleCache
import com.preference.PowerPreference
import kotlinx.coroutines.channels.BroadcastChannel
import kotlinx.coroutines.channels.ConflatedBroadcastChannel
import org.funkwhale.ffa.playback.MediaSession
import org.funkwhale.ffa.playback.QueueManager
import org.funkwhale.ffa.utils.*
import audio.funkwhale.ffa.playback.MediaSession
import audio.funkwhale.ffa.playback.QueueManager
import audio.funkwhale.ffa.utils.*
import java.text.SimpleDateFormat
import java.util.*
class FFA : Application() {
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
@ -70,7 +70,7 @@ class FFA : Application() {
Thread.setDefaultUncaughtExceptionHandler(CrashReportHandler())
instance = this
audio.funkwhale.ffa.FFA.Companion.instance = this
when (PowerPreference.getDefaultFile().getString("night_mode")) {
"on" -> AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES)

Wyświetl plik

@ -1,4 +1,4 @@
package org.funkwhale.ffa.activities
package audio.funkwhale.ffa.activities
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
@ -12,12 +12,12 @@ import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import org.funkwhale.ffa.FFA
import org.funkwhale.ffa.R
import org.funkwhale.ffa.adapters.DownloadsAdapter
import org.funkwhale.ffa.utils.Event
import org.funkwhale.ffa.utils.EventBus
import org.funkwhale.ffa.utils.getMetadata
import audio.funkwhale.ffa.FFA
import audio.funkwhale.ffa.R
import audio.funkwhale.ffa.adapters.DownloadsAdapter
import audio.funkwhale.ffa.utils.Event
import audio.funkwhale.ffa.utils.EventBus
import audio.funkwhale.ffa.utils.getMetadata
class DownloadsActivity : AppCompatActivity() {
lateinit var adapter: DownloadsAdapter
@ -60,7 +60,7 @@ class DownloadsActivity : AppCompatActivity() {
private fun refresh() {
lifecycleScope.launch(Main) {
val cursor = FFA.get().exoDownloadManager.downloadIndex.getDownloads()
val cursor = audio.funkwhale.ffa.FFA.get().exoDownloadManager.downloadIndex.getDownloads()
adapter.downloads.clear()
@ -95,7 +95,7 @@ class DownloadsActivity : AppCompatActivity() {
}
private suspend fun refreshProgress() {
val cursor = FFA.get().exoDownloadManager.downloadIndex.getDownloads()
val cursor = audio.funkwhale.ffa.FFA.get().exoDownloadManager.downloadIndex.getDownloads()
while (cursor.moveToNext()) {
val download = cursor.download

Wyświetl plik

@ -1,4 +1,4 @@
package org.funkwhale.ffa.activities
package audio.funkwhale.ffa.activities
import android.content.Intent
import android.net.Uri
@ -9,7 +9,7 @@ import android.view.ViewGroup
import androidx.appcompat.app.AppCompatActivity
import androidx.recyclerview.widget.LinearLayoutManager
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.row_licence.view.*

Wyświetl plik

@ -1,4 +1,4 @@
package org.funkwhale.ffa.activities
package audio.funkwhale.ffa.activities
import android.content.Intent
import android.content.res.Configuration
@ -9,10 +9,10 @@ import android.view.ViewGroup
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.doOnLayout
import androidx.lifecycle.lifecycleScope
import org.funkwhale.ffa.R
import org.funkwhale.ffa.fragments.LoginDialog
import org.funkwhale.ffa.utils.AppContext
import org.funkwhale.ffa.utils.Userinfo
import audio.funkwhale.ffa.R
import audio.funkwhale.ffa.fragments.LoginDialog
import audio.funkwhale.ffa.utils.AppContext
import audio.funkwhale.ffa.utils.Userinfo
import com.github.kittinunf.fuel.Fuel
import com.github.kittinunf.fuel.coroutines.awaitObjectResponseResult
import com.github.kittinunf.fuel.gson.gsonDeserializerOf

Wyświetl plik

@ -1,4 +1,4 @@
package org.funkwhale.ffa.activities
package audio.funkwhale.ffa.activities
import android.animation.Animator
import android.animation.AnimatorListenerAdapter
@ -37,17 +37,17 @@ import kotlinx.coroutines.Dispatchers.Main
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import org.funkwhale.ffa.FFA
import org.funkwhale.ffa.R
import org.funkwhale.ffa.fragments.*
import org.funkwhale.ffa.playback.MediaControlsManager
import org.funkwhale.ffa.playback.PinService
import org.funkwhale.ffa.playback.PlayerService
import org.funkwhale.ffa.repositories.FavoritedRepository
import org.funkwhale.ffa.repositories.FavoritesRepository
import org.funkwhale.ffa.repositories.Repository
import org.funkwhale.ffa.utils.*
import org.funkwhale.ffa.views.DisableableFrameLayout
import audio.funkwhale.ffa.FFA
import audio.funkwhale.ffa.R
import audio.funkwhale.ffa.fragments.*
import audio.funkwhale.ffa.playback.MediaControlsManager
import audio.funkwhale.ffa.playback.PinService
import audio.funkwhale.ffa.playback.PlayerService
import audio.funkwhale.ffa.repositories.FavoritedRepository
import audio.funkwhale.ffa.repositories.FavoritesRepository
import audio.funkwhale.ffa.repositories.Repository
import audio.funkwhale.ffa.utils.*
import audio.funkwhale.ffa.views.DisableableFrameLayout
class MainActivity : AppCompatActivity() {
enum class ResultCode(val code: Int) {
@ -253,7 +253,7 @@ class MainActivity : AppCompatActivity() {
if (resultCode == ResultCode.LOGOUT.code) {
Intent(this, LoginActivity::class.java).apply {
FFA.get().deleteAllData()
audio.funkwhale.ffa.FFA.get().deleteAllData()
flags =
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 ->
when (message) {
is Event.LogOut -> {
FFA.get().deleteAllData()
audio.funkwhale.ffa.FFA.get().deleteAllData()
startActivity(Intent(this@MainActivity, LoginActivity::class.java).apply {
flags = Intent.FLAG_ACTIVITY_NO_HISTORY

Wyświetl plik

@ -1,4 +1,4 @@
package org.funkwhale.ffa.activities
package audio.funkwhale.ffa.activities
import android.os.Bundle
import android.view.View
@ -6,13 +6,13 @@ import androidx.appcompat.app.AppCompatActivity
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.lifecycleScope
import androidx.recyclerview.widget.LinearLayoutManager
import org.funkwhale.ffa.R
import org.funkwhale.ffa.adapters.SearchAdapter
import org.funkwhale.ffa.fragments.AddToPlaylistDialog
import org.funkwhale.ffa.fragments.AlbumsFragment
import org.funkwhale.ffa.fragments.ArtistsFragment
import org.funkwhale.ffa.repositories.*
import org.funkwhale.ffa.utils.*
import audio.funkwhale.ffa.R
import audio.funkwhale.ffa.adapters.SearchAdapter
import audio.funkwhale.ffa.fragments.AddToPlaylistDialog
import audio.funkwhale.ffa.fragments.AlbumsFragment
import audio.funkwhale.ffa.fragments.ArtistsFragment
import audio.funkwhale.ffa.repositories.*
import audio.funkwhale.ffa.utils.*
import com.google.android.exoplayer2.offline.Download
import kotlinx.android.synthetic.main.activity_search.*
import kotlinx.coroutines.Dispatchers

Wyświetl plik

@ -1,4 +1,4 @@
package org.funkwhale.ffa.activities
package audio.funkwhale.ffa.activities
import android.content.*
import android.os.Bundle
@ -10,12 +10,12 @@ import androidx.preference.ListPreference
import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat
import androidx.preference.SeekBarPreference
import org.funkwhale.ffa.BuildConfig
import org.funkwhale.ffa.FFA
import org.funkwhale.ffa.R
import org.funkwhale.ffa.utils.Cache
import org.funkwhale.ffa.utils.Command
import org.funkwhale.ffa.utils.CommandBus
import audio.funkwhale.ffa.BuildConfig
import audio.funkwhale.ffa.FFA
import audio.funkwhale.ffa.R
import audio.funkwhale.ffa.utils.Cache
import audio.funkwhale.ffa.utils.Command
import audio.funkwhale.ffa.utils.CommandBus
class SettingsActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
@ -82,7 +82,7 @@ class SettingsFragment : PreferenceFragmentCompat(), SharedPreferences.OnSharedP
.setPositiveButton(android.R.string.yes) { _, _ ->
CommandBus.send(Command.ClearQueue)
FFA.get().deleteAllData()
audio.funkwhale.ffa.FFA.get().deleteAllData()
activity?.setResult(MainActivity.ResultCode.LOGOUT.code)
activity?.finish()
@ -150,7 +150,7 @@ class SettingsFragment : PreferenceFragmentCompat(), SharedPreferences.OnSharedP
}
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})"
}
}
}

Wyświetl plik

@ -1,12 +1,12 @@
package org.funkwhale.ffa.activities
package audio.funkwhale.ffa.activities
import android.content.Context
import android.content.Intent
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import org.funkwhale.ffa.FFA
import org.funkwhale.ffa.utils.AppContext
import org.funkwhale.ffa.utils.Settings
import audio.funkwhale.ffa.FFA
import audio.funkwhale.ffa.utils.AppContext
import audio.funkwhale.ffa.utils.Settings
class SplashActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
@ -21,7 +21,7 @@ class SplashActivity : AppCompatActivity() {
}
false -> Intent(this@SplashActivity, LoginActivity::class.java).apply {
FFA.get().deleteAllData()
audio.funkwhale.ffa.FFA.get().deleteAllData()
flags = Intent.FLAG_ACTIVITY_NO_ANIMATION

Wyświetl plik

@ -1,15 +1,15 @@
package org.funkwhale.ffa.adapters
package audio.funkwhale.ffa.adapters
import android.content.Context
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import org.funkwhale.ffa.R
import org.funkwhale.ffa.fragments.OtterAdapter
import org.funkwhale.ffa.utils.Album
import org.funkwhale.ffa.utils.maybeLoad
import org.funkwhale.ffa.utils.maybeNormalizeUrl
import audio.funkwhale.ffa.R
import audio.funkwhale.ffa.fragments.OtterAdapter
import audio.funkwhale.ffa.utils.Album
import audio.funkwhale.ffa.utils.maybeLoad
import audio.funkwhale.ffa.utils.maybeNormalizeUrl
import com.squareup.picasso.Picasso
import jp.wasabeef.picasso.transformations.RoundedCornersTransformation
import kotlinx.android.synthetic.main.row_album.view.*

Wyświetl plik

@ -1,15 +1,15 @@
package org.funkwhale.ffa.adapters
package audio.funkwhale.ffa.adapters
import android.content.Context
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import org.funkwhale.ffa.R
import org.funkwhale.ffa.fragments.OtterAdapter
import org.funkwhale.ffa.utils.Album
import org.funkwhale.ffa.utils.maybeLoad
import org.funkwhale.ffa.utils.maybeNormalizeUrl
import audio.funkwhale.ffa.R
import audio.funkwhale.ffa.fragments.OtterAdapter
import audio.funkwhale.ffa.utils.Album
import audio.funkwhale.ffa.utils.maybeLoad
import audio.funkwhale.ffa.utils.maybeNormalizeUrl
import com.squareup.picasso.Picasso
import jp.wasabeef.picasso.transformations.RoundedCornersTransformation
import kotlinx.android.synthetic.main.row_album_grid.view.*

Wyświetl plik

@ -1,15 +1,15 @@
package org.funkwhale.ffa.adapters
package audio.funkwhale.ffa.adapters
import android.content.Context
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import org.funkwhale.ffa.R
import org.funkwhale.ffa.fragments.OtterAdapter
import org.funkwhale.ffa.utils.Artist
import org.funkwhale.ffa.utils.maybeLoad
import org.funkwhale.ffa.utils.maybeNormalizeUrl
import audio.funkwhale.ffa.R
import audio.funkwhale.ffa.fragments.OtterAdapter
import audio.funkwhale.ffa.utils.Artist
import audio.funkwhale.ffa.utils.maybeLoad
import audio.funkwhale.ffa.utils.maybeNormalizeUrl
import com.squareup.picasso.Picasso
import jp.wasabeef.picasso.transformations.RoundedCornersTransformation
import kotlinx.android.synthetic.main.row_artist.view.*

Wyświetl plik

@ -1,10 +1,10 @@
package org.funkwhale.ffa.adapters
package audio.funkwhale.ffa.adapters
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentPagerAdapter
import org.funkwhale.ffa.R
import org.funkwhale.ffa.fragments.*
import audio.funkwhale.ffa.R
import audio.funkwhale.ffa.fragments.*
class BrowseTabsAdapter(val context: Fragment, manager: FragmentManager) : FragmentPagerAdapter(manager, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT) {
var tabs = mutableListOf<Fragment>()

Wyświetl plik

@ -1,4 +1,4 @@
package org.funkwhale.ffa.adapters
package audio.funkwhale.ffa.adapters
import android.content.Context
import android.graphics.drawable.Icon
@ -6,9 +6,9 @@ import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import org.funkwhale.ffa.R
import org.funkwhale.ffa.playback.PinService
import org.funkwhale.ffa.utils.*
import audio.funkwhale.ffa.R
import audio.funkwhale.ffa.playback.PinService
import audio.funkwhale.ffa.utils.*
import com.google.android.exoplayer2.offline.Download
import com.google.android.exoplayer2.offline.DownloadService
import kotlinx.android.synthetic.main.row_download.view.*

Wyświetl plik

@ -1,4 +1,4 @@
package org.funkwhale.ffa.adapters
package audio.funkwhale.ffa.adapters
import android.annotation.SuppressLint
import android.content.Context
@ -10,9 +10,9 @@ import android.view.View
import android.view.ViewGroup
import androidx.appcompat.widget.PopupMenu
import androidx.recyclerview.widget.RecyclerView
import org.funkwhale.ffa.R
import org.funkwhale.ffa.fragments.OtterAdapter
import org.funkwhale.ffa.utils.*
import audio.funkwhale.ffa.R
import audio.funkwhale.ffa.fragments.OtterAdapter
import audio.funkwhale.ffa.utils.*
import com.squareup.picasso.Picasso
import jp.wasabeef.picasso.transformations.RoundedCornersTransformation
import kotlinx.android.synthetic.main.row_track.view.*

Wyświetl plik

@ -1,4 +1,4 @@
package org.funkwhale.ffa.adapters
package audio.funkwhale.ffa.adapters
import android.annotation.SuppressLint
import android.content.Context
@ -9,9 +9,9 @@ import androidx.appcompat.widget.PopupMenu
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.ItemTouchHelper
import androidx.recyclerview.widget.RecyclerView
import org.funkwhale.ffa.R
import org.funkwhale.ffa.fragments.OtterAdapter
import org.funkwhale.ffa.utils.*
import audio.funkwhale.ffa.R
import audio.funkwhale.ffa.fragments.OtterAdapter
import audio.funkwhale.ffa.utils.*
import com.squareup.picasso.Picasso
import jp.wasabeef.picasso.transformations.RoundedCornersTransformation
import kotlinx.android.synthetic.main.row_track.view.*

Wyświetl plik

@ -1,4 +1,4 @@
package org.funkwhale.ffa.adapters
package audio.funkwhale.ffa.adapters
import android.content.Context
import android.view.LayoutInflater
@ -6,10 +6,10 @@ import android.view.View
import android.view.ViewGroup
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.RecyclerView
import org.funkwhale.ffa.R
import org.funkwhale.ffa.fragments.OtterAdapter
import org.funkwhale.ffa.utils.Playlist
import org.funkwhale.ffa.utils.toDurationString
import audio.funkwhale.ffa.R
import audio.funkwhale.ffa.fragments.OtterAdapter
import audio.funkwhale.ffa.utils.Playlist
import audio.funkwhale.ffa.utils.toDurationString
import com.squareup.picasso.Picasso
import jp.wasabeef.picasso.transformations.RoundedCornersTransformation
import kotlinx.android.synthetic.main.row_playlist.view.*

Wyświetl plik

@ -1,17 +1,17 @@
package org.funkwhale.ffa.adapters
package audio.funkwhale.ffa.adapters
import android.content.Context
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import org.funkwhale.ffa.R
import org.funkwhale.ffa.fragments.OtterAdapter
import org.funkwhale.ffa.utils.AppContext
import org.funkwhale.ffa.utils.Event
import org.funkwhale.ffa.utils.EventBus
import org.funkwhale.ffa.utils.Radio
import org.funkwhale.ffa.views.LoadingImageView
import audio.funkwhale.ffa.R
import audio.funkwhale.ffa.fragments.OtterAdapter
import audio.funkwhale.ffa.utils.AppContext
import audio.funkwhale.ffa.utils.Event
import audio.funkwhale.ffa.utils.EventBus
import audio.funkwhale.ffa.utils.Radio
import audio.funkwhale.ffa.views.LoadingImageView
import com.preference.PowerPreference
import kotlinx.android.synthetic.main.row_radio.view.*
import kotlinx.android.synthetic.main.row_radio_header.view.*

Wyświetl plik

@ -1,4 +1,4 @@
package org.funkwhale.ffa.adapters
package audio.funkwhale.ffa.adapters
import android.annotation.SuppressLint
import android.content.Context
@ -12,8 +12,8 @@ import android.view.View
import android.view.ViewGroup
import androidx.appcompat.widget.PopupMenu
import androidx.recyclerview.widget.RecyclerView
import org.funkwhale.ffa.R
import org.funkwhale.ffa.utils.*
import audio.funkwhale.ffa.R
import audio.funkwhale.ffa.utils.*
import com.squareup.picasso.Picasso
import jp.wasabeef.picasso.transformations.RoundedCornersTransformation
import kotlinx.android.synthetic.main.row_track.view.*

Wyświetl plik

@ -1,4 +1,4 @@
package org.funkwhale.ffa.adapters
package audio.funkwhale.ffa.adapters
import android.annotation.SuppressLint
import android.content.Context
@ -9,9 +9,9 @@ import androidx.appcompat.widget.PopupMenu
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.ItemTouchHelper
import androidx.recyclerview.widget.RecyclerView
import org.funkwhale.ffa.R
import org.funkwhale.ffa.fragments.OtterAdapter
import org.funkwhale.ffa.utils.*
import audio.funkwhale.ffa.R
import audio.funkwhale.ffa.fragments.OtterAdapter
import audio.funkwhale.ffa.utils.*
import com.squareup.picasso.Picasso
import jp.wasabeef.picasso.transformations.RoundedCornersTransformation
import kotlinx.android.synthetic.main.row_track.view.*

Wyświetl plik

@ -1,4 +1,4 @@
package org.funkwhale.ffa.fragments
package audio.funkwhale.ffa.fragments
import android.app.Activity
import android.app.AlertDialog
@ -6,10 +6,10 @@ import android.view.View
import android.widget.Toast
import androidx.core.widget.addTextChangedListener
import androidx.recyclerview.widget.LinearLayoutManager
import org.funkwhale.ffa.R
import org.funkwhale.ffa.adapters.PlaylistsAdapter
import org.funkwhale.ffa.repositories.ManagementPlaylistsRepository
import org.funkwhale.ffa.utils.*
import audio.funkwhale.ffa.R
import audio.funkwhale.ffa.adapters.PlaylistsAdapter
import audio.funkwhale.ffa.repositories.ManagementPlaylistsRepository
import audio.funkwhale.ffa.utils.*
import com.google.gson.Gson
import kotlinx.android.synthetic.main.dialog_add_to_playlist.*
import kotlinx.coroutines.CoroutineScope

Wyświetl plik

@ -1,4 +1,4 @@
package org.funkwhale.ffa.fragments
package audio.funkwhale.ffa.fragments
import android.content.Context
import android.os.Bundle
@ -13,13 +13,13 @@ import androidx.recyclerview.widget.RecyclerView
import androidx.swiperefreshlayout.widget.CircularProgressDrawable
import androidx.transition.Fade
import androidx.transition.Slide
import org.funkwhale.ffa.R
import org.funkwhale.ffa.activities.MainActivity
import org.funkwhale.ffa.adapters.AlbumsAdapter
import org.funkwhale.ffa.repositories.AlbumsRepository
import org.funkwhale.ffa.repositories.ArtistTracksRepository
import org.funkwhale.ffa.repositories.Repository
import org.funkwhale.ffa.utils.*
import audio.funkwhale.ffa.R
import audio.funkwhale.ffa.activities.MainActivity
import audio.funkwhale.ffa.adapters.AlbumsAdapter
import audio.funkwhale.ffa.repositories.AlbumsRepository
import audio.funkwhale.ffa.repositories.ArtistTracksRepository
import audio.funkwhale.ffa.repositories.Repository
import audio.funkwhale.ffa.utils.*
import com.squareup.picasso.Picasso
import jp.wasabeef.picasso.transformations.RoundedCornersTransformation
import kotlinx.android.synthetic.main.fragment_albums.*

Wyświetl plik

@ -1,4 +1,4 @@
package org.funkwhale.ffa.fragments
package audio.funkwhale.ffa.fragments
import android.os.Bundle
import android.view.View
@ -7,12 +7,12 @@ import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.RecyclerView
import androidx.transition.Fade
import androidx.transition.Slide
import org.funkwhale.ffa.R
import org.funkwhale.ffa.activities.MainActivity
import org.funkwhale.ffa.adapters.AlbumsGridAdapter
import org.funkwhale.ffa.repositories.AlbumsRepository
import org.funkwhale.ffa.utils.Album
import org.funkwhale.ffa.utils.AppContext
import audio.funkwhale.ffa.R
import audio.funkwhale.ffa.activities.MainActivity
import audio.funkwhale.ffa.adapters.AlbumsGridAdapter
import audio.funkwhale.ffa.repositories.AlbumsRepository
import audio.funkwhale.ffa.utils.Album
import audio.funkwhale.ffa.utils.AppContext
import kotlinx.android.synthetic.main.fragment_albums_grid.*
class AlbumsGridFragment : OtterFragment<Album, AlbumsGridAdapter>() {

Wyświetl plik

@ -1,4 +1,4 @@
package org.funkwhale.ffa.fragments
package audio.funkwhale.ffa.fragments
import android.content.Context
import android.os.Bundle
@ -9,13 +9,13 @@ import androidx.fragment.app.Fragment
import androidx.recyclerview.widget.RecyclerView
import androidx.transition.Fade
import androidx.transition.Slide
import org.funkwhale.ffa.R
import org.funkwhale.ffa.activities.MainActivity
import org.funkwhale.ffa.adapters.ArtistsAdapter
import org.funkwhale.ffa.repositories.ArtistsRepository
import org.funkwhale.ffa.utils.AppContext
import org.funkwhale.ffa.utils.Artist
import org.funkwhale.ffa.utils.onViewPager
import audio.funkwhale.ffa.R
import audio.funkwhale.ffa.activities.MainActivity
import audio.funkwhale.ffa.adapters.ArtistsAdapter
import audio.funkwhale.ffa.repositories.ArtistsRepository
import audio.funkwhale.ffa.utils.AppContext
import audio.funkwhale.ffa.utils.Artist
import audio.funkwhale.ffa.utils.onViewPager
import kotlinx.android.synthetic.main.fragment_artists.*
class ArtistsFragment : OtterFragment<Artist, ArtistsAdapter>() {

Wyświetl plik

@ -1,12 +1,12 @@
package org.funkwhale.ffa.fragments
package audio.funkwhale.ffa.fragments
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import org.funkwhale.ffa.R
import org.funkwhale.ffa.adapters.BrowseTabsAdapter
import audio.funkwhale.ffa.R
import audio.funkwhale.ffa.adapters.BrowseTabsAdapter
import kotlinx.android.synthetic.main.fragment_browse.view.*
class BrowseFragment : Fragment() {

Wyświetl plik

@ -1,13 +1,13 @@
package org.funkwhale.ffa.fragments
package audio.funkwhale.ffa.fragments
import android.os.Bundle
import androidx.lifecycle.lifecycleScope
import androidx.recyclerview.widget.RecyclerView
import org.funkwhale.ffa.R
import org.funkwhale.ffa.adapters.FavoritesAdapter
import org.funkwhale.ffa.repositories.FavoritesRepository
import org.funkwhale.ffa.repositories.TracksRepository
import org.funkwhale.ffa.utils.*
import audio.funkwhale.ffa.R
import audio.funkwhale.ffa.adapters.FavoritesAdapter
import audio.funkwhale.ffa.repositories.FavoritesRepository
import audio.funkwhale.ffa.repositories.TracksRepository
import audio.funkwhale.ffa.utils.*
import com.google.android.exoplayer2.offline.Download
import kotlinx.android.synthetic.main.fragment_favorites.*
import kotlinx.coroutines.Dispatchers.IO

Wyświetl plik

@ -1,4 +1,4 @@
package org.funkwhale.ffa.fragments
package audio.funkwhale.ffa.fragments
import android.os.Bundle
import android.view.LayoutInflater
@ -7,9 +7,9 @@ import android.view.ViewGroup
import androidx.fragment.app.Fragment
import androidx.lifecycle.lifecycleScope
import androidx.recyclerview.widget.LinearLayoutManager
import org.funkwhale.ffa.R
import org.funkwhale.ffa.adapters.TracksAdapter
import org.funkwhale.ffa.utils.*
import audio.funkwhale.ffa.R
import audio.funkwhale.ffa.adapters.TracksAdapter
import audio.funkwhale.ffa.utils.*
import kotlinx.android.synthetic.main.partial_queue.*
import kotlinx.android.synthetic.main.partial_queue.view.*
import kotlinx.coroutines.Dispatchers.Main

Wyświetl plik

@ -1,10 +1,10 @@
package org.funkwhale.ffa.fragments
package audio.funkwhale.ffa.fragments
import android.app.AlertDialog
import android.app.Dialog
import android.os.Bundle
import androidx.fragment.app.DialogFragment
import org.funkwhale.ffa.R
import audio.funkwhale.ffa.R
class LoginDialog : DialogFragment() {
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {

Wyświetl plik

@ -1,4 +1,4 @@
package org.funkwhale.ffa.fragments
package audio.funkwhale.ffa.fragments
import android.os.Bundle
import android.view.LayoutInflater
@ -9,9 +9,9 @@ import androidx.lifecycle.lifecycleScope
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import androidx.recyclerview.widget.SimpleItemAnimator
import org.funkwhale.ffa.repositories.HttpUpstream
import org.funkwhale.ffa.repositories.Repository
import org.funkwhale.ffa.utils.*
import audio.funkwhale.ffa.repositories.HttpUpstream
import audio.funkwhale.ffa.repositories.Repository
import audio.funkwhale.ffa.utils.*
import com.google.gson.Gson
import kotlinx.android.synthetic.main.fragment_artists.*
import kotlinx.coroutines.Dispatchers.IO

Wyświetl plik

@ -1,4 +1,4 @@
package org.funkwhale.ffa.fragments
package audio.funkwhale.ffa.fragments
import android.os.Bundle
import android.view.Gravity
@ -7,12 +7,12 @@ import androidx.appcompat.widget.PopupMenu
import androidx.core.os.bundleOf
import androidx.lifecycle.lifecycleScope
import androidx.recyclerview.widget.RecyclerView
import org.funkwhale.ffa.R
import org.funkwhale.ffa.adapters.PlaylistTracksAdapter
import org.funkwhale.ffa.repositories.FavoritesRepository
import org.funkwhale.ffa.repositories.ManagementPlaylistsRepository
import org.funkwhale.ffa.repositories.PlaylistTracksRepository
import org.funkwhale.ffa.utils.*
import audio.funkwhale.ffa.R
import audio.funkwhale.ffa.adapters.PlaylistTracksAdapter
import audio.funkwhale.ffa.repositories.FavoritesRepository
import audio.funkwhale.ffa.repositories.ManagementPlaylistsRepository
import audio.funkwhale.ffa.repositories.PlaylistTracksRepository
import audio.funkwhale.ffa.utils.*
import com.squareup.picasso.Picasso
import jp.wasabeef.picasso.transformations.RoundedCornersTransformation
import kotlinx.android.synthetic.main.fragment_tracks.*

Wyświetl plik

@ -1,4 +1,4 @@
package org.funkwhale.ffa.fragments
package audio.funkwhale.ffa.fragments
import android.os.Bundle
import android.view.View
@ -6,12 +6,12 @@ import android.view.animation.AccelerateDecelerateInterpolator
import androidx.recyclerview.widget.RecyclerView
import androidx.transition.Fade
import androidx.transition.Slide
import org.funkwhale.ffa.R
import org.funkwhale.ffa.activities.MainActivity
import org.funkwhale.ffa.adapters.PlaylistsAdapter
import org.funkwhale.ffa.repositories.PlaylistsRepository
import org.funkwhale.ffa.utils.AppContext
import org.funkwhale.ffa.utils.Playlist
import audio.funkwhale.ffa.R
import audio.funkwhale.ffa.activities.MainActivity
import audio.funkwhale.ffa.adapters.PlaylistsAdapter
import audio.funkwhale.ffa.repositories.PlaylistsRepository
import audio.funkwhale.ffa.utils.AppContext
import audio.funkwhale.ffa.utils.Playlist
import kotlinx.android.synthetic.main.fragment_playlists.*
class PlaylistsFragment : OtterFragment<Playlist, PlaylistsAdapter>() {

Wyświetl plik

@ -1,4 +1,4 @@
package org.funkwhale.ffa.fragments
package audio.funkwhale.ffa.fragments
import android.app.Dialog
import android.os.Bundle
@ -8,10 +8,10 @@ import android.view.ViewGroup
import androidx.fragment.app.DialogFragment
import androidx.lifecycle.lifecycleScope
import androidx.recyclerview.widget.LinearLayoutManager
import org.funkwhale.ffa.R
import org.funkwhale.ffa.adapters.TracksAdapter
import org.funkwhale.ffa.repositories.FavoritesRepository
import org.funkwhale.ffa.utils.*
import audio.funkwhale.ffa.R
import audio.funkwhale.ffa.adapters.TracksAdapter
import audio.funkwhale.ffa.repositories.FavoritesRepository
import audio.funkwhale.ffa.utils.*
import com.google.android.material.bottomsheet.BottomSheetBehavior
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
import kotlinx.android.synthetic.main.fragment_queue.*

Wyświetl plik

@ -1,13 +1,13 @@
package org.funkwhale.ffa.fragments
package audio.funkwhale.ffa.fragments
import android.os.Bundle
import androidx.core.view.forEach
import androidx.lifecycle.lifecycleScope
import androidx.recyclerview.widget.RecyclerView
import org.funkwhale.ffa.R
import org.funkwhale.ffa.adapters.RadiosAdapter
import org.funkwhale.ffa.repositories.RadiosRepository
import org.funkwhale.ffa.utils.*
import audio.funkwhale.ffa.R
import audio.funkwhale.ffa.adapters.RadiosAdapter
import audio.funkwhale.ffa.repositories.RadiosRepository
import audio.funkwhale.ffa.utils.*
import kotlinx.android.synthetic.main.fragment_radios.*
import kotlinx.coroutines.Dispatchers.Main
import kotlinx.coroutines.flow.collect

Wyświetl plik

@ -1,4 +1,4 @@
package org.funkwhale.ffa.fragments
package audio.funkwhale.ffa.fragments
import android.net.Uri
import android.os.Bundle
@ -10,10 +10,10 @@ import android.view.ViewGroup.LayoutParams
import android.widget.TextView
import androidx.core.os.bundleOf
import androidx.fragment.app.DialogFragment
import org.funkwhale.ffa.R
import org.funkwhale.ffa.utils.Track
import org.funkwhale.ffa.utils.mustNormalizeUrl
import org.funkwhale.ffa.utils.toDurationString
import audio.funkwhale.ffa.R
import audio.funkwhale.ffa.utils.Track
import audio.funkwhale.ffa.utils.mustNormalizeUrl
import audio.funkwhale.ffa.utils.toDurationString
import kotlinx.android.synthetic.main.fragment_track_info_details.*
class TrackInfoDetailsFragment : DialogFragment() {

Wyświetl plik

@ -1,4 +1,4 @@
package org.funkwhale.ffa.fragments
package audio.funkwhale.ffa.fragments
import android.os.Bundle
import android.view.Gravity
@ -7,12 +7,12 @@ import androidx.appcompat.widget.PopupMenu
import androidx.core.os.bundleOf
import androidx.lifecycle.lifecycleScope
import androidx.recyclerview.widget.RecyclerView
import org.funkwhale.ffa.R
import org.funkwhale.ffa.adapters.TracksAdapter
import org.funkwhale.ffa.repositories.FavoritedRepository
import org.funkwhale.ffa.repositories.FavoritesRepository
import org.funkwhale.ffa.repositories.TracksRepository
import org.funkwhale.ffa.utils.*
import audio.funkwhale.ffa.R
import audio.funkwhale.ffa.adapters.TracksAdapter
import audio.funkwhale.ffa.repositories.FavoritedRepository
import audio.funkwhale.ffa.repositories.FavoritesRepository
import audio.funkwhale.ffa.repositories.TracksRepository
import audio.funkwhale.ffa.utils.*
import com.google.android.exoplayer2.offline.Download
import com.preference.PowerPreference
import com.squareup.picasso.Picasso

Wyświetl plik

@ -1,4 +1,4 @@
package org.funkwhale.ffa.playback
package audio.funkwhale.ffa.playback
import android.app.Notification
import android.app.PendingIntent
@ -10,12 +10,12 @@ import androidx.core.app.NotificationCompat
import androidx.core.app.NotificationManagerCompat
import androidx.media.app.NotificationCompat.MediaStyle
import androidx.media.session.MediaButtonReceiver
import org.funkwhale.ffa.FFA
import org.funkwhale.ffa.R
import org.funkwhale.ffa.activities.MainActivity
import org.funkwhale.ffa.utils.AppContext
import org.funkwhale.ffa.utils.Track
import org.funkwhale.ffa.utils.maybeNormalizeUrl
import audio.funkwhale.ffa.FFA
import audio.funkwhale.ffa.R
import audio.funkwhale.ffa.activities.MainActivity
import audio.funkwhale.ffa.utils.AppContext
import audio.funkwhale.ffa.utils.Track
import audio.funkwhale.ffa.utils.maybeNormalizeUrl
import com.squareup.picasso.Picasso
import kotlinx.coroutines.CoroutineScope
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()
}
}
}

Wyświetl plik

@ -1,4 +1,4 @@
package org.funkwhale.ffa.playback
package audio.funkwhale.ffa.playback
import android.content.Context
import android.content.Intent
@ -6,8 +6,8 @@ import android.os.Bundle
import android.os.ResultReceiver
import android.support.v4.media.session.MediaSessionCompat
import android.support.v4.media.session.PlaybackStateCompat
import org.funkwhale.ffa.utils.Command
import org.funkwhale.ffa.utils.CommandBus
import audio.funkwhale.ffa.utils.Command
import audio.funkwhale.ffa.utils.CommandBus
import com.google.android.exoplayer2.ControlDispatcher
import com.google.android.exoplayer2.Player
import com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector

Wyświetl plik

@ -1,4 +1,4 @@
package org.funkwhale.ffa.playback
package audio.funkwhale.ffa.playback
import android.app.Notification
import android.content.Context
@ -16,17 +16,17 @@ import kotlinx.coroutines.Dispatchers.Main
import kotlinx.coroutines.Job
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.launch
import org.funkwhale.ffa.FFA
import org.funkwhale.ffa.R
import org.funkwhale.ffa.utils.AppContext
import org.funkwhale.ffa.utils.DownloadInfo
import org.funkwhale.ffa.utils.Event
import org.funkwhale.ffa.utils.EventBus
import org.funkwhale.ffa.utils.Request
import org.funkwhale.ffa.utils.RequestBus
import org.funkwhale.ffa.utils.Response
import org.funkwhale.ffa.utils.Track
import org.funkwhale.ffa.utils.mustNormalizeUrl
import audio.funkwhale.ffa.FFA
import audio.funkwhale.ffa.R
import audio.funkwhale.ffa.utils.AppContext
import audio.funkwhale.ffa.utils.DownloadInfo
import audio.funkwhale.ffa.utils.Event
import audio.funkwhale.ffa.utils.EventBus
import audio.funkwhale.ffa.utils.Request
import audio.funkwhale.ffa.utils.RequestBus
import audio.funkwhale.ffa.utils.Response
import audio.funkwhale.ffa.utils.Track
import audio.funkwhale.ffa.utils.mustNormalizeUrl
import java.util.Collections
class PinService : DownloadService(AppContext.NOTIFICATION_DOWNLOADS) {
@ -74,7 +74,7 @@ class PinService : DownloadService(AppContext.NOTIFICATION_DOWNLOADS) {
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())
}

Wyświetl plik

@ -1,4 +1,4 @@
package org.funkwhale.ffa.playback
package audio.funkwhale.ffa.playback
import android.annotation.SuppressLint
import android.app.Service
@ -26,9 +26,9 @@ import kotlinx.coroutines.*
import kotlinx.coroutines.Dispatchers.IO
import kotlinx.coroutines.Dispatchers.Main
import kotlinx.coroutines.flow.collect
import org.funkwhale.ffa.FFA
import org.funkwhale.ffa.R
import org.funkwhale.ffa.utils.*
import audio.funkwhale.ffa.FFA
import audio.funkwhale.ffa.R
import audio.funkwhale.ffa.utils.*
class PlayerService : Service() {
companion object {
@ -63,12 +63,12 @@ class PlayerService : Service() {
when (key.keyCode) {
KeyEvent.KEYCODE_MEDIA_PLAY, KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE -> {
if (hasAudioFocus(true)) MediaButtonReceiver.handleIntent(
FFA.get().mediaSession.session,
audio.funkwhale.ffa.FFA.get().mediaSession.session,
intent
)
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 {
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)
setMediaMetadataProvider {
@ -271,7 +271,7 @@ class PlayerService : Service() {
setPlaybackState(false)
player.release()
FFA.get().mediaSession.active = false
audio.funkwhale.ffa.FFA.get().mediaSession.active = false
super.onDestroy()
}

Wyświetl plik

@ -1,10 +1,10 @@
package org.funkwhale.ffa.playback
package audio.funkwhale.ffa.playback
import android.content.Context
import android.net.Uri
import org.funkwhale.ffa.FFA
import org.funkwhale.ffa.R
import org.funkwhale.ffa.utils.*
import audio.funkwhale.ffa.FFA
import audio.funkwhale.ffa.R
import audio.funkwhale.ffa.utils.*
import com.github.kittinunf.fuel.gson.gsonDeserializerOf
import com.google.android.exoplayer2.source.ConcatenatingMediaSource
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(
FFA.get().exoDownloadCache,
audio.funkwhale.ffa.FFA.get().exoDownloadCache,
playbackCache,
FileDataSource.Factory(),
null,

Wyświetl plik

@ -1,10 +1,10 @@
package org.funkwhale.ffa.playback
package audio.funkwhale.ffa.playback
import android.content.Context
import org.funkwhale.ffa.R
import org.funkwhale.ffa.repositories.FavoritedRepository
import org.funkwhale.ffa.repositories.Repository
import org.funkwhale.ffa.utils.*
import audio.funkwhale.ffa.R
import audio.funkwhale.ffa.repositories.FavoritedRepository
import audio.funkwhale.ffa.repositories.Repository
import audio.funkwhale.ffa.utils.*
import com.github.kittinunf.fuel.Fuel
import com.github.kittinunf.fuel.coroutines.awaitObjectResponseResult
import com.github.kittinunf.fuel.coroutines.awaitObjectResult

Wyświetl plik

@ -1,10 +1,10 @@
package org.funkwhale.ffa.repositories
package audio.funkwhale.ffa.repositories
import android.content.Context
import org.funkwhale.ffa.utils.Album
import org.funkwhale.ffa.utils.AlbumsCache
import org.funkwhale.ffa.utils.AlbumsResponse
import org.funkwhale.ffa.utils.OtterResponse
import audio.funkwhale.ffa.utils.Album
import audio.funkwhale.ffa.utils.AlbumsCache
import audio.funkwhale.ffa.utils.AlbumsResponse
import audio.funkwhale.ffa.utils.OtterResponse
import com.github.kittinunf.fuel.gson.gsonDeserializerOf
import com.google.gson.reflect.TypeToken
import java.io.BufferedReader

Wyświetl plik

@ -1,10 +1,10 @@
package org.funkwhale.ffa.repositories
package audio.funkwhale.ffa.repositories
import android.content.Context
import org.funkwhale.ffa.utils.OtterResponse
import org.funkwhale.ffa.utils.Track
import org.funkwhale.ffa.utils.TracksCache
import org.funkwhale.ffa.utils.TracksResponse
import audio.funkwhale.ffa.utils.OtterResponse
import audio.funkwhale.ffa.utils.Track
import audio.funkwhale.ffa.utils.TracksCache
import audio.funkwhale.ffa.utils.TracksResponse
import com.github.kittinunf.fuel.gson.gsonDeserializerOf
import com.google.gson.reflect.TypeToken
import java.io.BufferedReader

Wyświetl plik

@ -1,10 +1,10 @@
package org.funkwhale.ffa.repositories
package audio.funkwhale.ffa.repositories
import android.content.Context
import org.funkwhale.ffa.utils.Artist
import org.funkwhale.ffa.utils.ArtistsCache
import org.funkwhale.ffa.utils.ArtistsResponse
import org.funkwhale.ffa.utils.OtterResponse
import audio.funkwhale.ffa.utils.Artist
import audio.funkwhale.ffa.utils.ArtistsCache
import audio.funkwhale.ffa.utils.ArtistsResponse
import audio.funkwhale.ffa.utils.OtterResponse
import com.github.kittinunf.fuel.gson.gsonDeserializerOf
import com.google.gson.reflect.TypeToken
import java.io.BufferedReader

Wyświetl plik

@ -1,8 +1,8 @@
package org.funkwhale.ffa.repositories
package audio.funkwhale.ffa.repositories
import android.content.Context
import org.funkwhale.ffa.FFA
import org.funkwhale.ffa.utils.*
import audio.funkwhale.ffa.FFA
import audio.funkwhale.ffa.utils.*
import com.github.kittinunf.fuel.Fuel
import com.github.kittinunf.fuel.coroutines.awaitByteArrayResponseResult
import com.github.kittinunf.fuel.gson.gsonDeserializerOf
@ -32,7 +32,7 @@ class FavoritesRepository(override val context: Context?) : Repository<Track, Tr
track.bestUpload()?.let { upload ->
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)
}
}

Wyświetl plik

@ -1,7 +1,7 @@
package org.funkwhale.ffa.repositories
package audio.funkwhale.ffa.repositories
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.core.FuelError
import com.github.kittinunf.fuel.core.ResponseDeserializable

Wyświetl plik

@ -1,10 +1,10 @@
package org.funkwhale.ffa.repositories
package audio.funkwhale.ffa.repositories
import android.content.Context
import org.funkwhale.ffa.utils.OtterResponse
import org.funkwhale.ffa.utils.PlaylistTrack
import org.funkwhale.ffa.utils.PlaylistTracksCache
import org.funkwhale.ffa.utils.PlaylistTracksResponse
import audio.funkwhale.ffa.utils.OtterResponse
import audio.funkwhale.ffa.utils.PlaylistTrack
import audio.funkwhale.ffa.utils.PlaylistTracksCache
import audio.funkwhale.ffa.utils.PlaylistTracksResponse
import com.github.kittinunf.fuel.gson.gsonDeserializerOf
import com.google.gson.reflect.TypeToken
import kotlinx.coroutines.flow.map

Wyświetl plik

@ -1,7 +1,7 @@
package org.funkwhale.ffa.repositories
package audio.funkwhale.ffa.repositories
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.coroutines.awaitByteArrayResponseResult
import com.github.kittinunf.fuel.coroutines.awaitObjectResponseResult

Wyświetl plik

@ -1,10 +1,10 @@
package org.funkwhale.ffa.repositories
package audio.funkwhale.ffa.repositories
import android.content.Context
import org.funkwhale.ffa.utils.OtterResponse
import org.funkwhale.ffa.utils.Radio
import org.funkwhale.ffa.utils.RadiosCache
import org.funkwhale.ffa.utils.RadiosResponse
import audio.funkwhale.ffa.utils.OtterResponse
import audio.funkwhale.ffa.utils.Radio
import audio.funkwhale.ffa.utils.RadiosCache
import audio.funkwhale.ffa.utils.RadiosResponse
import com.github.kittinunf.fuel.gson.gsonDeserializerOf
import com.google.gson.reflect.TypeToken
import java.io.BufferedReader

Wyświetl plik

@ -1,9 +1,9 @@
package org.funkwhale.ffa.repositories
package audio.funkwhale.ffa.repositories
import android.content.Context
import org.funkwhale.ffa.utils.AppContext
import org.funkwhale.ffa.utils.Cache
import org.funkwhale.ffa.utils.CacheItem
import audio.funkwhale.ffa.utils.AppContext
import audio.funkwhale.ffa.utils.Cache
import audio.funkwhale.ffa.utils.CacheItem
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers.IO
import kotlinx.coroutines.Job

Wyświetl plik

@ -1,8 +1,8 @@
package org.funkwhale.ffa.repositories
package audio.funkwhale.ffa.repositories
import android.content.Context
import org.funkwhale.ffa.FFA
import org.funkwhale.ffa.utils.*
import audio.funkwhale.ffa.FFA
import audio.funkwhale.ffa.utils.*
import com.github.kittinunf.fuel.gson.gsonDeserializerOf
import com.google.gson.reflect.TypeToken
import kotlinx.coroutines.flow.map
@ -33,7 +33,7 @@ class TracksSearchRepository(override val context: Context?, var query: String)
track.bestUpload()?.let { upload ->
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

Wyświetl plik

@ -1,8 +1,8 @@
package org.funkwhale.ffa.repositories
package audio.funkwhale.ffa.repositories
import android.content.Context
import org.funkwhale.ffa.FFA
import org.funkwhale.ffa.utils.*
import audio.funkwhale.ffa.FFA
import audio.funkwhale.ffa.utils.*
import com.github.kittinunf.fuel.gson.gsonDeserializerOf
import com.google.android.exoplayer2.offline.Download
import com.google.gson.reflect.TypeToken
@ -20,7 +20,7 @@ class TracksRepository(override val context: Context?, albumId: Int) : Repositor
companion object {
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()
while (cursor.moveToNext()) {
@ -52,7 +52,7 @@ class TracksRepository(override val context: Context?, albumId: Int) : Repositor
track.bestUpload()?.let { upload ->
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

Wyświetl plik

@ -1,4 +1,4 @@
package org.funkwhale.ffa.utils
package audio.funkwhale.ffa.utils
import android.annotation.SuppressLint
import android.app.Activity
@ -8,7 +8,7 @@ import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
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.Method

Wyświetl plik

@ -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.DownloadCursor
import kotlinx.coroutines.Dispatchers.IO
@ -71,21 +70,21 @@ sealed class Response {
object EventBus {
fun send(event: Event) {
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 {
fun send(command: Command) {
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 {
@ -94,22 +93,22 @@ object RequestBus {
GlobalScope.launch(IO) {
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 {
fun send(current: Int, duration: Int, percent: Int) {
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? {

Wyświetl plik

@ -1,7 +1,7 @@
package org.funkwhale.ffa.utils
package audio.funkwhale.ffa.utils
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.core.FuelError
import com.github.kittinunf.fuel.coroutines.awaitObjectResponseResult

Wyświetl plik

@ -1,10 +1,10 @@
package org.funkwhale.ffa.utils
package audio.funkwhale.ffa.utils
import android.os.Build
import androidx.fragment.app.Fragment
import org.funkwhale.ffa.R
import org.funkwhale.ffa.fragments.BrowseFragment
import org.funkwhale.ffa.repositories.Repository
import audio.funkwhale.ffa.R
import audio.funkwhale.ffa.fragments.BrowseFragment
import audio.funkwhale.ffa.repositories.Repository
import com.github.kittinunf.fuel.core.Request
import com.google.android.exoplayer2.offline.Download
import com.google.gson.Gson

Wyświetl plik

@ -1,4 +1,4 @@
package org.funkwhale.ffa.utils
package audio.funkwhale.ffa.utils
import com.google.android.exoplayer2.offline.Download
import com.preference.PowerPreference

Wyświetl plik

@ -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.coroutines.awaitObjectResponseResult

Wyświetl plik

@ -1,4 +1,4 @@
package org.funkwhale.ffa.utils
package audio.funkwhale.ffa.utils
import android.content.Context
import android.widget.Toast
@ -16,7 +16,7 @@ private fun logClassName(): String {
val known = setOf(
"dalvik.system.VMStack",
"java.lang.Thread",
"org.funkwhale.ffa.utils.UtilKt"
"audio.funkwhale.ffa.utils.UtilKt"
)
Thread.currentThread().stackTrace.forEach {

Wyświetl plik

@ -1,4 +1,4 @@
package org.funkwhale.ffa.views
package audio.funkwhale.ffa.views
import android.content.Context
import android.util.AttributeSet

Wyświetl plik

@ -1,11 +1,11 @@
package org.funkwhale.ffa.views
package audio.funkwhale.ffa.views
import android.animation.ObjectAnimator
import android.content.Context
import android.graphics.drawable.Drawable
import android.view.View
import android.widget.ImageView
import org.funkwhale.ffa.R
import audio.funkwhale.ffa.R
object LoadingImageView {
fun start(context: Context?, image: ImageView): ObjectAnimator? {

Wyświetl plik

@ -1,4 +1,4 @@
package org.funkwhale.ffa.views
package audio.funkwhale.ffa.views
import android.animation.ValueAnimator
import android.content.Context
@ -9,7 +9,7 @@ import android.view.MotionEvent
import android.view.View
import android.view.ViewTreeObserver
import android.view.animation.DecelerateInterpolator
import org.funkwhale.ffa.R
import audio.funkwhale.ffa.R
import com.google.android.material.card.MaterialCardView
import kotlinx.android.synthetic.main.partial_now_playing.view.*
import kotlin.math.abs

Wyświetl plik

@ -1,4 +1,4 @@
package org.funkwhale.ffa.views
package audio.funkwhale.ffa.views
import android.content.Context
import android.util.AttributeSet

Wyświetl plik

@ -29,7 +29,7 @@
</LinearLayout>
<org.funkwhale.ffa.views.NowPlayingView
<audio.funkwhale.ffa.views.NowPlayingView
android:id="@+id/now_playing"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
@ -45,7 +45,7 @@
<include layout="@layout/partial_now_playing" />
</org.funkwhale.ffa.views.NowPlayingView>
</audio.funkwhale.ffa.views.NowPlayingView>
<com.google.android.material.bottomappbar.BottomAppBar
android:id="@+id/appbar"

Wyświetl plik

@ -79,7 +79,7 @@
android:orientation="horizontal"
app:layout_constraintGuide_percent=".50" />
<org.funkwhale.ffa.views.SquareImageView
<audio.funkwhale.ffa.views.SquareImageView
android:id="@+id/cover_top_left"
android:layout_width="0dp"
android:layout_height="0dp"
@ -91,7 +91,7 @@
app:layout_constraintTop_toTopOf="parent"
tools:src="@tools:sample/avatars" />
<org.funkwhale.ffa.views.SquareImageView
<audio.funkwhale.ffa.views.SquareImageView
android:id="@+id/cover_top_right"
android:layout_width="0dp"
android:layout_height="0dp"
@ -103,7 +103,7 @@
app:layout_constraintTop_toTopOf="parent"
tools:src="@tools:sample/avatars" />
<org.funkwhale.ffa.views.SquareImageView
<audio.funkwhale.ffa.views.SquareImageView
android:id="@+id/cover_bottom_left"
android:layout_width="0dp"
android:layout_height="0dp"
@ -115,7 +115,7 @@
app:layout_constraintTop_toTopOf="@id/vertical"
tools:src="@tools:sample/avatars" />
<org.funkwhale.ffa.views.SquareImageView
<audio.funkwhale.ffa.views.SquareImageView
android:id="@+id/cover_bottom_right"
android:layout_width="0dp"
android:layout_height="0dp"

Wyświetl plik

@ -35,7 +35,7 @@
android:layout_height="?attr/actionBarSize"
android:layout_marginEnd="16dp">
<org.funkwhale.ffa.views.SquareImageView
<audio.funkwhale.ffa.views.SquareImageView
android:id="@+id/now_playing_cover"
android:layout_width="?attr/actionBarSize"
android:layout_height="?attr/actionBarSize"

Wyświetl plik

@ -6,14 +6,14 @@
android:layout_height="match_parent"
android:background="@color/surface">
<org.funkwhale.ffa.views.DisableableFrameLayout
<audio.funkwhale.ffa.views.DisableableFrameLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="?attr/actionBarSize"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
<org.funkwhale.ffa.views.NowPlayingView
<audio.funkwhale.ffa.views.NowPlayingView
android:id="@+id/now_playing"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
@ -29,7 +29,7 @@
<include layout="@layout/partial_now_playing" />
</org.funkwhale.ffa.views.NowPlayingView>
</audio.funkwhale.ffa.views.NowPlayingView>
<com.google.android.material.bottomappbar.BottomAppBar
android:id="@+id/appbar"

Wyświetl plik

@ -81,7 +81,7 @@
android:orientation="horizontal"
app:layout_constraintGuide_percent=".50" />
<org.funkwhale.ffa.views.SquareImageView
<audio.funkwhale.ffa.views.SquareImageView
android:id="@+id/cover_top_left"
android:layout_width="0dp"
android:layout_height="0dp"
@ -93,7 +93,7 @@
app:layout_constraintTop_toTopOf="parent"
tools:src="@tools:sample/avatars" />
<org.funkwhale.ffa.views.SquareImageView
<audio.funkwhale.ffa.views.SquareImageView
android:id="@+id/cover_top_right"
android:layout_width="0dp"
android:layout_height="0dp"
@ -105,7 +105,7 @@
app:layout_constraintTop_toTopOf="parent"
tools:src="@tools:sample/avatars" />
<org.funkwhale.ffa.views.SquareImageView
<audio.funkwhale.ffa.views.SquareImageView
android:id="@+id/cover_bottom_left"
android:layout_width="0dp"
android:layout_height="0dp"
@ -117,7 +117,7 @@
app:layout_constraintTop_toTopOf="@id/vertical"
tools:src="@tools:sample/avatars" />
<org.funkwhale.ffa.views.SquareImageView
<audio.funkwhale.ffa.views.SquareImageView
android:id="@+id/cover_bottom_right"
android:layout_width="0dp"
android:layout_height="0dp"

Wyświetl plik

@ -35,7 +35,7 @@
android:layout_height="?attr/actionBarSize"
android:layout_marginEnd="16dp">
<org.funkwhale.ffa.views.SquareImageView
<audio.funkwhale.ffa.views.SquareImageView
android:id="@+id/now_playing_cover"
android:layout_width="?attr/actionBarSize"
android:layout_height="?attr/actionBarSize"
@ -111,7 +111,7 @@
android:layout_weight="1"
android:padding="8dp">
<org.funkwhale.ffa.views.SquareImageView
<audio.funkwhale.ffa.views.SquareImageView
android:id="@+id/now_playing_details_cover"
android:layout_width="match_parent"
android:layout_height="match_parent"

Wyświetl plik

@ -12,7 +12,7 @@
android:transitionGroup="true"
tools:showIn="@layout/fragment_albums">
<org.funkwhale.ffa.views.SquareImageView
<audio.funkwhale.ffa.views.SquareImageView
android:id="@+id/art"
android:layout_width="48dp"
android:layout_height="wrap_content"

Wyświetl plik

@ -9,7 +9,7 @@
android:transitionGroup="true"
tools:showIn="@layout/fragment_albums_grid">
<org.funkwhale.ffa.views.SquareImageView
<audio.funkwhale.ffa.views.SquareImageView
android:id="@+id/cover"
android:layout_width="match_parent"
android:layout_height="wrap_content"

Wyświetl plik

@ -12,7 +12,7 @@
android:transitionGroup="true"
tools:showIn="@layout/fragment_artists">
<org.funkwhale.ffa.views.SquareImageView
<audio.funkwhale.ffa.views.SquareImageView
android:id="@+id/art"
android:layout_width="48dp"
android:layout_height="wrap_content"

Wyświetl plik

@ -35,7 +35,7 @@
android:orientation="horizontal"
app:layout_constraintGuide_percent=".50" />
<org.funkwhale.ffa.views.SquareImageView
<audio.funkwhale.ffa.views.SquareImageView
android:id="@+id/cover_top_left"
android:layout_width="0dp"
android:layout_height="0dp"
@ -47,7 +47,7 @@
app:layout_constraintTop_toTopOf="parent"
tools:src="@tools:sample/avatars" />
<org.funkwhale.ffa.views.SquareImageView
<audio.funkwhale.ffa.views.SquareImageView
android:id="@+id/cover_top_right"
android:layout_width="0dp"
android:layout_height="0dp"
@ -59,7 +59,7 @@
app:layout_constraintTop_toTopOf="parent"
tools:src="@tools:sample/avatars" />
<org.funkwhale.ffa.views.SquareImageView
<audio.funkwhale.ffa.views.SquareImageView
android:id="@+id/cover_bottom_left"
android:layout_width="0dp"
android:layout_height="0dp"
@ -71,7 +71,7 @@
app:layout_constraintTop_toTopOf="@id/vertical"
tools:src="@tools:sample/avatars" />
<org.funkwhale.ffa.views.SquareImageView
<audio.funkwhale.ffa.views.SquareImageView
android:id="@+id/cover_bottom_right"
android:layout_width="0dp"
android:layout_height="0dp"

Wyświetl plik

@ -12,7 +12,7 @@
android:transitionGroup="true"
tools:showIn="@layout/fragment_radios">
<org.funkwhale.ffa.views.SquareImageView
<audio.funkwhale.ffa.views.SquareImageView
android:id="@+id/art"
android:layout_width="48dp"
android:layout_height="wrap_content"

Wyświetl plik

@ -17,7 +17,7 @@
android:transitionGroup="true"
tools:showIn="@layout/fragment_tracks">
<org.funkwhale.ffa.views.SquareImageView
<audio.funkwhale.ffa.views.SquareImageView
android:id="@+id/handle"
android:layout_width="18dp"
android:layout_height="wrap_content"
@ -27,7 +27,7 @@
android:visibility="gone"
tools:visibility="visible" />
<org.funkwhale.ffa.views.SquareImageView
<audio.funkwhale.ffa.views.SquareImageView
android:id="@+id/cover"
android:layout_width="48dp"
android:layout_height="wrap_content"