diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d6aec48..d4606a7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 diff --git a/app/build.gradle.kts b/app/build.gradle.kts index e668ef1..871f04a 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -38,7 +38,7 @@ android { compileSdkVersion(29) defaultConfig { - applicationId = "org.funkwhale.ffa" + applicationId = "audio.funkwhale.ffa" minSdkVersion(23) targetSdkVersion(29) diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index df59f42..52cd9f3 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -1 +1 @@ --keep class org.funkwhale.ffa.** { *; } +-keep class audio.funkwhale.ffa.** { *; } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index c291d91..10bfe9a 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,7 +1,7 @@ + package="audio.funkwhale.ffa"> @@ -9,7 +9,7 @@ AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES) diff --git a/app/src/main/java/org/funkwhale/ffa/activities/DownloadsActivity.kt b/app/src/main/java/audio/funkwhale/ffa/activities/DownloadsActivity.kt similarity index 87% rename from app/src/main/java/org/funkwhale/ffa/activities/DownloadsActivity.kt rename to app/src/main/java/audio/funkwhale/ffa/activities/DownloadsActivity.kt index 48f856f..57d368e 100644 --- a/app/src/main/java/org/funkwhale/ffa/activities/DownloadsActivity.kt +++ b/app/src/main/java/audio/funkwhale/ffa/activities/DownloadsActivity.kt @@ -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 diff --git a/app/src/main/java/org/funkwhale/ffa/activities/LicencesActivity.kt b/app/src/main/java/audio/funkwhale/ffa/activities/LicencesActivity.kt similarity index 97% rename from app/src/main/java/org/funkwhale/ffa/activities/LicencesActivity.kt rename to app/src/main/java/audio/funkwhale/ffa/activities/LicencesActivity.kt index c08ff57..0f93eb6 100644 --- a/app/src/main/java/org/funkwhale/ffa/activities/LicencesActivity.kt +++ b/app/src/main/java/audio/funkwhale/ffa/activities/LicencesActivity.kt @@ -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.* diff --git a/app/src/main/java/org/funkwhale/ffa/activities/LoginActivity.kt b/app/src/main/java/audio/funkwhale/ffa/activities/LoginActivity.kt similarity index 96% rename from app/src/main/java/org/funkwhale/ffa/activities/LoginActivity.kt rename to app/src/main/java/audio/funkwhale/ffa/activities/LoginActivity.kt index 1de19cb..a5f2764 100644 --- a/app/src/main/java/org/funkwhale/ffa/activities/LoginActivity.kt +++ b/app/src/main/java/audio/funkwhale/ffa/activities/LoginActivity.kt @@ -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 diff --git a/app/src/main/java/org/funkwhale/ffa/activities/MainActivity.kt b/app/src/main/java/audio/funkwhale/ffa/activities/MainActivity.kt similarity index 96% rename from app/src/main/java/org/funkwhale/ffa/activities/MainActivity.kt rename to app/src/main/java/audio/funkwhale/ffa/activities/MainActivity.kt index 25f86a0..434182b 100644 --- a/app/src/main/java/org/funkwhale/ffa/activities/MainActivity.kt +++ b/app/src/main/java/audio/funkwhale/ffa/activities/MainActivity.kt @@ -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 diff --git a/app/src/main/java/org/funkwhale/ffa/activities/SearchActivity.kt b/app/src/main/java/audio/funkwhale/ffa/activities/SearchActivity.kt similarity index 93% rename from app/src/main/java/org/funkwhale/ffa/activities/SearchActivity.kt rename to app/src/main/java/audio/funkwhale/ffa/activities/SearchActivity.kt index 202e9b4..73f2235 100644 --- a/app/src/main/java/org/funkwhale/ffa/activities/SearchActivity.kt +++ b/app/src/main/java/audio/funkwhale/ffa/activities/SearchActivity.kt @@ -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 diff --git a/app/src/main/java/org/funkwhale/ffa/activities/SettingsActivity.kt b/app/src/main/java/audio/funkwhale/ffa/activities/SettingsActivity.kt similarity index 92% rename from app/src/main/java/org/funkwhale/ffa/activities/SettingsActivity.kt rename to app/src/main/java/audio/funkwhale/ffa/activities/SettingsActivity.kt index 1b992da..ba8e477 100644 --- a/app/src/main/java/org/funkwhale/ffa/activities/SettingsActivity.kt +++ b/app/src/main/java/audio/funkwhale/ffa/activities/SettingsActivity.kt @@ -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("version")?.let { - it.summary = "${BuildConfig.VERSION_NAME} (${BuildConfig.VERSION_CODE})" + it.summary = "${audio.funkwhale.ffa.BuildConfig.VERSION_NAME} (${audio.funkwhale.ffa.BuildConfig.VERSION_CODE})" } } } diff --git a/app/src/main/java/org/funkwhale/ffa/activities/SplashActivity.kt b/app/src/main/java/audio/funkwhale/ffa/activities/SplashActivity.kt similarity index 78% rename from app/src/main/java/org/funkwhale/ffa/activities/SplashActivity.kt rename to app/src/main/java/audio/funkwhale/ffa/activities/SplashActivity.kt index cb85974..60d2312 100644 --- a/app/src/main/java/org/funkwhale/ffa/activities/SplashActivity.kt +++ b/app/src/main/java/audio/funkwhale/ffa/activities/SplashActivity.kt @@ -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 diff --git a/app/src/main/java/org/funkwhale/ffa/adapters/AlbumsAdapter.kt b/app/src/main/java/audio/funkwhale/ffa/adapters/AlbumsAdapter.kt similarity index 88% rename from app/src/main/java/org/funkwhale/ffa/adapters/AlbumsAdapter.kt rename to app/src/main/java/audio/funkwhale/ffa/adapters/AlbumsAdapter.kt index 4408808..b8822f6 100644 --- a/app/src/main/java/org/funkwhale/ffa/adapters/AlbumsAdapter.kt +++ b/app/src/main/java/audio/funkwhale/ffa/adapters/AlbumsAdapter.kt @@ -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.* diff --git a/app/src/main/java/org/funkwhale/ffa/adapters/AlbumsGridAdapter.kt b/app/src/main/java/audio/funkwhale/ffa/adapters/AlbumsGridAdapter.kt similarity index 86% rename from app/src/main/java/org/funkwhale/ffa/adapters/AlbumsGridAdapter.kt rename to app/src/main/java/audio/funkwhale/ffa/adapters/AlbumsGridAdapter.kt index b3a0cd0..a69be65 100644 --- a/app/src/main/java/org/funkwhale/ffa/adapters/AlbumsGridAdapter.kt +++ b/app/src/main/java/audio/funkwhale/ffa/adapters/AlbumsGridAdapter.kt @@ -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.* diff --git a/app/src/main/java/org/funkwhale/ffa/adapters/ArtistsAdapter.kt b/app/src/main/java/audio/funkwhale/ffa/adapters/ArtistsAdapter.kt similarity index 90% rename from app/src/main/java/org/funkwhale/ffa/adapters/ArtistsAdapter.kt rename to app/src/main/java/audio/funkwhale/ffa/adapters/ArtistsAdapter.kt index 193c7fe..4b5dce2 100644 --- a/app/src/main/java/org/funkwhale/ffa/adapters/ArtistsAdapter.kt +++ b/app/src/main/java/audio/funkwhale/ffa/adapters/ArtistsAdapter.kt @@ -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.* diff --git a/app/src/main/java/org/funkwhale/ffa/adapters/BrowseTabsAdapter.kt b/app/src/main/java/audio/funkwhale/ffa/adapters/BrowseTabsAdapter.kt similarity index 91% rename from app/src/main/java/org/funkwhale/ffa/adapters/BrowseTabsAdapter.kt rename to app/src/main/java/audio/funkwhale/ffa/adapters/BrowseTabsAdapter.kt index b47baa6..359578f 100644 --- a/app/src/main/java/org/funkwhale/ffa/adapters/BrowseTabsAdapter.kt +++ b/app/src/main/java/audio/funkwhale/ffa/adapters/BrowseTabsAdapter.kt @@ -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() diff --git a/app/src/main/java/org/funkwhale/ffa/adapters/DownloadsAdapter.kt b/app/src/main/java/audio/funkwhale/ffa/adapters/DownloadsAdapter.kt similarity index 95% rename from app/src/main/java/org/funkwhale/ffa/adapters/DownloadsAdapter.kt rename to app/src/main/java/audio/funkwhale/ffa/adapters/DownloadsAdapter.kt index 4c7a3b4..f56b9d1 100644 --- a/app/src/main/java/org/funkwhale/ffa/adapters/DownloadsAdapter.kt +++ b/app/src/main/java/audio/funkwhale/ffa/adapters/DownloadsAdapter.kt @@ -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.* diff --git a/app/src/main/java/org/funkwhale/ffa/adapters/FavoritesAdapter.kt b/app/src/main/java/audio/funkwhale/ffa/adapters/FavoritesAdapter.kt similarity index 97% rename from app/src/main/java/org/funkwhale/ffa/adapters/FavoritesAdapter.kt rename to app/src/main/java/audio/funkwhale/ffa/adapters/FavoritesAdapter.kt index 132ae79..404b44e 100644 --- a/app/src/main/java/org/funkwhale/ffa/adapters/FavoritesAdapter.kt +++ b/app/src/main/java/audio/funkwhale/ffa/adapters/FavoritesAdapter.kt @@ -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.* diff --git a/app/src/main/java/org/funkwhale/ffa/adapters/PlaylistTracksAdapter.kt b/app/src/main/java/audio/funkwhale/ffa/adapters/PlaylistTracksAdapter.kt similarity index 97% rename from app/src/main/java/org/funkwhale/ffa/adapters/PlaylistTracksAdapter.kt rename to app/src/main/java/audio/funkwhale/ffa/adapters/PlaylistTracksAdapter.kt index 62581fd..da98cf7 100644 --- a/app/src/main/java/org/funkwhale/ffa/adapters/PlaylistTracksAdapter.kt +++ b/app/src/main/java/audio/funkwhale/ffa/adapters/PlaylistTracksAdapter.kt @@ -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.* diff --git a/app/src/main/java/org/funkwhale/ffa/adapters/PlaylistsAdapter.kt b/app/src/main/java/audio/funkwhale/ffa/adapters/PlaylistsAdapter.kt similarity index 93% rename from app/src/main/java/org/funkwhale/ffa/adapters/PlaylistsAdapter.kt rename to app/src/main/java/audio/funkwhale/ffa/adapters/PlaylistsAdapter.kt index bcaf901..74b8513 100644 --- a/app/src/main/java/org/funkwhale/ffa/adapters/PlaylistsAdapter.kt +++ b/app/src/main/java/audio/funkwhale/ffa/adapters/PlaylistsAdapter.kt @@ -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.* diff --git a/app/src/main/java/org/funkwhale/ffa/adapters/RadiosAdapter.kt b/app/src/main/java/audio/funkwhale/ffa/adapters/RadiosAdapter.kt similarity index 94% rename from app/src/main/java/org/funkwhale/ffa/adapters/RadiosAdapter.kt rename to app/src/main/java/audio/funkwhale/ffa/adapters/RadiosAdapter.kt index 62cf352..9d1ee17 100644 --- a/app/src/main/java/org/funkwhale/ffa/adapters/RadiosAdapter.kt +++ b/app/src/main/java/audio/funkwhale/ffa/adapters/RadiosAdapter.kt @@ -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.* diff --git a/app/src/main/java/org/funkwhale/ffa/adapters/SearchAdapter.kt b/app/src/main/java/audio/funkwhale/ffa/adapters/SearchAdapter.kt similarity index 98% rename from app/src/main/java/org/funkwhale/ffa/adapters/SearchAdapter.kt rename to app/src/main/java/audio/funkwhale/ffa/adapters/SearchAdapter.kt index 8d93c91..02aec2f 100644 --- a/app/src/main/java/org/funkwhale/ffa/adapters/SearchAdapter.kt +++ b/app/src/main/java/audio/funkwhale/ffa/adapters/SearchAdapter.kt @@ -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.* diff --git a/app/src/main/java/org/funkwhale/ffa/adapters/TracksAdapter.kt b/app/src/main/java/audio/funkwhale/ffa/adapters/TracksAdapter.kt similarity index 97% rename from app/src/main/java/org/funkwhale/ffa/adapters/TracksAdapter.kt rename to app/src/main/java/audio/funkwhale/ffa/adapters/TracksAdapter.kt index 3377b8c..2edf495 100644 --- a/app/src/main/java/org/funkwhale/ffa/adapters/TracksAdapter.kt +++ b/app/src/main/java/audio/funkwhale/ffa/adapters/TracksAdapter.kt @@ -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.* diff --git a/app/src/main/java/org/funkwhale/ffa/fragments/AddToPlaylistDialog.kt b/app/src/main/java/audio/funkwhale/ffa/fragments/AddToPlaylistDialog.kt similarity index 92% rename from app/src/main/java/org/funkwhale/ffa/fragments/AddToPlaylistDialog.kt rename to app/src/main/java/audio/funkwhale/ffa/fragments/AddToPlaylistDialog.kt index f8541f2..c2a091a 100644 --- a/app/src/main/java/org/funkwhale/ffa/fragments/AddToPlaylistDialog.kt +++ b/app/src/main/java/audio/funkwhale/ffa/fragments/AddToPlaylistDialog.kt @@ -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 diff --git a/app/src/main/java/org/funkwhale/ffa/fragments/AlbumsFragment.kt b/app/src/main/java/audio/funkwhale/ffa/fragments/AlbumsFragment.kt similarity index 92% rename from app/src/main/java/org/funkwhale/ffa/fragments/AlbumsFragment.kt rename to app/src/main/java/audio/funkwhale/ffa/fragments/AlbumsFragment.kt index fa9b302..85f1e19 100644 --- a/app/src/main/java/org/funkwhale/ffa/fragments/AlbumsFragment.kt +++ b/app/src/main/java/audio/funkwhale/ffa/fragments/AlbumsFragment.kt @@ -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.* diff --git a/app/src/main/java/org/funkwhale/ffa/fragments/AlbumsGridFragment.kt b/app/src/main/java/audio/funkwhale/ffa/fragments/AlbumsGridFragment.kt similarity index 84% rename from app/src/main/java/org/funkwhale/ffa/fragments/AlbumsGridFragment.kt rename to app/src/main/java/audio/funkwhale/ffa/fragments/AlbumsGridFragment.kt index bb541e7..356ab52 100644 --- a/app/src/main/java/org/funkwhale/ffa/fragments/AlbumsGridFragment.kt +++ b/app/src/main/java/audio/funkwhale/ffa/fragments/AlbumsGridFragment.kt @@ -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() { diff --git a/app/src/main/java/org/funkwhale/ffa/fragments/ArtistsFragment.kt b/app/src/main/java/audio/funkwhale/ffa/fragments/ArtistsFragment.kt similarity index 85% rename from app/src/main/java/org/funkwhale/ffa/fragments/ArtistsFragment.kt rename to app/src/main/java/audio/funkwhale/ffa/fragments/ArtistsFragment.kt index 36420aa..6234fab 100644 --- a/app/src/main/java/org/funkwhale/ffa/fragments/ArtistsFragment.kt +++ b/app/src/main/java/audio/funkwhale/ffa/fragments/ArtistsFragment.kt @@ -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() { diff --git a/app/src/main/java/org/funkwhale/ffa/fragments/BrowseFragment.kt b/app/src/main/java/audio/funkwhale/ffa/fragments/BrowseFragment.kt similarity index 87% rename from app/src/main/java/org/funkwhale/ffa/fragments/BrowseFragment.kt rename to app/src/main/java/audio/funkwhale/ffa/fragments/BrowseFragment.kt index 0ce4b8f..72761cf 100644 --- a/app/src/main/java/org/funkwhale/ffa/fragments/BrowseFragment.kt +++ b/app/src/main/java/audio/funkwhale/ffa/fragments/BrowseFragment.kt @@ -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() { diff --git a/app/src/main/java/org/funkwhale/ffa/fragments/FavoritesFragment.kt b/app/src/main/java/audio/funkwhale/ffa/fragments/FavoritesFragment.kt similarity index 92% rename from app/src/main/java/org/funkwhale/ffa/fragments/FavoritesFragment.kt rename to app/src/main/java/audio/funkwhale/ffa/fragments/FavoritesFragment.kt index d7200a4..f08d835 100644 --- a/app/src/main/java/org/funkwhale/ffa/fragments/FavoritesFragment.kt +++ b/app/src/main/java/audio/funkwhale/ffa/fragments/FavoritesFragment.kt @@ -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 diff --git a/app/src/main/java/org/funkwhale/ffa/fragments/LandscapeQueueFragment.kt b/app/src/main/java/audio/funkwhale/ffa/fragments/LandscapeQueueFragment.kt similarity index 94% rename from app/src/main/java/org/funkwhale/ffa/fragments/LandscapeQueueFragment.kt rename to app/src/main/java/audio/funkwhale/ffa/fragments/LandscapeQueueFragment.kt index e234194..effeb1c 100644 --- a/app/src/main/java/org/funkwhale/ffa/fragments/LandscapeQueueFragment.kt +++ b/app/src/main/java/audio/funkwhale/ffa/fragments/LandscapeQueueFragment.kt @@ -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 diff --git a/app/src/main/java/org/funkwhale/ffa/fragments/LoginDialog.kt b/app/src/main/java/audio/funkwhale/ffa/fragments/LoginDialog.kt similarity index 88% rename from app/src/main/java/org/funkwhale/ffa/fragments/LoginDialog.kt rename to app/src/main/java/audio/funkwhale/ffa/fragments/LoginDialog.kt index 39a5e1d..d68000a 100644 --- a/app/src/main/java/org/funkwhale/ffa/fragments/LoginDialog.kt +++ b/app/src/main/java/audio/funkwhale/ffa/fragments/LoginDialog.kt @@ -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 { diff --git a/app/src/main/java/org/funkwhale/ffa/fragments/OtterFragment.kt b/app/src/main/java/audio/funkwhale/ffa/fragments/OtterFragment.kt similarity index 97% rename from app/src/main/java/org/funkwhale/ffa/fragments/OtterFragment.kt rename to app/src/main/java/audio/funkwhale/ffa/fragments/OtterFragment.kt index d65b805..bb1bf0f 100644 --- a/app/src/main/java/org/funkwhale/ffa/fragments/OtterFragment.kt +++ b/app/src/main/java/audio/funkwhale/ffa/fragments/OtterFragment.kt @@ -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 diff --git a/app/src/main/java/org/funkwhale/ffa/fragments/PlaylistTracksFragment.kt b/app/src/main/java/audio/funkwhale/ffa/fragments/PlaylistTracksFragment.kt similarity index 94% rename from app/src/main/java/org/funkwhale/ffa/fragments/PlaylistTracksFragment.kt rename to app/src/main/java/audio/funkwhale/ffa/fragments/PlaylistTracksFragment.kt index 7bd34b4..af09650 100644 --- a/app/src/main/java/org/funkwhale/ffa/fragments/PlaylistTracksFragment.kt +++ b/app/src/main/java/audio/funkwhale/ffa/fragments/PlaylistTracksFragment.kt @@ -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.* diff --git a/app/src/main/java/org/funkwhale/ffa/fragments/PlaylistsFragment.kt b/app/src/main/java/audio/funkwhale/ffa/fragments/PlaylistsFragment.kt similarity index 83% rename from app/src/main/java/org/funkwhale/ffa/fragments/PlaylistsFragment.kt rename to app/src/main/java/audio/funkwhale/ffa/fragments/PlaylistsFragment.kt index dd32d85..d5bb995 100644 --- a/app/src/main/java/org/funkwhale/ffa/fragments/PlaylistsFragment.kt +++ b/app/src/main/java/audio/funkwhale/ffa/fragments/PlaylistsFragment.kt @@ -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() { diff --git a/app/src/main/java/org/funkwhale/ffa/fragments/QueueFragment.kt b/app/src/main/java/audio/funkwhale/ffa/fragments/QueueFragment.kt similarity index 94% rename from app/src/main/java/org/funkwhale/ffa/fragments/QueueFragment.kt rename to app/src/main/java/audio/funkwhale/ffa/fragments/QueueFragment.kt index 87f635b..8ac0289 100644 --- a/app/src/main/java/org/funkwhale/ffa/fragments/QueueFragment.kt +++ b/app/src/main/java/audio/funkwhale/ffa/fragments/QueueFragment.kt @@ -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.* diff --git a/app/src/main/java/org/funkwhale/ffa/fragments/RadiosFragment.kt b/app/src/main/java/audio/funkwhale/ffa/fragments/RadiosFragment.kt similarity index 87% rename from app/src/main/java/org/funkwhale/ffa/fragments/RadiosFragment.kt rename to app/src/main/java/audio/funkwhale/ffa/fragments/RadiosFragment.kt index 81d7a9f..44f6914 100644 --- a/app/src/main/java/org/funkwhale/ffa/fragments/RadiosFragment.kt +++ b/app/src/main/java/audio/funkwhale/ffa/fragments/RadiosFragment.kt @@ -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 diff --git a/app/src/main/java/org/funkwhale/ffa/fragments/TrackInfoDetailsFragment.kt b/app/src/main/java/audio/funkwhale/ffa/fragments/TrackInfoDetailsFragment.kt similarity index 94% rename from app/src/main/java/org/funkwhale/ffa/fragments/TrackInfoDetailsFragment.kt rename to app/src/main/java/audio/funkwhale/ffa/fragments/TrackInfoDetailsFragment.kt index c48f10b..a91dea5 100644 --- a/app/src/main/java/org/funkwhale/ffa/fragments/TrackInfoDetailsFragment.kt +++ b/app/src/main/java/audio/funkwhale/ffa/fragments/TrackInfoDetailsFragment.kt @@ -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() { diff --git a/app/src/main/java/org/funkwhale/ffa/fragments/TracksFragment.kt b/app/src/main/java/audio/funkwhale/ffa/fragments/TracksFragment.kt similarity index 95% rename from app/src/main/java/org/funkwhale/ffa/fragments/TracksFragment.kt rename to app/src/main/java/audio/funkwhale/ffa/fragments/TracksFragment.kt index 96b45e7..8e46975 100644 --- a/app/src/main/java/org/funkwhale/ffa/fragments/TracksFragment.kt +++ b/app/src/main/java/audio/funkwhale/ffa/fragments/TracksFragment.kt @@ -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 diff --git a/app/src/main/java/org/funkwhale/ffa/playback/MediaControlsManager.kt b/app/src/main/java/audio/funkwhale/ffa/playback/MediaControlsManager.kt similarity index 90% rename from app/src/main/java/org/funkwhale/ffa/playback/MediaControlsManager.kt rename to app/src/main/java/audio/funkwhale/ffa/playback/MediaControlsManager.kt index 57e6892..377865a 100644 --- a/app/src/main/java/org/funkwhale/ffa/playback/MediaControlsManager.kt +++ b/app/src/main/java/audio/funkwhale/ffa/playback/MediaControlsManager.kt @@ -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() } } } diff --git a/app/src/main/java/org/funkwhale/ffa/playback/MediaSession.kt b/app/src/main/java/audio/funkwhale/ffa/playback/MediaSession.kt similarity index 95% rename from app/src/main/java/org/funkwhale/ffa/playback/MediaSession.kt rename to app/src/main/java/audio/funkwhale/ffa/playback/MediaSession.kt index 6618893..35d6daf 100644 --- a/app/src/main/java/org/funkwhale/ffa/playback/MediaSession.kt +++ b/app/src/main/java/audio/funkwhale/ffa/playback/MediaSession.kt @@ -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 diff --git a/app/src/main/java/org/funkwhale/ffa/playback/PinService.kt b/app/src/main/java/audio/funkwhale/ffa/playback/PinService.kt similarity index 82% rename from app/src/main/java/org/funkwhale/ffa/playback/PinService.kt rename to app/src/main/java/audio/funkwhale/ffa/playback/PinService.kt index 3d0459c..9dbe031 100644 --- a/app/src/main/java/org/funkwhale/ffa/playback/PinService.kt +++ b/app/src/main/java/audio/funkwhale/ffa/playback/PinService.kt @@ -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()) } diff --git a/app/src/main/java/org/funkwhale/ffa/playback/PlayerService.kt b/app/src/main/java/audio/funkwhale/ffa/playback/PlayerService.kt similarity index 95% rename from app/src/main/java/org/funkwhale/ffa/playback/PlayerService.kt rename to app/src/main/java/audio/funkwhale/ffa/playback/PlayerService.kt index 46457bd..84861e7 100644 --- a/app/src/main/java/org/funkwhale/ffa/playback/PlayerService.kt +++ b/app/src/main/java/audio/funkwhale/ffa/playback/PlayerService.kt @@ -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() } diff --git a/app/src/main/java/org/funkwhale/ffa/playback/QueueManager.kt b/app/src/main/java/audio/funkwhale/ffa/playback/QueueManager.kt similarity index 94% rename from app/src/main/java/org/funkwhale/ffa/playback/QueueManager.kt rename to app/src/main/java/audio/funkwhale/ffa/playback/QueueManager.kt index a061415..b08d36b 100644 --- a/app/src/main/java/org/funkwhale/ffa/playback/QueueManager.kt +++ b/app/src/main/java/audio/funkwhale/ffa/playback/QueueManager.kt @@ -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, diff --git a/app/src/main/java/org/funkwhale/ffa/playback/RadioPlayer.kt b/app/src/main/java/audio/funkwhale/ffa/playback/RadioPlayer.kt similarity index 95% rename from app/src/main/java/org/funkwhale/ffa/playback/RadioPlayer.kt rename to app/src/main/java/audio/funkwhale/ffa/playback/RadioPlayer.kt index 04cb6a3..31745c1 100644 --- a/app/src/main/java/org/funkwhale/ffa/playback/RadioPlayer.kt +++ b/app/src/main/java/audio/funkwhale/ffa/playback/RadioPlayer.kt @@ -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 diff --git a/app/src/main/java/org/funkwhale/ffa/repositories/AlbumsRepository.kt b/app/src/main/java/audio/funkwhale/ffa/repositories/AlbumsRepository.kt similarity index 81% rename from app/src/main/java/org/funkwhale/ffa/repositories/AlbumsRepository.kt rename to app/src/main/java/audio/funkwhale/ffa/repositories/AlbumsRepository.kt index e1d7341..923f03b 100644 --- a/app/src/main/java/org/funkwhale/ffa/repositories/AlbumsRepository.kt +++ b/app/src/main/java/audio/funkwhale/ffa/repositories/AlbumsRepository.kt @@ -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 diff --git a/app/src/main/java/org/funkwhale/ffa/repositories/ArtistTracksRepository.kt b/app/src/main/java/audio/funkwhale/ffa/repositories/ArtistTracksRepository.kt similarity index 76% rename from app/src/main/java/org/funkwhale/ffa/repositories/ArtistTracksRepository.kt rename to app/src/main/java/audio/funkwhale/ffa/repositories/ArtistTracksRepository.kt index c94ab1a..69e503c 100644 --- a/app/src/main/java/org/funkwhale/ffa/repositories/ArtistTracksRepository.kt +++ b/app/src/main/java/audio/funkwhale/ffa/repositories/ArtistTracksRepository.kt @@ -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 diff --git a/app/src/main/java/org/funkwhale/ffa/repositories/ArtistsRepository.kt b/app/src/main/java/audio/funkwhale/ffa/repositories/ArtistsRepository.kt similarity index 75% rename from app/src/main/java/org/funkwhale/ffa/repositories/ArtistsRepository.kt rename to app/src/main/java/audio/funkwhale/ffa/repositories/ArtistsRepository.kt index 7933992..a47dc5d 100644 --- a/app/src/main/java/org/funkwhale/ffa/repositories/ArtistsRepository.kt +++ b/app/src/main/java/audio/funkwhale/ffa/repositories/ArtistsRepository.kt @@ -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 diff --git a/app/src/main/java/org/funkwhale/ffa/repositories/FavoritesRepository.kt b/app/src/main/java/audio/funkwhale/ffa/repositories/FavoritesRepository.kt similarity index 93% rename from app/src/main/java/org/funkwhale/ffa/repositories/FavoritesRepository.kt rename to app/src/main/java/audio/funkwhale/ffa/repositories/FavoritesRepository.kt index f4d0d3c..dfefb44 100644 --- a/app/src/main/java/org/funkwhale/ffa/repositories/FavoritesRepository.kt +++ b/app/src/main/java/audio/funkwhale/ffa/repositories/FavoritesRepository.kt @@ -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 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) } } diff --git a/app/src/main/java/org/funkwhale/ffa/repositories/HttpUpstream.kt b/app/src/main/java/audio/funkwhale/ffa/repositories/HttpUpstream.kt similarity index 97% rename from app/src/main/java/org/funkwhale/ffa/repositories/HttpUpstream.kt rename to app/src/main/java/audio/funkwhale/ffa/repositories/HttpUpstream.kt index 10f6552..3982c13 100644 --- a/app/src/main/java/org/funkwhale/ffa/repositories/HttpUpstream.kt +++ b/app/src/main/java/audio/funkwhale/ffa/repositories/HttpUpstream.kt @@ -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 diff --git a/app/src/main/java/org/funkwhale/ffa/repositories/PlaylistTracksRepository.kt b/app/src/main/java/audio/funkwhale/ffa/repositories/PlaylistTracksRepository.kt similarity index 83% rename from app/src/main/java/org/funkwhale/ffa/repositories/PlaylistTracksRepository.kt rename to app/src/main/java/audio/funkwhale/ffa/repositories/PlaylistTracksRepository.kt index cb155d2..decb62a 100644 --- a/app/src/main/java/org/funkwhale/ffa/repositories/PlaylistTracksRepository.kt +++ b/app/src/main/java/audio/funkwhale/ffa/repositories/PlaylistTracksRepository.kt @@ -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 diff --git a/app/src/main/java/org/funkwhale/ffa/repositories/PlaylistsRepository.kt b/app/src/main/java/audio/funkwhale/ffa/repositories/PlaylistsRepository.kt similarity index 97% rename from app/src/main/java/org/funkwhale/ffa/repositories/PlaylistsRepository.kt rename to app/src/main/java/audio/funkwhale/ffa/repositories/PlaylistsRepository.kt index a7ef7f9..735154f 100644 --- a/app/src/main/java/org/funkwhale/ffa/repositories/PlaylistsRepository.kt +++ b/app/src/main/java/audio/funkwhale/ffa/repositories/PlaylistsRepository.kt @@ -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 diff --git a/app/src/main/java/org/funkwhale/ffa/repositories/RadiosRepository.kt b/app/src/main/java/audio/funkwhale/ffa/repositories/RadiosRepository.kt similarity index 78% rename from app/src/main/java/org/funkwhale/ffa/repositories/RadiosRepository.kt rename to app/src/main/java/audio/funkwhale/ffa/repositories/RadiosRepository.kt index 8eb3ba5..a3fb360 100644 --- a/app/src/main/java/org/funkwhale/ffa/repositories/RadiosRepository.kt +++ b/app/src/main/java/audio/funkwhale/ffa/repositories/RadiosRepository.kt @@ -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 diff --git a/app/src/main/java/org/funkwhale/ffa/repositories/Repository.kt b/app/src/main/java/audio/funkwhale/ffa/repositories/Repository.kt similarity index 91% rename from app/src/main/java/org/funkwhale/ffa/repositories/Repository.kt rename to app/src/main/java/audio/funkwhale/ffa/repositories/Repository.kt index e9308aa..e838f41 100644 --- a/app/src/main/java/org/funkwhale/ffa/repositories/Repository.kt +++ b/app/src/main/java/audio/funkwhale/ffa/repositories/Repository.kt @@ -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 diff --git a/app/src/main/java/org/funkwhale/ffa/repositories/SearchRepository.kt b/app/src/main/java/audio/funkwhale/ffa/repositories/SearchRepository.kt similarity index 91% rename from app/src/main/java/org/funkwhale/ffa/repositories/SearchRepository.kt rename to app/src/main/java/audio/funkwhale/ffa/repositories/SearchRepository.kt index c8bda24..1b95516 100644 --- a/app/src/main/java/org/funkwhale/ffa/repositories/SearchRepository.kt +++ b/app/src/main/java/audio/funkwhale/ffa/repositories/SearchRepository.kt @@ -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 diff --git a/app/src/main/java/org/funkwhale/ffa/repositories/TracksRepository.kt b/app/src/main/java/audio/funkwhale/ffa/repositories/TracksRepository.kt similarity index 85% rename from app/src/main/java/org/funkwhale/ffa/repositories/TracksRepository.kt rename to app/src/main/java/audio/funkwhale/ffa/repositories/TracksRepository.kt index d936a8b..6314916 100644 --- a/app/src/main/java/org/funkwhale/ffa/repositories/TracksRepository.kt +++ b/app/src/main/java/audio/funkwhale/ffa/repositories/TracksRepository.kt @@ -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? { - val cursor = FFA.get().exoDownloadManager.downloadIndex.getDownloads() + val cursor = audio.funkwhale.ffa.FFA.get().exoDownloadManager.downloadIndex.getDownloads() val ids: MutableList = 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 diff --git a/app/src/main/java/org/funkwhale/ffa/utils/AppContext.kt b/app/src/main/java/audio/funkwhale/ffa/utils/AppContext.kt similarity index 97% rename from app/src/main/java/org/funkwhale/ffa/utils/AppContext.kt rename to app/src/main/java/audio/funkwhale/ffa/utils/AppContext.kt index c7f4806..656b29f 100644 --- a/app/src/main/java/org/funkwhale/ffa/utils/AppContext.kt +++ b/app/src/main/java/audio/funkwhale/ffa/utils/AppContext.kt @@ -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 diff --git a/app/src/main/java/org/funkwhale/ffa/utils/Bus.kt b/app/src/main/java/audio/funkwhale/ffa/utils/Bus.kt similarity index 83% rename from app/src/main/java/org/funkwhale/ffa/utils/Bus.kt rename to app/src/main/java/audio/funkwhale/ffa/utils/Bus.kt index b1acc72..1254b07 100644 --- a/app/src/main/java/org/funkwhale/ffa/utils/Bus.kt +++ b/app/src/main/java/audio/funkwhale/ffa/utils/Bus.kt @@ -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 Channel.wait(): T? { diff --git a/app/src/main/java/org/funkwhale/ffa/utils/Data.kt b/app/src/main/java/audio/funkwhale/ffa/utils/Data.kt similarity index 97% rename from app/src/main/java/org/funkwhale/ffa/utils/Data.kt rename to app/src/main/java/audio/funkwhale/ffa/utils/Data.kt index 6ae83fd..cd993f2 100644 --- a/app/src/main/java/org/funkwhale/ffa/utils/Data.kt +++ b/app/src/main/java/audio/funkwhale/ffa/utils/Data.kt @@ -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 diff --git a/app/src/main/java/org/funkwhale/ffa/utils/Extensions.kt b/app/src/main/java/audio/funkwhale/ffa/utils/Extensions.kt similarity index 92% rename from app/src/main/java/org/funkwhale/ffa/utils/Extensions.kt rename to app/src/main/java/audio/funkwhale/ffa/utils/Extensions.kt index 5e3c6d8..38aec66 100644 --- a/app/src/main/java/org/funkwhale/ffa/utils/Extensions.kt +++ b/app/src/main/java/audio/funkwhale/ffa/utils/Extensions.kt @@ -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 diff --git a/app/src/main/java/org/funkwhale/ffa/utils/Models.kt b/app/src/main/java/audio/funkwhale/ffa/utils/Models.kt similarity index 99% rename from app/src/main/java/org/funkwhale/ffa/utils/Models.kt rename to app/src/main/java/audio/funkwhale/ffa/utils/Models.kt index a815d89..beb23f7 100644 --- a/app/src/main/java/org/funkwhale/ffa/utils/Models.kt +++ b/app/src/main/java/audio/funkwhale/ffa/utils/Models.kt @@ -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 diff --git a/app/src/main/java/org/funkwhale/ffa/utils/Userinfo.kt b/app/src/main/java/audio/funkwhale/ffa/utils/Userinfo.kt similarity index 96% rename from app/src/main/java/org/funkwhale/ffa/utils/Userinfo.kt rename to app/src/main/java/audio/funkwhale/ffa/utils/Userinfo.kt index 3408eff..b865c88 100644 --- a/app/src/main/java/org/funkwhale/ffa/utils/Userinfo.kt +++ b/app/src/main/java/audio/funkwhale/ffa/utils/Userinfo.kt @@ -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 diff --git a/app/src/main/java/org/funkwhale/ffa/utils/Util.kt b/app/src/main/java/audio/funkwhale/ffa/utils/Util.kt similarity index 96% rename from app/src/main/java/org/funkwhale/ffa/utils/Util.kt rename to app/src/main/java/audio/funkwhale/ffa/utils/Util.kt index 67012e6..08664bf 100644 --- a/app/src/main/java/org/funkwhale/ffa/utils/Util.kt +++ b/app/src/main/java/audio/funkwhale/ffa/utils/Util.kt @@ -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 { diff --git a/app/src/main/java/org/funkwhale/ffa/views/DisableableFrameLayout.kt b/app/src/main/java/audio/funkwhale/ffa/views/DisableableFrameLayout.kt similarity index 95% rename from app/src/main/java/org/funkwhale/ffa/views/DisableableFrameLayout.kt rename to app/src/main/java/audio/funkwhale/ffa/views/DisableableFrameLayout.kt index dab718a..5f1137a 100644 --- a/app/src/main/java/org/funkwhale/ffa/views/DisableableFrameLayout.kt +++ b/app/src/main/java/audio/funkwhale/ffa/views/DisableableFrameLayout.kt @@ -1,4 +1,4 @@ -package org.funkwhale.ffa.views +package audio.funkwhale.ffa.views import android.content.Context import android.util.AttributeSet diff --git a/app/src/main/java/org/funkwhale/ffa/views/LoadingImageView.kt b/app/src/main/java/audio/funkwhale/ffa/views/LoadingImageView.kt similarity index 93% rename from app/src/main/java/org/funkwhale/ffa/views/LoadingImageView.kt rename to app/src/main/java/audio/funkwhale/ffa/views/LoadingImageView.kt index fc982f2..12436b5 100644 --- a/app/src/main/java/org/funkwhale/ffa/views/LoadingImageView.kt +++ b/app/src/main/java/audio/funkwhale/ffa/views/LoadingImageView.kt @@ -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? { diff --git a/app/src/main/java/org/funkwhale/ffa/views/NowPlayingView.kt b/app/src/main/java/audio/funkwhale/ffa/views/NowPlayingView.kt similarity index 99% rename from app/src/main/java/org/funkwhale/ffa/views/NowPlayingView.kt rename to app/src/main/java/audio/funkwhale/ffa/views/NowPlayingView.kt index 87fbbdd..7337eae 100644 --- a/app/src/main/java/org/funkwhale/ffa/views/NowPlayingView.kt +++ b/app/src/main/java/audio/funkwhale/ffa/views/NowPlayingView.kt @@ -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 diff --git a/app/src/main/java/org/funkwhale/ffa/views/SquareImageView.kt b/app/src/main/java/audio/funkwhale/ffa/views/SquareImageView.kt similarity index 94% rename from app/src/main/java/org/funkwhale/ffa/views/SquareImageView.kt rename to app/src/main/java/audio/funkwhale/ffa/views/SquareImageView.kt index 396cccd..586131a 100644 --- a/app/src/main/java/org/funkwhale/ffa/views/SquareImageView.kt +++ b/app/src/main/java/audio/funkwhale/ffa/views/SquareImageView.kt @@ -1,4 +1,4 @@ -package org.funkwhale.ffa.views +package audio.funkwhale.ffa.views import android.content.Context import android.util.AttributeSet diff --git a/app/src/main/res/layout-land/activity_main.xml b/app/src/main/res/layout-land/activity_main.xml index 085ca5c..4f95463 100644 --- a/app/src/main/res/layout-land/activity_main.xml +++ b/app/src/main/res/layout-land/activity_main.xml @@ -29,7 +29,7 @@ - - + - - - - - - - - + - - - - - - - - - - - - - - - -