From 0833ec3460058b049714a0fac4fc2654dc9d0e20 Mon Sep 17 00:00:00 2001 From: Benojir Sultana <124562791+Benojir@users.noreply.github.com> Date: Tue, 10 Sep 2024 00:32:42 +0530 Subject: [PATCH] modified --- .idea/deploymentTargetSelector.xml | 8 + app/build.gradle | 2 +- app/src/main/AndroidManifest.xml | 47 ++--- .../fogplix/tv/activities/MainActivity.java | 122 ++++--------- .../tv/activities/SettingsActivity.java | 39 ++++ .../tv/adapters/EpisodesButtonsAdapter.java | 9 +- .../fogplix/tv/adapters/ItemsListAdapter.java | 10 +- .../tv/fragments/RecentUploadsFragment.java | 10 +- .../java/com/fogplix/tv/helpers/Scraper.java | 73 ++++++-- .../com/fogplix/tv/helpers/ViewDialog.java | 157 ---------------- app/src/main/res/drawable/action_bar_logo.png | Bin 8057 -> 5017 bytes app/src/main/res/drawable/button_default.xml | 9 + app/src/main/res/drawable/button_focused.xml | 21 +++ .../round_transparent_ripple_button.xml | 13 ++ app/src/main/res/layout/activity_main.xml | 168 ++++++++---------- app/src/main/res/layout/own_toolbar.xml | 20 ++- .../res/layout/sample_item_card_design.xml | 2 +- app/src/main/res/layout/settings_activity.xml | 47 +++++ .../main/res/menu/top_right_popup_menu.xml | 4 + app/src/main/res/values/arrays.xml | 12 ++ app/src/main/res/values/strings.xml | 36 ++-- app/src/main/res/xml/root_preferences.xml | 21 +++ 22 files changed, 418 insertions(+), 412 deletions(-) create mode 100644 app/src/main/java/com/fogplix/tv/activities/SettingsActivity.java create mode 100644 app/src/main/res/drawable/button_default.xml create mode 100644 app/src/main/res/drawable/button_focused.xml create mode 100644 app/src/main/res/drawable/round_transparent_ripple_button.xml create mode 100644 app/src/main/res/layout/settings_activity.xml create mode 100644 app/src/main/res/values/arrays.xml create mode 100644 app/src/main/res/xml/root_preferences.xml diff --git a/.idea/deploymentTargetSelector.xml b/.idea/deploymentTargetSelector.xml index b268ef3..dd1eb1c 100644 --- a/.idea/deploymentTargetSelector.xml +++ b/.idea/deploymentTargetSelector.xml @@ -4,6 +4,14 @@ diff --git a/app/build.gradle b/app/build.gradle index 1370597..bcdb8b6 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -34,10 +34,10 @@ android { } dependencies { - implementation 'androidx.appcompat:appcompat:1.7.0' implementation 'com.google.android.material:material:1.12.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' + implementation 'androidx.preference:preference:1.2.1' testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.2.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 1e93a5b..bd1366a 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -13,10 +13,12 @@ android:name="android.hardware.touchscreen" android:required="false" /> - + - + @@ -30,22 +32,26 @@ + tools:targetApi="31"> + + android:name=".activities.FavoriteActivity" + android:configChanges="orientation|uiMode|screenSize|keyboardHidden" + android:exported="true"> + android:name=".activities.GenreViewActivity" + android:configChanges="orientation|uiMode|screenSize|keyboardHidden" + android:exported="false"> - + android:screenOrientation="sensorLandscape"> @@ -110,8 +115,8 @@ - - diff --git a/app/src/main/java/com/fogplix/tv/activities/MainActivity.java b/app/src/main/java/com/fogplix/tv/activities/MainActivity.java index ca94713..3501a2c 100644 --- a/app/src/main/java/com/fogplix/tv/activities/MainActivity.java +++ b/app/src/main/java/com/fogplix/tv/activities/MainActivity.java @@ -1,12 +1,9 @@ package com.fogplix.tv.activities; -import android.annotation.SuppressLint; import android.content.Intent; import android.graphics.PorterDuff; -import android.net.Uri; import android.os.Bundle; import android.os.Handler; -import android.os.Looper; import android.view.View; import android.widget.ImageButton; import android.widget.PopupMenu; @@ -17,8 +14,6 @@ import androidx.appcompat.app.AppCompatDelegate; import androidx.appcompat.content.res.AppCompatResources; import androidx.core.splashscreen.SplashScreen; -import androidx.core.view.GravityCompat; -import androidx.drawerlayout.widget.DrawerLayout; import androidx.fragment.app.FragmentManager; import androidx.viewpager2.widget.ViewPager2; @@ -26,23 +21,17 @@ import com.fogplix.tv.R; import com.fogplix.tv.adapters.FragmentAdapter; import com.fogplix.tv.helpers.CustomMethods; -import com.google.android.material.navigation.NavigationView; -import com.google.android.material.snackbar.Snackbar; import com.google.android.material.tabs.TabLayout; import java.util.Objects; public class MainActivity extends AppCompatActivity { - private DrawerLayout drawerLayout; private ViewPager2 viewPager2; private TabLayout tabLayout; private TextView importantNoticeTV; - private NavigationView navigationView; private boolean keepSplashScreen = true; - private boolean doubleBackPressed = false; - @SuppressLint("SetTextI18n") @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -61,35 +50,55 @@ protected void onCreate(Bundle savedInstanceState) { View ownToolbar = findViewById(R.id.ownToolbar); - ImageButton navLeftBtn = ownToolbar.findViewById(R.id.navbarLeftBtn); + ImageButton favoritePageBtn = ownToolbar.findViewById(R.id.navbarLeftBtn); + ImageButton searchBtn = ownToolbar.findViewById(R.id.navbarRightBtn); + ImageButton navInfoBtn = ownToolbar.findViewById(R.id.navInfoBtn); - navLeftBtn.setImageDrawable(AppCompatResources.getDrawable(MainActivity.this, R.drawable.favorite_48)); - navLeftBtn.setOnClickListener(v -> startActivity(new Intent(MainActivity.this, FavoriteActivity.class))); + favoritePageBtn.setImageDrawable(AppCompatResources.getDrawable(MainActivity.this, R.drawable.favorite_48)); + favoritePageBtn.setOnClickListener(v -> startActivity(new Intent(MainActivity.this, FavoriteActivity.class))); + favoritePageBtn.setOnFocusChangeListener((v, hasFocus) -> { + if (hasFocus){ + favoritePageBtn.setBackgroundResource(R.drawable.button_focused); + } else { + favoritePageBtn.setBackgroundResource(R.drawable.button_default); + } + }); - ownToolbar.findViewById(R.id.navbarRightBtn).setOnClickListener(v -> startActivity(new Intent(MainActivity.this, SearchActivity.class))); + searchBtn.setOnClickListener(v -> startActivity(new Intent(MainActivity.this, SearchActivity.class))); + searchBtn.setOnFocusChangeListener((v, hasFocus) -> { + if (hasFocus){ + searchBtn.setBackgroundResource(R.drawable.button_focused); + } else { + searchBtn.setBackgroundResource(R.drawable.button_default); + } + }); - ImageButton navInfoBtn = ownToolbar.findViewById(R.id.navInfoBtn); navInfoBtn.setOnClickListener(v -> { - PopupMenu popupMenu = new PopupMenu(MainActivity.this, navInfoBtn); popupMenu.getMenuInflater().inflate(R.menu.top_right_popup_menu, popupMenu.getMenu()); - - // Set up the click listener for the menu items popupMenu.setOnMenuItemClickListener(item -> { - - if (item.getItemId() == R.id.show_version){ + if (item.getItemId() == R.id.open_settings){ + startActivity(new Intent(MainActivity.this, SettingsActivity.class)); + return true; + } else if (item.getItemId() == R.id.show_version){ Toast.makeText(this, BuildConfig.VERSION_NAME, Toast.LENGTH_SHORT).show(); return true; } else { return false; } }); - - // Show the popup menu popupMenu.show(); }); + navInfoBtn.setOnFocusChangeListener((v, hasFocus) -> { + if (hasFocus){ + navInfoBtn.setBackgroundResource(R.drawable.button_focused); + } else { + navInfoBtn.setBackgroundResource(R.drawable.button_default); + } + }); + //////////////////////////////////////////////////////////////////////////////////////////// CustomMethods.checkForUpdateOnStartApp(this); @@ -98,22 +107,11 @@ protected void onCreate(Bundle savedInstanceState) { if (!CustomMethods.isInternetOn(this)) { Toast.makeText(this, "No internet connection.", Toast.LENGTH_LONG).show(); - doubleBackPressed = true; - onBackPressed(); + finish(); } //////////////////////////////////////////////////////////////////////////////////////////// - View headView = navigationView.getHeaderView(0); - - ((TextView) headView.findViewById(R.id.header_layout_version_tv)).setText("Version: " + BuildConfig.VERSION_NAME); - - headView.findViewById(R.id.closeDrawerBtn).setOnClickListener(v -> drawerLayout.closeDrawers()); - - navigationViewItemClickedActions(navigationView); - - //////////////////////////////////////////////////////////////////////////////////////////// - FragmentManager fragmentManager = getSupportFragmentManager(); FragmentAdapter fragmentAdapter = new FragmentAdapter(fragmentManager, getLifecycle(), tabLayout.getTabCount()); viewPager2.setAdapter(fragmentAdapter); @@ -149,65 +147,11 @@ public void onPageSelected(int position) { }); } - -// ---------------------------------------------------------------------------------------------- - - private void navigationViewItemClickedActions(NavigationView navigationView) { - - navigationView.setNavigationItemSelectedListener(item -> { - - if (item.getItemId() == R.id.favorite_anime_menu_item) { - - startActivity(new Intent(getApplicationContext(), FavoriteActivity.class)); - - new Handler().postDelayed(() -> { - if (drawerLayout.isDrawerOpen(GravityCompat.START)) { - drawerLayout.closeDrawer(GravityCompat.START); - } - }, 500); - } else if (item.getItemId() == R.id.report_bug_action) { - startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.official_telegram_group)))); - } else if (item.getItemId() == R.id.share_action) { - Intent intent1 = new Intent(Intent.ACTION_SEND); - intent1.setType("text/plain"); - intent1.putExtra(Intent.EXTRA_TEXT, getResources().getString(R.string.app_sharing_message) + "\n" + getString(R.string.official_website)); - startActivity(Intent.createChooser(intent1, "Share via")); - } else if (item.getItemId() == R.id.more_apps_action) { - startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.more_apps)))); - } else if (item.getItemId() == R.id.visit_website) { - startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.official_website)))); - } else if (item.getItemId() == R.id.visit_telegram) { - startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.official_telegram_channel)))); - } - return false; - }); - } - -// ---------------------------------------------------------------------------------------------- - - @Override - public void onBackPressed() { - - if (drawerLayout.isDrawerOpen(GravityCompat.START)) { - drawerLayout.closeDrawer(GravityCompat.START); - } else { - if (doubleBackPressed) { - super.onBackPressed(); - } else { - this.doubleBackPressed = true; - Snackbar.make(drawerLayout, "Double press to exit!", Snackbar.LENGTH_LONG).show(); - - new Handler(Looper.getMainLooper()).postDelayed(() -> doubleBackPressed = false, 2000); - } - } - } // ---------------------------------------------------------------------------------------------- private void initVars() { - drawerLayout = findViewById(R.id.home_page_drawerlayout); viewPager2 = findViewById(R.id.fragmentContainerViewPager2Main); tabLayout = findViewById(R.id.tabLayout); - navigationView = findViewById(R.id.navigation_drawer); importantNoticeTV = findViewById(R.id.important_notice_tv); } } \ No newline at end of file diff --git a/app/src/main/java/com/fogplix/tv/activities/SettingsActivity.java b/app/src/main/java/com/fogplix/tv/activities/SettingsActivity.java new file mode 100644 index 0000000..b0794b0 --- /dev/null +++ b/app/src/main/java/com/fogplix/tv/activities/SettingsActivity.java @@ -0,0 +1,39 @@ +package com.fogplix.tv.activities; + +import android.os.Bundle; +import android.view.View; +import android.widget.ImageButton; + +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.app.AppCompatActivity; +import androidx.preference.PreferenceFragmentCompat; + +import com.fogplix.tv.R; + +public class SettingsActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.settings_activity); + if (savedInstanceState == null) { + getSupportFragmentManager() + .beginTransaction() + .replace(R.id.settings, new SettingsFragment()) + .commit(); + } + ActionBar actionBar = getSupportActionBar(); + if (actionBar != null) { + actionBar.setDisplayHomeAsUpEnabled(false); + } + + findViewById(R.id.backButton).setOnClickListener(v -> onBackPressed()); + } + + public static class SettingsFragment extends PreferenceFragmentCompat { + @Override + public void onCreatePreferences(Bundle savedInstanceState, String rootKey) { + setPreferencesFromResource(R.xml.root_preferences, rootKey); + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/fogplix/tv/adapters/EpisodesButtonsAdapter.java b/app/src/main/java/com/fogplix/tv/adapters/EpisodesButtonsAdapter.java index e32a6a4..61afa9d 100644 --- a/app/src/main/java/com/fogplix/tv/adapters/EpisodesButtonsAdapter.java +++ b/app/src/main/java/com/fogplix/tv/adapters/EpisodesButtonsAdapter.java @@ -2,6 +2,7 @@ import android.app.Activity; import android.content.Context; +import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -64,11 +65,11 @@ public void onBindViewHolder(@NonNull MyCustomViewHolder holder, int position) { holder.episodeButton.setBackgroundColor(context.getColor(R.color.black)); } - holder.episodeButton.setOnFocusChangeListener((view, b) -> { + holder.episodeButton.setOnFocusChangeListener((view, hasFocus) -> { - if (b){ + if (hasFocus){ holder.episodeButton.setTextColor(context.getColor(R.color.white)); - holder.episodeButton.setBackgroundColor(context.getColor(R.color.orange)); + holder.episodeButton.setBackgroundColor(context.getColor(R.color.red)); } else { if (episodeId.equals(databaseHandler.getLastWatchedEpisodeId(animeId))){ holder.episodeButton.setTextColor(context.getColor(R.color.white)); @@ -81,7 +82,7 @@ public void onBindViewHolder(@NonNull MyCustomViewHolder holder, int position) { }); } catch (Exception e) { - e.printStackTrace(); + Log.e("MADARA", "onBindViewHolder: ", e); } } diff --git a/app/src/main/java/com/fogplix/tv/adapters/ItemsListAdapter.java b/app/src/main/java/com/fogplix/tv/adapters/ItemsListAdapter.java index c5ca0c6..038eb85 100644 --- a/app/src/main/java/com/fogplix/tv/adapters/ItemsListAdapter.java +++ b/app/src/main/java/com/fogplix/tv/adapters/ItemsListAdapter.java @@ -3,6 +3,7 @@ import android.annotation.SuppressLint; import android.app.Activity; import android.content.Intent; +import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -33,6 +34,7 @@ public class ItemsListAdapter extends RecyclerView.Adapter { + private static final String TAG = "MADARA"; private final JSONArray allAnime; private final Activity activity; @@ -92,7 +94,7 @@ public void onBindViewHolder(@NonNull MyCustomViewHolder holder, int position) { holder.releaseDateTV.setText(allAnime.getJSONObject(holder.getBindingAdapterPosition()).getString("releasedDate")); } } catch (Exception e) { - e.printStackTrace(); + Log.e(TAG, "onBindViewHolder: ", e); Toast.makeText(activity, "JSON Error", Toast.LENGTH_SHORT).show(); CustomMethods.errorAlert(activity, "Error", e.getMessage(), "Ok", true); } @@ -128,7 +130,7 @@ public void onBindViewHolder(@NonNull MyCustomViewHolder holder, int position) { intent.putExtra("episodeId", allAnime.getJSONObject(holder.getBindingAdapterPosition()).getString("episodeId")); activity.startActivity(intent); } catch (Exception e) { - e.printStackTrace(); + Log.e(TAG, "onBindViewHolder: ", e); Toast.makeText(activity, e.getMessage(), Toast.LENGTH_SHORT).show(); } }); @@ -211,7 +213,7 @@ public void onBindViewHolder(@NonNull MyCustomViewHolder holder, int position) { bottomSheetDialog.show(); } } catch (Exception e) { - e.printStackTrace(); + Log.e(TAG, "onBindViewHolder: ", e); } return true; }); @@ -231,7 +233,7 @@ public long getItemId(int position) { // Return a unique and stable ID for the item. return item.getLong("id"); } catch (JSONException e) { - e.printStackTrace(); + Log.e(TAG, "onBindViewHolder: ", e); return RecyclerView.NO_ID; } } diff --git a/app/src/main/java/com/fogplix/tv/fragments/RecentUploadsFragment.java b/app/src/main/java/com/fogplix/tv/fragments/RecentUploadsFragment.java index b1dfae7..fa8dfeb 100644 --- a/app/src/main/java/com/fogplix/tv/fragments/RecentUploadsFragment.java +++ b/app/src/main/java/com/fogplix/tv/fragments/RecentUploadsFragment.java @@ -3,6 +3,7 @@ import android.app.Activity; import android.content.res.Configuration; import android.os.Bundle; +import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -22,6 +23,7 @@ import org.json.JSONArray; public class RecentUploadsFragment extends Fragment { + private static final String TAG = "MADARA"; private FragmentRecentUploadsBinding binding; private Activity activity; private GridLayoutManager layoutManager; @@ -75,9 +77,9 @@ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, binding = FragmentRecentUploadsBinding.inflate(inflater, container, false); - binding.loadMoreAnimeBtn.setOnFocusChangeListener((view, b) -> { - if (b){ - binding.loadMoreAnimeBtn.setBackgroundColor(activity.getColor(R.color.orange)); + binding.loadMoreAnimeBtn.setOnFocusChangeListener((view, hasFocus) -> { + if (hasFocus){ + binding.loadMoreAnimeBtn.setBackgroundColor(activity.getColor(R.color.red)); } else { binding.loadMoreAnimeBtn.setBackgroundColor(activity.getColor(R.color.fade_blue)); } @@ -137,7 +139,7 @@ public void onScrapeComplete(JSONArray resultAnime) { } } catch (Exception e){ - e.printStackTrace(); + Log.e(TAG, "onScrapeComplete: ", e); CustomMethods.errorAlert(activity, "Json Error", e.getMessage(), "OK", true); } } diff --git a/app/src/main/java/com/fogplix/tv/helpers/Scraper.java b/app/src/main/java/com/fogplix/tv/helpers/Scraper.java index 34f5a23..dced549 100644 --- a/app/src/main/java/com/fogplix/tv/helpers/Scraper.java +++ b/app/src/main/java/com/fogplix/tv/helpers/Scraper.java @@ -1,10 +1,13 @@ package com.fogplix.tv.helpers; import android.app.Activity; +import android.content.SharedPreferences; import android.os.Handler; import android.os.Looper; import android.util.Log; +import androidx.preference.PreferenceManager; + import com.fogplix.tv.R; import com.fogplix.tv.callbacks.AnimeScraperCallback; import com.fogplix.tv.callbacks.DetailsScraperCallback; @@ -18,6 +21,8 @@ import org.jsoup.nodes.Element; import org.jsoup.select.Elements; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; import java.util.Objects; public class Scraper { @@ -26,20 +31,32 @@ public class Scraper { private RecentScraperCallback recentScraperCallback = null; private DetailsScraperCallback detailsScraperCallback = null; private AnimeScraperCallback animeScraperCallback = null; + private final SharedPreferences sharedPreferences; + private final boolean isProxyEnabled; + private final String proxyBrowserLink; public Scraper(Activity activity, RecentScraperCallback recentScraperCallback) { this.activity = activity; this.recentScraperCallback = recentScraperCallback; + sharedPreferences = PreferenceManager.getDefaultSharedPreferences(activity); + isProxyEnabled = sharedPreferences.getBoolean("use_proxy", false); + proxyBrowserLink = activity.getString(R.string.proxy_browser_link); } public Scraper(Activity activity, DetailsScraperCallback detailsScraperCallback) { this.activity = activity; this.detailsScraperCallback = detailsScraperCallback; + sharedPreferences = PreferenceManager.getDefaultSharedPreferences(activity); + isProxyEnabled = sharedPreferences.getBoolean("use_proxy", false); + proxyBrowserLink = activity.getString(R.string.proxy_browser_link); } public Scraper(Activity activity, AnimeScraperCallback animeScraperCallback) { this.activity = activity; this.animeScraperCallback = animeScraperCallback; + sharedPreferences = PreferenceManager.getDefaultSharedPreferences(activity); + isProxyEnabled = sharedPreferences.getBoolean("use_proxy", false); + proxyBrowserLink = activity.getString(R.string.proxy_browser_link); } public void scrapeRecent(int page, int type) { @@ -79,10 +96,10 @@ public void scrapeRecent(int page, int type) { animeImg = Objects.requireNonNull(allListTag.select("img").first()).attr("src").trim(); - if (document.getElementsByClass("ic-DUB").size() > 0) { + if (!document.getElementsByClass("ic-DUB").isEmpty()) { subOrDub = "DUB"; } - if (document.getElementsByClass("ic-SUB").size() > 0) { + if (!document.getElementsByClass("ic-SUB").isEmpty()) { subOrDub = "SUB"; } @@ -103,21 +120,27 @@ public void scrapeRecent(int page, int type) { new Handler(Looper.getMainLooper()).post(() -> recentScraperCallback.onScrapeComplete(allAnime)); } catch (Exception e) { - e.printStackTrace(); +// e.printStackTrace(); new Handler(Looper.getMainLooper()).post(() -> recentScraperCallback.onScrapeFailed(e.getMessage())); } }).start(); } - public void scrapeAnime(String url){ + public void scrapeAnime(String url) { new Thread(() -> { try { JSONArray allAnime = new JSONArray(); - Document document = Jsoup.connect(url) + String finalUrl = url; + + if (isProxyEnabled){ + finalUrl = proxyBrowserLink + URLEncoder.encode(finalUrl, "UTF-8"); + } + + Document document = Jsoup.connect(finalUrl) .userAgent(activity.getString(R.string.user_agent)) .get(); @@ -130,7 +153,7 @@ public void scrapeAnime(String url){ String animeRelease = liTag.select(".released").text().toLowerCase(); animeRelease = animeRelease.replace("released:", "").trim(); String animeId = Objects.requireNonNull(liTag.select("a").first()).attr("href").trim(); - animeId = animeId.replace("/category/",""); + animeId = animeId.replace("/category/", ""); String episodeId = animeId + "-episode-1"; JSONObject object = new JSONObject(); @@ -145,8 +168,8 @@ public void scrapeAnime(String url){ new Handler(Looper.getMainLooper()).post(() -> animeScraperCallback.onScrapeComplete(allAnime)); - } catch (Exception e){ - e.printStackTrace(); + } catch (Exception e) { +// e.printStackTrace(); new Handler(Looper.getMainLooper()).post(() -> animeScraperCallback.onScrapeFailed(e.getMessage())); } }).start(); @@ -158,9 +181,9 @@ public void scrapeDetails(String animeId, String episodeID) { String episodeId2; - if (episodeID == null || episodeID.isEmpty()){ + if (episodeID == null || episodeID.isEmpty()) { episodeId2 = animeId + "-episode-1"; - } else{ + } else { episodeId2 = episodeID; } @@ -168,6 +191,14 @@ public void scrapeDetails(String animeId, String episodeID) { Connection.Response response; String detailsUrl = activity.getString(R.string.gogoanime_url) + "/category/" + animeId; + if (isProxyEnabled){ + try { + detailsUrl = proxyBrowserLink + URLEncoder.encode(detailsUrl, "UTF-8"); + } catch (UnsupportedEncodingException e) { + detailsUrl = proxyBrowserLink + detailsUrl; + } + } + try { response = Jsoup.connect(detailsUrl) .userAgent(activity.getString(R.string.user_agent)) @@ -178,13 +209,21 @@ public void scrapeDetails(String animeId, String episodeID) { String episodePageUrl = activity.getString(R.string.gogoanime_url) + "/" + episodeId2; + if (isProxyEnabled){ + try { + episodePageUrl = proxyBrowserLink + URLEncoder.encode(episodePageUrl, "UTF-8"); + } catch (UnsupportedEncodingException ex) { + episodePageUrl = proxyBrowserLink + episodePageUrl; + } + } + try { Document episodePageDoc = Jsoup.connect(episodePageUrl) .userAgent(activity.getString(R.string.user_agent)) .header("Accept-Language", "en-GB,en;q=0.5") .get(); - Element animeIdContainerDiv = episodePageDoc.getElementsByClass("tv-info").first(); + Element animeIdContainerDiv = episodePageDoc.getElementsByClass("anime-info").first(); assert animeIdContainerDiv != null; Element aTag = animeIdContainerDiv.getElementsByTag("a").first(); @@ -198,7 +237,7 @@ public void scrapeDetails(String animeId, String episodeID) { .execute(); } catch (Exception ex) { - Log.d("Uchiha", "onCreate ex: " + ex.getMessage()); + Log.e("MADARA", "scrapeDetails: ", ex); response = null; } } @@ -233,7 +272,7 @@ public void scrapeDetails(String animeId, String episodeID) { JSONArray episodesArray = new JSONArray(); - for (Element liTag: liTags) { + for (Element liTag : liTags) { String episodeId = Objects.requireNonNull(liTag.select("a").first()).attr("href").replace("/", "").trim(); String episodeNum = CustomMethods.extractEpisodeNumberFromId(episodeId); @@ -258,6 +297,7 @@ public void scrapeDetails(String animeId, String episodeID) { String status = ""; String synopsis = innerHtml.select("div.description").text(); + JSONArray genresArray = new JSONArray(); Elements allPTags = innerHtml.select(".type"); @@ -271,6 +311,7 @@ public void scrapeDetails(String animeId, String episodeID) { if (spanTagValue.toLowerCase().contains("type")) { type = pTagDoc.text().replace(spanTagValue, "").trim(); } + if (spanTagValue.toLowerCase().contains("genre")) { Elements genres = pTagDoc.getElementsByTag("a"); @@ -297,10 +338,10 @@ public void scrapeDetails(String animeId, String episodeID) { animeInfoJObj.put("totalEpisodes", lastEpisode); animeInfoJObj.put("episodesList", episodesArray); - new Handler(Looper.getMainLooper()).post(()->detailsScraperCallback.onScrapingComplete(animeInfoJObj)); + new Handler(Looper.getMainLooper()).post(() -> detailsScraperCallback.onScrapingComplete(animeInfoJObj)); } - } catch (Exception e){ - new Handler(Looper.getMainLooper()).post(()->detailsScraperCallback.onScrapingFailed(e.getMessage())); + } catch (Exception e) { + new Handler(Looper.getMainLooper()).post(() -> detailsScraperCallback.onScrapingFailed(e.getMessage())); } }).start(); } diff --git a/app/src/main/java/com/fogplix/tv/helpers/ViewDialog.java b/app/src/main/java/com/fogplix/tv/helpers/ViewDialog.java index 6022461..013357d 100644 --- a/app/src/main/java/com/fogplix/tv/helpers/ViewDialog.java +++ b/app/src/main/java/com/fogplix/tv/helpers/ViewDialog.java @@ -146,163 +146,6 @@ public void onFailed(String error) { Toast.makeText(activity, "This server is not working currently. Try another server.", Toast.LENGTH_SHORT).show(); } }); - -// ------------------------------------------------------------------------------------------ - - server_2_btn.setOnClickListener(view -> { - - HPSharedPreference hpSharedPreference = new HPSharedPreference(activity); - - boolean server_status = hpSharedPreference.getPlayableServersStatus("server_2"); - - if (server_status) { - - String consumet_api = activity.getString(R.string.consumet_streaming_link_api) + episodeId; - - ProgressDialog pd = new ProgressDialog(activity); - pd.setMessage("Generating playable link..."); - pd.setCancelable(false); - pd.show(); - - - StringRequest objectRequest1 = new StringRequest(Request.Method.GET, consumet_api, response -> { - - try { - - JSONObject object = new JSONObject(response); - - if (object.has("message")) { - pd.dismiss(); - CustomMethods.errorAlert(activity, "Error", object.getString("error"), "Ok", true); - } else { - - String refererUrl = object.getJSONObject("headers").getString("Referer"); - String videoHLSUrl = ""; - String videoHLSUrl2 = ""; - - JSONArray sources = object.getJSONArray("sources"); - - for (int i = 0; i < sources.length(); i++) { - - JSONObject source_obj = sources.getJSONObject(i); - - if (source_obj.getString("quality").equalsIgnoreCase("default")) { - videoHLSUrl = source_obj.getString("url"); - } - - if (source_obj.getString("quality").equalsIgnoreCase("backup")) { - videoHLSUrl2 = source_obj.getString("url"); - } - } - - pd.dismiss(); - - Intent intent = new Intent(activity, PlayerActivity.class); - intent.putExtra("episodeId", episodeId); - intent.putExtra("animeId", animeId); - intent.putExtra("animeTitle", animeTitle); - intent.putExtra("refererUrl", refererUrl); - intent.putExtra("videoHLSUrl", videoHLSUrl); - intent.putExtra("videoHLSUrl2", videoHLSUrl2); - activity.startActivity(intent); - - dialog.dismiss(); - } - } catch (Exception e) { - e.printStackTrace(); - Toast.makeText(activity, "Error: " + e.getMessage(), Toast.LENGTH_LONG).show(); - CustomMethods.errorAlert(activity, "Error (Try another server)", e.getMessage() + "\n", "Ok", false); - } - }, error -> { - pd.dismiss(); - CustomMethods.errorAlert(activity, "Error (Try another server.)", error.getMessage(), "Ok", false); - }); - - Cache cache = new DiskBasedCache(activity.getCacheDir(), 1024 * 1024); // 1MB cap - Network network = new BasicNetwork(new HurlStack()); - - - RequestQueue queue = new RequestQueue(cache, network); - objectRequest1.setRetryPolicy((new DefaultRetryPolicy(0, DefaultRetryPolicy.DEFAULT_MAX_RETRIES, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT))); - queue.add(objectRequest1); - queue.start(); - - dialog.dismiss(); - } else { - Toast.makeText(activity, "This server is not working currently. Try another server.", Toast.LENGTH_SHORT).show(); - } - }); - -// ------------------------------------------------------------------------------------------ - - server_3_btn.setOnClickListener(v -> { - - HPSharedPreference hpSharedPreference = new HPSharedPreference(activity); - - boolean server_status = hpSharedPreference.getPlayableServersStatus("server_3"); - - if (server_status) { - - String vidcdn_api = activity.getString(R.string.VIDCDN_API_URL) + episodeId; - - ProgressDialog pd = new ProgressDialog(activity); - pd.setMessage("Generating playable link..."); - pd.setCancelable(false); - pd.show(); - - StringRequest objectRequest1 = new StringRequest(Request.Method.GET, vidcdn_api, response -> { - - try { - - JSONObject object = new JSONObject(response); - - if (object.has("error")) { - pd.dismiss(); - CustomMethods.errorAlert(activity, "Error", object.getString("error"), "Ok", true); - } else { - - String refererUrl = object.getString("Referer"); - String videoHLSUrl = object.getJSONArray("sources").getJSONObject(0).getString("file"); - String videoHLSUrl2 = object.getJSONArray("sources_bk").getJSONObject(0).getString("file"); - - pd.dismiss(); - - Intent intent = new Intent(activity, PlayerActivity.class); - intent.putExtra("episodeId", episodeId); - intent.putExtra("animeId", animeId); - intent.putExtra("animeTitle", animeTitle); - intent.putExtra("refererUrl", refererUrl); - intent.putExtra("videoHLSUrl", videoHLSUrl); - intent.putExtra("videoHLSUrl2", videoHLSUrl2); - activity.startActivity(intent); - - dialog.dismiss(); - } - } catch (Exception e) { - e.printStackTrace(); - Toast.makeText(activity, "Error: " + e.getMessage(), Toast.LENGTH_LONG).show(); - CustomMethods.errorAlert(activity, "Error (Try another server)", e.getMessage() + "\n", "Ok", true); - } - }, error -> { - pd.dismiss(); - CustomMethods.errorAlert(activity, "Error (Try another server.)", error.getMessage(), "Ok", true); - }); - - Cache cache = new DiskBasedCache(activity.getCacheDir(), 1024 * 1024); // 1MB cap - Network network = new BasicNetwork(new HurlStack()); - - - RequestQueue queue = new RequestQueue(cache, network); - objectRequest1.setRetryPolicy((new DefaultRetryPolicy(0, DefaultRetryPolicy.DEFAULT_MAX_RETRIES, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT))); - queue.add(objectRequest1); - queue.start(); - - dialog.dismiss(); - } else { - Toast.makeText(activity, "This server is not working currently. Try another server.", Toast.LENGTH_SHORT).show(); - } - }); - // ------------------------------------------------------------------------------------------ dialog.show(); diff --git a/app/src/main/res/drawable/action_bar_logo.png b/app/src/main/res/drawable/action_bar_logo.png index 6052cbefaa9a1ceaa9b7d053b2dda19b44e9263a..534a6e365b8fedd1c4a39e0f352d391fe8a36435 100644 GIT binary patch delta 3997 zcma)92{hE*-)9g;mh3UMAxjzzgPF0UiKIf2C6Z^%jC~jygUF8ujio`)D6&-6td%`` zmXIW5gsH~-heDRfQj}i*=e+NE-t&Lo=bYy*pL@^!e(vXc@BN;0&-s2gzpIgf1RZd^ zg}$k2tOJMP^z`(UjZr!TJXYV!!26i8zMei@7rx&RFt|S2Ko5=3uUX;ermKM9^fm5d zbO(?!kAV)H9tKh}L%{TmVfu)RaHD+|S|6#cXSlxusvJQip=}9dEFMe7T4KorGw8nR zf0F5=AbGL>v-kr9Rl{Qu-dG$K3xnegkT5SJgf|T7jW>YdaacpV7an1N@IuisJV({^ z;Kl?!W4Im+WFqF4G3TA9%V611T?}acVc+oR>)YK4IINrz$r4K{ud!t}@ z1VRsnCFr4GUfw7;9IlTyG{6$*D?Ep#l<_#UcW@{XOE!c05wSi5T~d$_{Q$4C)jyGd zDqkgAQOM|UUqaCTf9C>T9nt;QQ`U6x3&ID7U)6%@(p7k6>07)iR{!MM|H#9i@uBgV z0VLmGa`08(U=sQwA%c7k8%YSgYOZV=iuXoius;7i3-nX|i}xqT4oln**(rPL^XF__ zq5o<9x71%&-F+3^zXWyvlDbF`_#dD2em)Dp?s~BR7uUfh8_N?HBc_-0KZkLQ#1eI* z8@Wq(OL$v&oA*_JN@NQBve@Affw&fXbf${54ezjoJKJfZaV;$_M5O*sU7*xoz*i%Voj$K;NQg zLN$RGk<~27f0*$!fXiK5jCuH%9p8+d}Uz7p3&#Pi2NN{X!Sfkip4yqtqeOCdUsMu)>?dTN z<4W9pv(=RXbgQUC{OPqbO_j;=iA7N{t)=d6Gq49Qu=3fz<*C-iUwyruC-LN~ebzuu zcgU~z)v{-|M^DYSisoE845s3824jGvD;tpu^Qwgcstg2UI22=cR>=WqM_jr8B(GY_N$qhmXH399%EXc zixw!$G^h+)Q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Ruue#K8dbeBxT{WiF?mQ{K8^wCmNYe?+S-*|@c$pTt6}{-l zy46?@K=$lKFaQbKIb%N9UJdMa2R;Wr@GX*^81&F_ zuB5$eXR*t_c`%A9`g<4qx+kPm&pTz(6V_Su%DX~--Ojuwx1FSJ%1nta*)t`{0i855 zJot=hhq)KVe}OP9DO zHAIItclns{%;-lHV(!FizzTt{*t8jZZtoDO-!<|<|CsHc%_<)3o~A$6xK zp97i^5RGe!*q~ZB;fZLmpEnF~E@M2q zF99JQOFof?M^n?z>IP9x|LPgXmyCeKt&A(A1-)-67kC&LKIAXABL3a*uk-==|C2uc iTlo>rwt6Iv8x+pHOIZbk;z^y_t + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/button_focused.xml b/app/src/main/res/drawable/button_focused.xml new file mode 100644 index 0000000..4bdff9b --- /dev/null +++ b/app/src/main/res/drawable/button_focused.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/round_transparent_ripple_button.xml b/app/src/main/res/drawable/round_transparent_ripple_button.xml new file mode 100644 index 0000000..199ce26 --- /dev/null +++ b/app/src/main/res/drawable/round_transparent_ripple_button.xml @@ -0,0 +1,13 @@ + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index c9c231b..06f7c7b 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -1,121 +1,97 @@ - + + + + - - + android:layout_below="@+id/important_notice_tv"> - - - - - + + - - + android:icon="@drawable/subtitles_24" + android:text="@string/subbed" /> - - - - - + - + - + - + - + - + + - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/own_toolbar.xml b/app/src/main/res/layout/own_toolbar.xml index 2e048de..93f7a3a 100644 --- a/app/src/main/res/layout/own_toolbar.xml +++ b/app/src/main/res/layout/own_toolbar.xml @@ -10,7 +10,11 @@ + android:backgroundTint="@color/red"> + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/menu/top_right_popup_menu.xml b/app/src/main/res/menu/top_right_popup_menu.xml index a4f1c5c..a091ea3 100644 --- a/app/src/main/res/menu/top_right_popup_menu.xml +++ b/app/src/main/res/menu/top_right_popup_menu.xml @@ -1,6 +1,10 @@ + + + + Reply + Reply to all + + + + reply + reply_all + + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index a786798..4feed0f 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,5 +1,5 @@ - Fogplix Anime TV + Fogplix Anime Fogplix Anime Sub @@ -10,34 +10,40 @@ Popular Synopsis - https://browser.foganime.com/gogoanime-api-php/generate-link.php?id= + https://proxy.fogplix-anime.com/browse.php?link= - Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36 + Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36 Watch free anime (Dubbed and Subbed) with Fogplix Anime app. Download now from c0feb5c5-3fe1-490a-bcf2-0af7ed45a18b Favorites Search - https://app.foganime.com/updates/version-tv.json - https://app.foganime.com/updates/fogplix-alert-tv.json - https://app.foganime.com/updates/playable-servers-status.json - - https://app.foganime.com - https://telegram.me/Fogplix - https://telegram.me/FogplixGroup - https://app.foganime.com/more-apps.html - - https://api.consumet.org/anime/gogoanime/watch/ + https://benojir.github.io/Fogplix-Landing-Page/updates/version-tv.json + https://benojir.github.io/Fogplix-Landing-Page/updates/fogplix-alert-tv.json + https://benojir.github.io/Fogplix-Landing-Page/updates/playable-servers-status.json https://ajax.gogocdn.net/ajax/page-recent-release.html https://ajax.gogocdn.net/ajax/load-list-episode https://gogoanime3.co - Oops! Maybe your ISP has blocked our server. Please try using any VPN. May be it can help. + Oops! Maybe your ISP has blocked our server. Please try using any VPN or enable proxy from settings page. May be it can help. Please take a screenshot and report this error to us. + As you\'re using an ad-blocker, it might block our proxy server and cause issues. To fix this, either turn off the proxy in settings or disable the ad-blocker. hiddenpirates@outlook.com Failed to play this episode. Please take a screenshot and report it to us. Now try to play on the web player. Just click on the below button \n + SettingsActivity + + Naruto Uzumaki, is a loud, hyperactive, adolescent ninja who constantly searches for approval and recognition, as well as to become Hokage, who is acknowledged as the leader and strongest of all ninja in the village. Naruto Uzumaki wants to be the best ninja in the land. + + Proxy + Now you are able to browse Fogplix Anime through proxy + Use proxy to bypass your ISP (Internet Service Provider) blockage + Show 85s Skip Button + 85 seconds skip button is enabled + 85 seconds skip button is disabled. + Next episode will not play automatically. + Next episode will be played when current episode ended. + Auto Play Next Episode - "Naruto" is a Japanese manga and anime series created by Masashi Kishimoto. The stories isolation is the fact that he houses the Nine-Tailed Fox, Kurama, within him, a powerful tailed beast that attacked the village years before Naruto was born. Despite facing these challenges, Naruto is determined to prove himself and gain the acknowledgment of the villagers. \ No newline at end of file diff --git a/app/src/main/res/xml/root_preferences.xml b/app/src/main/res/xml/root_preferences.xml new file mode 100644 index 0000000..dd13149 --- /dev/null +++ b/app/src/main/res/xml/root_preferences.xml @@ -0,0 +1,21 @@ + + + + + + + + + \ No newline at end of file