diff --git a/src/de/filmpalast/AndroidManifest.xml b/src/de/filmpalast/AndroidManifest.xml new file mode 100644 index 000000000..acb4de356 --- /dev/null +++ b/src/de/filmpalast/AndroidManifest.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/src/de/filmpalast/build.gradle b/src/de/filmpalast/build.gradle new file mode 100644 index 000000000..f3c071a30 --- /dev/null +++ b/src/de/filmpalast/build.gradle @@ -0,0 +1,13 @@ +apply plugin: 'com.android.application' +apply plugin: 'kotlin-android' +apply plugin: 'kotlinx-serialization' + +ext { + extName = 'FilmPalast' + pkgNameSuffix = 'de.filmpalast' + extClass = '.FilmPalast' + extVersionCode = 1 + libVersion = '12' +} + +apply from: "$rootDir/common.gradle" diff --git a/src/de/filmpalast/res/mipmap-hdpi/ic_launcher.png b/src/de/filmpalast/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..e199a13c3 Binary files /dev/null and b/src/de/filmpalast/res/mipmap-hdpi/ic_launcher.png differ diff --git a/src/de/filmpalast/res/mipmap-hdpi/ic_launcher_adaptive_back.png b/src/de/filmpalast/res/mipmap-hdpi/ic_launcher_adaptive_back.png new file mode 100644 index 000000000..8dc560dd4 Binary files /dev/null and b/src/de/filmpalast/res/mipmap-hdpi/ic_launcher_adaptive_back.png differ diff --git a/src/de/filmpalast/res/mipmap-hdpi/ic_launcher_adaptive_fore.png b/src/de/filmpalast/res/mipmap-hdpi/ic_launcher_adaptive_fore.png new file mode 100644 index 000000000..4c5d378f1 Binary files /dev/null and b/src/de/filmpalast/res/mipmap-hdpi/ic_launcher_adaptive_fore.png differ diff --git a/src/de/filmpalast/res/mipmap-mdpi/ic_launcher.png b/src/de/filmpalast/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..489936412 Binary files /dev/null and b/src/de/filmpalast/res/mipmap-mdpi/ic_launcher.png differ diff --git a/src/de/filmpalast/res/mipmap-mdpi/ic_launcher_adaptive_back.png b/src/de/filmpalast/res/mipmap-mdpi/ic_launcher_adaptive_back.png new file mode 100644 index 000000000..f8feb6e59 Binary files /dev/null and b/src/de/filmpalast/res/mipmap-mdpi/ic_launcher_adaptive_back.png differ diff --git a/src/de/filmpalast/res/mipmap-mdpi/ic_launcher_adaptive_fore.png b/src/de/filmpalast/res/mipmap-mdpi/ic_launcher_adaptive_fore.png new file mode 100644 index 000000000..095e31f43 Binary files /dev/null and b/src/de/filmpalast/res/mipmap-mdpi/ic_launcher_adaptive_fore.png differ diff --git a/src/de/filmpalast/res/mipmap-xhdpi/ic_launcher.png b/src/de/filmpalast/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..fc0039d64 Binary files /dev/null and b/src/de/filmpalast/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/src/de/filmpalast/res/mipmap-xhdpi/ic_launcher_adaptive_back.png b/src/de/filmpalast/res/mipmap-xhdpi/ic_launcher_adaptive_back.png new file mode 100644 index 000000000..1b560124d Binary files /dev/null and b/src/de/filmpalast/res/mipmap-xhdpi/ic_launcher_adaptive_back.png differ diff --git a/src/de/filmpalast/res/mipmap-xhdpi/ic_launcher_adaptive_fore.png b/src/de/filmpalast/res/mipmap-xhdpi/ic_launcher_adaptive_fore.png new file mode 100644 index 000000000..8787a0af0 Binary files /dev/null and b/src/de/filmpalast/res/mipmap-xhdpi/ic_launcher_adaptive_fore.png differ diff --git a/src/de/filmpalast/res/mipmap-xxhdpi/ic_launcher.png b/src/de/filmpalast/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..3a560178a Binary files /dev/null and b/src/de/filmpalast/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/src/de/filmpalast/res/mipmap-xxhdpi/ic_launcher_adaptive_back.png b/src/de/filmpalast/res/mipmap-xxhdpi/ic_launcher_adaptive_back.png new file mode 100644 index 000000000..369383ac8 Binary files /dev/null and b/src/de/filmpalast/res/mipmap-xxhdpi/ic_launcher_adaptive_back.png differ diff --git a/src/de/filmpalast/res/mipmap-xxhdpi/ic_launcher_adaptive_fore.png b/src/de/filmpalast/res/mipmap-xxhdpi/ic_launcher_adaptive_fore.png new file mode 100644 index 000000000..6da85ba06 Binary files /dev/null and b/src/de/filmpalast/res/mipmap-xxhdpi/ic_launcher_adaptive_fore.png differ diff --git a/src/de/filmpalast/res/mipmap-xxxhdpi/ic_launcher.png b/src/de/filmpalast/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..6929c1ab8 Binary files /dev/null and b/src/de/filmpalast/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/src/de/filmpalast/res/mipmap-xxxhdpi/ic_launcher_adaptive_back.png b/src/de/filmpalast/res/mipmap-xxxhdpi/ic_launcher_adaptive_back.png new file mode 100644 index 000000000..de26e98f5 Binary files /dev/null and b/src/de/filmpalast/res/mipmap-xxxhdpi/ic_launcher_adaptive_back.png differ diff --git a/src/de/filmpalast/res/mipmap-xxxhdpi/ic_launcher_adaptive_fore.png b/src/de/filmpalast/res/mipmap-xxxhdpi/ic_launcher_adaptive_fore.png new file mode 100644 index 000000000..36f49fd3b Binary files /dev/null and b/src/de/filmpalast/res/mipmap-xxxhdpi/ic_launcher_adaptive_fore.png differ diff --git a/src/de/filmpalast/src/eu/kanade/tachiyomi/animeextension/de/filmpalast/FilmPalast.kt b/src/de/filmpalast/src/eu/kanade/tachiyomi/animeextension/de/filmpalast/FilmPalast.kt new file mode 100644 index 000000000..9ec3dd746 --- /dev/null +++ b/src/de/filmpalast/src/eu/kanade/tachiyomi/animeextension/de/filmpalast/FilmPalast.kt @@ -0,0 +1,194 @@ +package eu.kanade.tachiyomi.animeextension.de.filmpalast + +import android.app.Application +import android.content.SharedPreferences +import androidx.preference.ListPreference +import androidx.preference.MultiSelectListPreference +import androidx.preference.PreferenceScreen +import eu.kanade.tachiyomi.animeextension.de.filmpalast.extractors.VoeExtractor +import eu.kanade.tachiyomi.animesource.ConfigurableAnimeSource +import eu.kanade.tachiyomi.animesource.model.AnimeFilterList +import eu.kanade.tachiyomi.animesource.model.SAnime +import eu.kanade.tachiyomi.animesource.model.SEpisode +import eu.kanade.tachiyomi.animesource.model.Video +import eu.kanade.tachiyomi.animesource.online.ParsedAnimeHttpSource +import eu.kanade.tachiyomi.network.GET +import eu.kanade.tachiyomi.util.asJsoup +import okhttp3.OkHttpClient +import okhttp3.Request +import okhttp3.Response +import org.jsoup.nodes.Document +import org.jsoup.nodes.Element +import uy.kohesive.injekt.Injekt +import uy.kohesive.injekt.api.get +import java.lang.Exception + +class FilmPalast : ConfigurableAnimeSource, ParsedAnimeHttpSource() { + + override val name = "FilmPalast" + + override val baseUrl = "https://filmpalast.to" + + override val lang = "de" + + override val supportsLatest = true + + override val client: OkHttpClient = network.cloudflareClient + + private val preferences: SharedPreferences by lazy { + Injekt.get().getSharedPreferences("source_$id", 0x0000) + } + + override fun popularAnimeSelector(): String = "article.liste > a" + + override fun popularAnimeRequest(page: Int): Request = GET("$baseUrl/movies/top/page/$page") + + override fun popularAnimeFromElement(element: Element): SAnime { + val anime = SAnime.create() + anime.setUrlWithoutDomain(element.attr("href")) + val file = element.select("img").attr("src") + anime.thumbnail_url = "$baseUrl$file" + anime.title = element.attr("title") + return anime + } + + override fun popularAnimeNextPageSelector(): String = "a.pageing:contains(vorwärts)" + + // episodes + + override fun episodeListSelector() = throw Exception("not used") + + override fun episodeListParse(response: Response): List { + val document = response.asJsoup() + val episodeList = mutableListOf() + val episode = SEpisode.create() + episode.name = document.select("h2.bgDark").text() + episode.episode_number = 1F + episode.setUrlWithoutDomain(document.select("link[rel=canonical]").attr("href")) + episodeList.add(episode) + return episodeList.reversed() + } + + override fun episodeFromElement(element: Element): SEpisode = throw Exception("not used") + + // Video Extractor + + override fun videoListParse(response: Response): List