Skip to content
This repository was archived by the owner on Sep 17, 2023. It is now read-only.

Commit

Permalink
Qucik fix
Browse files Browse the repository at this point in the history
  • Loading branch information
N0-0NE-Dev committed Dec 18, 2022
1 parent 3d5ded8 commit 30968ea
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
4 changes: 3 additions & 1 deletion src/screens/DownloadScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ const DownloadScreen = ({ navigation, route }) => {
const jsCode =
"window.ReactNativeWebView.postMessage(document.documentElement.innerHTML)";

console.log(downloadLink)

useEffect(() => {
if (pageSource) {
const HTMLParser = require("fast-html-parser");
Expand All @@ -36,7 +38,7 @@ const DownloadScreen = ({ navigation, route }) => {
}
}, [pageSource]);

if (category == "arabic-series") {
if (category == "arabic-series" | category == "arabic-movies") {
Linking.openURL(downloadLink.replaceAll('"', "")).then(navigation.goBack());
} else {
return (
Expand Down
24 changes: 14 additions & 10 deletions src/screens/SelectScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ const SelectScreen = ({ navigation, route }) => {
}

const getSources = (watchUrl) => {
if (pageSource && !category.contains("arabic")) {
if (
pageSource &&
category != "arabic-series" &&
category != "arabic-movies"
) {
let HTMLParser = require("fast-html-parser");
let root = HTMLParser.parse(pageSource);
let dataUrls = [];
Expand Down Expand Up @@ -119,7 +123,7 @@ const SelectScreen = ({ navigation, route }) => {

if (contentWithSeasons.includes(category)) {
toUse = content["Seasons"][season]["Episodes"];
} else if ((category == "anime") | (category == "arabic-series")) {
} else if (category == "anime" || category == "arabic-series") {
toUse = content["Episodes"];
} else {
// pass
Expand Down Expand Up @@ -162,7 +166,7 @@ const SelectScreen = ({ navigation, route }) => {
setSelectedQuality(null);
if (selectedSeason) {
getSeriesEpisodes(selectedSeason);
} else if ((category == "anime") | (category == "arabic-series")) {
} else if (category == "anime" || category == "arabic-series") {
getSeriesEpisodes();
} else {
// pass
Expand All @@ -173,15 +177,13 @@ const SelectScreen = ({ navigation, route }) => {
}, [selectedSeason, data]);

useEffect(() => {
setQualities(null);
setSelectedQuality(null);
if (category == "movies" && data) {
setTimeout(() => setContentSource(content["Source"]), 250);
} else if (selectedEpisode && category != "arabic-series") {
setSelectedQuality(null);
setQualities(null);
setContentSource(selectedEpisode);
} else if (selectedEpisode && category == "arabic-series") {
setQualities(null);
setSelectedQuality(null);
getSources(selectedEpisode);
} else if (category == "arabic-movies" && data) {
getSources(content["Source"]);
Expand Down Expand Up @@ -300,7 +302,7 @@ const SelectScreen = ({ navigation, route }) => {
/>
</View>
);
} else if (selectedEpisode | (category == "arabic-movies")) {
} else if (selectedEpisode || category == "arabic-movies") {
return <ActivityIndicator size={50} />;
} else {
// pass
Expand All @@ -310,16 +312,18 @@ const SelectScreen = ({ navigation, route }) => {
const handleDownload = () => {
let downloadLink = null;

if (category == "arabic-series") {
if (category == "arabic-series" || category == "arabic-movies") {
downloadLink = selectedQuality;
} else if (category != "movies") {
downloadLink =
"https://www.t7meel.site/file/" +
selectedEpisode.split("=")[2].replace("&img", "");
} else {
} else if (category == "movies") {
downloadLink =
"https://www.t7meel.site/file/" +
contentSource.split("=")[2].replace("&img", "");
} else {
// pass
}

navigation.navigate("Download", {
Expand Down

0 comments on commit 30968ea

Please sign in to comment.