Merge pull request #5858 from ByteHamster/decouple-discovery
Move feed discovery backends to their own module
This commit is contained in:
commit
7e9bf1c0a7
|
@ -26,14 +26,6 @@ android {
|
|||
}
|
||||
buildConfigField "String", "COMMIT_HASH", ('"' + (commit.isEmpty() ? "Unknown commit" : commit) + '"')
|
||||
|
||||
if (project.hasProperty("podcastindexApiKey")) {
|
||||
buildConfigField "String", "PODCASTINDEX_API_KEY", '"' + podcastindexApiKey + '"'
|
||||
buildConfigField "String", "PODCASTINDEX_API_SECRET", '"' + podcastindexApiSecret + '"'
|
||||
} else {
|
||||
buildConfigField "String", "PODCASTINDEX_API_KEY", '"XTMMQGA2YZ4WJUBYY4HK"'
|
||||
buildConfigField "String", "PODCASTINDEX_API_SECRET", '"XAaAhk4^2YBsTE33vdbwbZNj82ZRLABDDqFdKe7x"'
|
||||
}
|
||||
|
||||
javaCompileOptions {
|
||||
annotationProcessorOptions {
|
||||
arguments = [eventBusIndex: 'de.danoeh.antennapod.ApEventBusIndex']
|
||||
|
@ -113,6 +105,7 @@ dependencies {
|
|||
implementation project(":core")
|
||||
implementation project(":event")
|
||||
implementation project(':model')
|
||||
implementation project(':net:discovery')
|
||||
implementation project(':net:sync:gpoddernet')
|
||||
implementation project(':net:sync:model')
|
||||
implementation project(':parser:feed')
|
||||
|
@ -157,7 +150,6 @@ dependencies {
|
|||
implementation 'com.github.shts:TriangleLabelView:1.1.2'
|
||||
implementation 'com.leinardi.android:speed-dial:3.2.0'
|
||||
implementation "com.github.AntennaPod:AntennaPod-AudioPlayer:$audioPlayerVersion"
|
||||
implementation 'com.github.mfietz:fyydlin:v0.5.0'
|
||||
implementation 'com.github.ByteHamster:SearchPreference:v2.0.0'
|
||||
implementation 'com.github.skydoves:balloon:1.4.0'
|
||||
implementation 'com.github.xabaras:RecyclerViewSwipeDecorator:1.3'
|
||||
|
|
|
@ -36,8 +36,6 @@ import de.danoeh.antennapod.core.service.download.DownloadService;
|
|||
import de.danoeh.antennapod.core.service.download.DownloadRequestCreator;
|
||||
import de.danoeh.antennapod.core.feed.FeedUrlNotFoundException;
|
||||
import de.danoeh.antennapod.core.util.DownloadErrorLabel;
|
||||
import de.danoeh.antennapod.discovery.CombinedSearcher;
|
||||
import de.danoeh.antennapod.discovery.PodcastSearchResult;
|
||||
import de.danoeh.antennapod.event.FeedListUpdateEvent;
|
||||
import de.danoeh.antennapod.event.PlayerStatusEvent;
|
||||
import de.danoeh.antennapod.core.glide.ApGlideSettings;
|
||||
|
@ -51,6 +49,9 @@ import de.danoeh.antennapod.core.service.download.HttpDownloader;
|
|||
import de.danoeh.antennapod.core.service.playback.PlaybackService;
|
||||
import de.danoeh.antennapod.core.storage.DBReader;
|
||||
import de.danoeh.antennapod.core.storage.DBWriter;
|
||||
import de.danoeh.antennapod.net.discovery.CombinedSearcher;
|
||||
import de.danoeh.antennapod.net.discovery.PodcastSearchResult;
|
||||
import de.danoeh.antennapod.net.discovery.PodcastSearcherRegistry;
|
||||
import de.danoeh.antennapod.parser.feed.FeedHandler;
|
||||
import de.danoeh.antennapod.parser.feed.FeedHandlerResult;
|
||||
import de.danoeh.antennapod.model.download.DownloadError;
|
||||
|
@ -61,7 +62,6 @@ import de.danoeh.antennapod.core.util.syndication.FeedDiscoverer;
|
|||
import de.danoeh.antennapod.core.util.syndication.HtmlToPlainText;
|
||||
import de.danoeh.antennapod.databinding.OnlinefeedviewActivityBinding;
|
||||
import de.danoeh.antennapod.dialog.AuthenticationDialog;
|
||||
import de.danoeh.antennapod.discovery.PodcastSearcherRegistry;
|
||||
import de.danoeh.antennapod.model.feed.Feed;
|
||||
import de.danoeh.antennapod.model.feed.FeedPreferences;
|
||||
import de.danoeh.antennapod.model.playback.RemoteMedia;
|
||||
|
|
|
@ -8,7 +8,7 @@ import com.bumptech.glide.Glide;
|
|||
import com.bumptech.glide.request.RequestOptions;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.activity.MainActivity;
|
||||
import de.danoeh.antennapod.discovery.PodcastSearchResult;
|
||||
import de.danoeh.antennapod.net.discovery.PodcastSearchResult;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.ArrayList;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package de.danoeh.antennapod.adapter.itunes;
|
||||
|
||||
import android.content.Context;
|
||||
import android.widget.ArrayAdapter;
|
||||
import androidx.annotation.NonNull;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
|
@ -14,12 +14,12 @@ import com.bumptech.glide.load.engine.DiskCacheStrategy;
|
|||
import com.bumptech.glide.load.resource.bitmap.FitCenter;
|
||||
import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import de.danoeh.antennapod.discovery.PodcastSearchResult;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.activity.MainActivity;
|
||||
import de.danoeh.antennapod.net.discovery.PodcastSearchResult;
|
||||
|
||||
public class ItunesAdapter extends ArrayAdapter<PodcastSearchResult> {
|
||||
/**
|
||||
|
|
|
@ -35,11 +35,11 @@ import de.danoeh.antennapod.core.storage.DBTasks;
|
|||
import de.danoeh.antennapod.model.feed.SortOrder;
|
||||
import de.danoeh.antennapod.databinding.AddfeedBinding;
|
||||
import de.danoeh.antennapod.databinding.EditTextDialogBinding;
|
||||
import de.danoeh.antennapod.discovery.CombinedSearcher;
|
||||
import de.danoeh.antennapod.discovery.FyydPodcastSearcher;
|
||||
import de.danoeh.antennapod.discovery.ItunesPodcastSearcher;
|
||||
import de.danoeh.antennapod.discovery.PodcastIndexPodcastSearcher;
|
||||
import de.danoeh.antennapod.fragment.gpodnet.GpodnetMainFragment;
|
||||
import de.danoeh.antennapod.net.discovery.CombinedSearcher;
|
||||
import de.danoeh.antennapod.net.discovery.FyydPodcastSearcher;
|
||||
import de.danoeh.antennapod.net.discovery.ItunesPodcastSearcher;
|
||||
import de.danoeh.antennapod.net.discovery.PodcastIndexPodcastSearcher;
|
||||
import io.reactivex.Observable;
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
|
|
|
@ -18,14 +18,14 @@ import androidx.annotation.NonNull;
|
|||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import de.danoeh.antennapod.net.discovery.ItunesTopListLoader;
|
||||
import de.danoeh.antennapod.net.discovery.PodcastSearchResult;
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.activity.OnlineFeedViewActivity;
|
||||
import de.danoeh.antennapod.adapter.itunes.ItunesAdapter;
|
||||
import de.danoeh.antennapod.event.DiscoveryDefaultUpdateEvent;
|
||||
import de.danoeh.antennapod.discovery.ItunesTopListLoader;
|
||||
import de.danoeh.antennapod.discovery.PodcastSearchResult;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
|
|
@ -23,9 +23,9 @@ import de.danoeh.antennapod.R;
|
|||
import de.danoeh.antennapod.activity.MainActivity;
|
||||
import de.danoeh.antennapod.activity.OnlineFeedViewActivity;
|
||||
import de.danoeh.antennapod.adapter.itunes.ItunesAdapter;
|
||||
import de.danoeh.antennapod.discovery.PodcastSearchResult;
|
||||
import de.danoeh.antennapod.discovery.PodcastSearcher;
|
||||
import de.danoeh.antennapod.discovery.PodcastSearcherRegistry;
|
||||
import de.danoeh.antennapod.net.discovery.PodcastSearchResult;
|
||||
import de.danoeh.antennapod.net.discovery.PodcastSearcher;
|
||||
import de.danoeh.antennapod.net.discovery.PodcastSearcherRegistry;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
|
|
@ -17,6 +17,8 @@ import android.widget.LinearLayout;
|
|||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
import de.danoeh.antennapod.net.discovery.ItunesTopListLoader;
|
||||
import de.danoeh.antennapod.net.discovery.PodcastSearchResult;
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
@ -26,8 +28,6 @@ import de.danoeh.antennapod.activity.MainActivity;
|
|||
import de.danoeh.antennapod.activity.OnlineFeedViewActivity;
|
||||
import de.danoeh.antennapod.adapter.FeedDiscoverAdapter;
|
||||
import de.danoeh.antennapod.event.DiscoveryDefaultUpdateEvent;
|
||||
import de.danoeh.antennapod.discovery.ItunesTopListLoader;
|
||||
import de.danoeh.antennapod.discovery.PodcastSearchResult;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
|
|
@ -19,8 +19,8 @@ import com.google.android.material.tabs.TabLayoutMediator;
|
|||
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.activity.MainActivity;
|
||||
import de.danoeh.antennapod.discovery.GpodnetPodcastSearcher;
|
||||
import de.danoeh.antennapod.fragment.OnlineSearchFragment;
|
||||
import de.danoeh.antennapod.net.discovery.GpodnetPodcastSearcher;
|
||||
|
||||
/**
|
||||
* Main navigation hub for gpodder.net podcast directory
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
# :net:discovery
|
||||
|
||||
This module contains the podcast search/discovery APIs.
|
|
@ -0,0 +1,37 @@
|
|||
plugins {
|
||||
id("com.android.library")
|
||||
}
|
||||
apply from: "../../common.gradle"
|
||||
apply from: "../../playFlavor.gradle"
|
||||
|
||||
android {
|
||||
defaultConfig {
|
||||
if (project.hasProperty("podcastindexApiKey")) {
|
||||
buildConfigField "String", "PODCASTINDEX_API_KEY", '"' + podcastindexApiKey + '"'
|
||||
buildConfigField "String", "PODCASTINDEX_API_SECRET", '"' + podcastindexApiSecret + '"'
|
||||
} else {
|
||||
buildConfigField "String", "PODCASTINDEX_API_KEY", '"XTMMQGA2YZ4WJUBYY4HK"'
|
||||
buildConfigField "String", "PODCASTINDEX_API_SECRET", '"XAaAhk4^2YBsTE33vdbwbZNj82ZRLABDDqFdKe7x"'
|
||||
}
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
disable 'InvalidPeriodicWorkRequestInterval', 'MissingPermission',
|
||||
'GradleCompatible', 'AppCompatResource', 'QueryPermissionsNeeded'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation project(':core')
|
||||
implementation project(':model')
|
||||
implementation project(':net:sync:gpoddernet')
|
||||
implementation project(':net:sync:model')
|
||||
|
||||
annotationProcessor "androidx.annotation:annotation:$annotationVersion"
|
||||
|
||||
implementation 'com.github.mfietz:fyydlin:v0.5.0'
|
||||
|
||||
implementation "io.reactivex.rxjava2:rxandroid:$rxAndroidVersion"
|
||||
implementation "io.reactivex.rxjava2:rxjava:$rxJavaVersion"
|
||||
implementation "com.squareup.okhttp3:okhttp:$okhttpVersion"
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
<manifest package="de.danoeh.antennapod.net.discovery" />
|
|
@ -1,4 +1,4 @@
|
|||
package de.danoeh.antennapod.discovery;
|
||||
package de.danoeh.antennapod.net.discovery;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
|
@ -1,4 +1,4 @@
|
|||
package de.danoeh.antennapod.discovery;
|
||||
package de.danoeh.antennapod.net.discovery;
|
||||
|
||||
import de.danoeh.antennapod.core.service.download.AntennapodHttpClient;
|
||||
import de.mfietz.fyydlin.FyydClient;
|
|
@ -1,4 +1,4 @@
|
|||
package de.danoeh.antennapod.discovery;
|
||||
package de.danoeh.antennapod.net.discovery;
|
||||
|
||||
import de.danoeh.antennapod.core.sync.SynchronizationCredentials;
|
||||
import de.danoeh.antennapod.core.service.download.AntennapodHttpClient;
|
|
@ -1,4 +1,4 @@
|
|||
package de.danoeh.antennapod.discovery;
|
||||
package de.danoeh.antennapod.net.discovery;
|
||||
|
||||
import de.danoeh.antennapod.core.feed.FeedUrlNotFoundException;
|
||||
import de.danoeh.antennapod.core.service.download.AntennapodHttpClient;
|
|
@ -1,9 +1,8 @@
|
|||
package de.danoeh.antennapod.discovery;
|
||||
package de.danoeh.antennapod.net.discovery;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.core.service.download.AntennapodHttpClient;
|
||||
import io.reactivex.Single;
|
||||
import io.reactivex.SingleOnSubscribe;
|
|
@ -1,4 +1,4 @@
|
|||
package de.danoeh.antennapod.discovery;
|
||||
package de.danoeh.antennapod.net.discovery;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
|
@ -15,7 +15,7 @@ import java.util.List;
|
|||
import java.util.Locale;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import de.danoeh.antennapod.BuildConfig;
|
||||
import de.danoeh.antennapod.net.discovery.BuildConfig;
|
||||
import de.danoeh.antennapod.core.ClientConfig;
|
||||
import de.danoeh.antennapod.core.service.download.AntennapodHttpClient;
|
||||
import io.reactivex.Single;
|
|
@ -1,4 +1,4 @@
|
|||
package de.danoeh.antennapod.discovery;
|
||||
package de.danoeh.antennapod.net.discovery;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import de.danoeh.antennapod.net.sync.gpoddernet.model.GpodnetPodcast;
|
|
@ -1,4 +1,4 @@
|
|||
package de.danoeh.antennapod.discovery;
|
||||
package de.danoeh.antennapod.net.discovery;
|
||||
|
||||
import io.reactivex.Single;
|
||||
import java.util.List;
|
|
@ -1,5 +1,4 @@
|
|||
package de.danoeh.antennapod.discovery;
|
||||
|
||||
package de.danoeh.antennapod.net.discovery;
|
||||
|
||||
import io.reactivex.Single;
|
||||
|
|
@ -3,6 +3,7 @@ include ':core'
|
|||
include ':event'
|
||||
include ':model'
|
||||
|
||||
include ':net:discovery'
|
||||
include ':net:ssl'
|
||||
include ':net:sync:gpoddernet'
|
||||
include ':net:sync:model'
|
||||
|
|
Loading…
Reference in New Issue