From 925d65686437881ddfeb01be59455c2a670503f1 Mon Sep 17 00:00:00 2001 From: Ahmed Islam Date: Sun, 19 Mar 2023 22:22:30 +1100 Subject: [PATCH] Version 1.1.9 --- App.js | 6 + README.md | 5 +- android/app/build.gradle | 4 +- src/components/ContentCard.js | 14 +- src/components/FeaturedContentCard.js | 2 + src/data/common.json | 6 +- src/screens/EntireSeasonDownloadScreen.js | 168 ++++++++++++++++++++++ src/screens/SearchScreen.js | 1 - src/screens/TabScreen.js | 10 ++ src/screens/WeCimaExtractionScreen.js | 59 ++++++++ 10 files changed, 261 insertions(+), 14 deletions(-) create mode 100644 src/screens/EntireSeasonDownloadScreen.js create mode 100644 src/screens/WeCimaExtractionScreen.js diff --git a/App.js b/App.js index 416ec6d..896916f 100644 --- a/App.js +++ b/App.js @@ -10,6 +10,7 @@ import AboutScreen from "./src/screens/AboutScreen"; import LoadingScreen from "./src/screens/LoadingScreen"; import { Storage } from "./src/components/Storage"; import StartupScreen from "./src/screens/StartupScreen"; +import WeCimaExtractionScreen from "./src/screens/WeCimaExtractionScreen"; const Stack = createNativeStackNavigator(); @@ -59,6 +60,11 @@ const MyStack = () => { component={StartupScreen} options={{ headerShown: false }} /> + diff --git a/README.md b/README.md index 5137833..79835ef 100644 --- a/README.md +++ b/README.md @@ -46,14 +46,15 @@ A streaming app with zero ads built in react native with [scrapers](https://gith Please check the open and closed issues, update the app to the latest version and restart it at least twice before opening any issues. ## 📄 DMCA: + NoFasel does not own or operate any servers which contain DMCA-protected content, NoFasel scrapes all of its content from third-party websites mainly: 1. [FaselHD](https://www.faselhd.ac/) 2. [Akwam](https://akwam.to/) 3. [HDwatched](https://www.hdwatched.xyz/) +4. [WeCima](https://wecima.tube/) -Please bring up any DMCA violation concerns with them not me. - +Please bring up any DMCA violation concerns with them not me. ## ⬇️ Download: diff --git a/android/app/build.gradle b/android/app/build.gradle index 545d546..386debe 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -108,8 +108,8 @@ android { applicationId "com.n00nedev.nofasel" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 1 - versionName "1.0" + versionCode 19 + versionName "1.1.19" } splits { diff --git a/src/components/ContentCard.js b/src/components/ContentCard.js index cbee44e..b07b61b 100644 --- a/src/components/ContentCard.js +++ b/src/components/ContentCard.js @@ -18,20 +18,20 @@ const ContentCard = ({ - navigation.navigate("Select", { id: id, category: category }) - } - > + navigation.navigate( + category == "WeCima" ? "WeCima Extraction" : "Select", + { id: id, category: category }, + ) + }> + source={{ uri: imageSource }}> + }}> {rating ? rating : "N/A"} diff --git a/src/components/FeaturedContentCard.js b/src/components/FeaturedContentCard.js index 217d386..8f40fa6 100644 --- a/src/components/FeaturedContentCard.js +++ b/src/components/FeaturedContentCard.js @@ -59,6 +59,7 @@ const styles = StyleSheet.create({ fontWeight: "bold", letterSpacing: 1.25, backgroundColor: "transparent", + color: "white", }, buttonsParentStyle: { flexDirection: "row", @@ -73,6 +74,7 @@ const styles = StyleSheet.create({ marginRight: 10, fontSize: 16, fontWeight: "200", + color: "white" }, buttonStyle: { marginLeft: 10, diff --git a/src/data/common.json b/src/data/common.json index 8dacccb..3bea225 100644 --- a/src/data/common.json +++ b/src/data/common.json @@ -60,7 +60,8 @@ "https://raw.githubusercontent.com/N0-0NE-Dev/no-fasel-scrapers/main/output/arabic-series.json", "https://raw.githubusercontent.com/N0-0NE-Dev/no-fasel-scrapers/main/output/arabic-movies.json", "https://raw.githubusercontent.com/N0-0NE-Dev/no-fasel-scrapers/main/output/featured-content.json", - "https://raw.githubusercontent.com/N0-0NE-Dev/no-fasel-scrapers/main/output/last-scraped.txt" + "https://raw.githubusercontent.com/N0-0NE-Dev/no-fasel-scrapers/main/output/last-scraped.txt", + "https://raw.githubusercontent.com/N0-0NE-Dev/no-fasel-scrapers/main/output/WeCima.json" ], "fileUrlsHdw": [ "https://raw.githubusercontent.com/N0-0NE-Dev/no-fasel-scrapers/main/output/arabic-series.json", @@ -70,7 +71,8 @@ "https://raw.githubusercontent.com/N0-0NE-Dev/no-fasel-scrapers/main/output/hdw-trending-content.json", "https://raw.githubusercontent.com/N0-0NE-Dev/no-fasel-scrapers/main/output/hdw-all-content.json", "https://raw.githubusercontent.com/N0-0NE-Dev/no-fasel-scrapers/main/output/hdwmovies.json", - "https://raw.githubusercontent.com/N0-0NE-Dev/no-fasel-scrapers/main/output/hdwseries.json" + "https://raw.githubusercontent.com/N0-0NE-Dev/no-fasel-scrapers/main/output/hdwseries.json", + "https://raw.githubusercontent.com/N0-0NE-Dev/no-fasel-scrapers/main/output/WeCima.json" ], "genresHdw": [ "Comedy", diff --git a/src/screens/EntireSeasonDownloadScreen.js b/src/screens/EntireSeasonDownloadScreen.js new file mode 100644 index 0000000..e6139be --- /dev/null +++ b/src/screens/EntireSeasonDownloadScreen.js @@ -0,0 +1,168 @@ +import React, { useEffect, useState } from "react"; +import { View, StyleSheet, ScrollView, Image, Pressable } from "react-native"; +import { Text, TextInput, useTheme } from "react-native-paper"; +import ReactNativeBlobUtil from "react-native-blob-util"; +import ContentCard from "../components/ContentCard"; +import CentredActivityIndicator from "../components/CentredActivityIndicator"; + +const EntireSeasonDownloadScreen = ({ navigation }) => { + const theme = useTheme(); + + const [data, setData] = useState(null); + const [featured, setFeatured] = useState(null); + const [searchText, setSearchText] = useState(""); + const [use, setUse] = useState([]); + + useEffect(() => { + ReactNativeBlobUtil.fs + .readFile(ReactNativeBlobUtil.fs.dirs.DocumentDir + "/WeCima.json") + .then(data => { + const parsedData = Object.entries(JSON.parse(data)); + setData(parsedData); + setFeatured( + parsedData.splice(parsedData.length - 11, parsedData.length), + ); + setUse(parsedData.splice(parsedData.length - 11, parsedData.length)); + }); + }, []); + + useEffect(() => { + if (data && searchText != "") { + var searched = data.filter(item => { + if ( + item[1]["Title"] + .toLowerCase() + .includes(searchText.toLocaleLowerCase()) + ) { + return item; + } else { + // pass + } + }); + + if (searched.length > 0) { + setUse(searched); + } else { + setUse(false); + } + } else { + // pass + } + }, [searchText]); + + useEffect(() => { + if (searchText === "") { + setUse(featured); + } else { + // pass + } + }, [searchText]); + + if (data && featured) { + return ( + + + } + underlineColor="transparent" + activeUnderlineColor="transparent" + cursorColor="black" + onChangeText={text => setSearchText(text)} + /> + + + {use ? ( + + {use.map(item => { + return ( + + ); + })} + + ) : ( + + + + Not Found + + + Sorry, the keywords you entered could not be found. Try to check + again or search with different keywords. + + + )} + + ); + } else { + return ; + } +}; + +const styles = StyleSheet.create({ + searchBarStyle: { + margin: 20, + borderRadius: 10, + borderTopRightRadius: 10, + borderTopLeftRadius: 10, + flex: 1, + }, + searchBarParentStyle: { + flexDirection: "row", + justifyContent: "space-around", + alignItems: "center", + }, + iconStyle: { + marginRight: 20, + borderRadius: 15, + padding: 15, + }, + imageParentStyle: { + alignItems: "center", + flex: 1, + justifyContent: "center", + }, + notFoundTextStyle: { + fontWeight: "bold", + fontSize: 26, + margin: 20, + }, + descriptionTextStyle: { + textAlign: "center", + marginHorizontal: 10, + fontSize: 16, + letterSpacing: 0.75, + }, +}); + +export default EntireSeasonDownloadScreen; diff --git a/src/screens/SearchScreen.js b/src/screens/SearchScreen.js index db420e2..7f559d5 100644 --- a/src/screens/SearchScreen.js +++ b/src/screens/SearchScreen.js @@ -306,7 +306,6 @@ const styles = StyleSheet.create({ imageParentStyle: { alignItems: "center", flex: 1, - borderColor: "white", justifyContent: "center", }, notFoundTextStyle: { diff --git a/src/screens/TabScreen.js b/src/screens/TabScreen.js index ee3c3a6..1759f48 100644 --- a/src/screens/TabScreen.js +++ b/src/screens/TabScreen.js @@ -7,6 +7,7 @@ import SettingsScreen from "./SettingsScreen"; import { BottomNavigation } from "react-native-paper"; import CentredActivityIndicator from "../components/CentredActivityIndicator"; import ReactNativeBlobUtil from "react-native-blob-util"; +import EntireSeasonDownloadScreen from "./EntireSeasonDownloadScreen"; const TabScreen = ({ navigation }) => { let progress = 0; @@ -37,6 +38,12 @@ const TabScreen = ({ navigation }) => { focusedIcon: "bookmark-minus", unfocusedIcon: "bookmark-minus-outline", }, + { + key: "entireSeasonDownload", + title: "Season Download", + focusedIcon: "download", + unfocusedIcon: "download-outline", + }, { key: "settings", title: "Settings", @@ -55,6 +62,9 @@ const TabScreen = ({ navigation }) => { mylist: () => { return ; }, + entireSeasonDownload: () => { + return ; + }, settings: () => { return ; }, diff --git a/src/screens/WeCimaExtractionScreen.js b/src/screens/WeCimaExtractionScreen.js new file mode 100644 index 0000000..5d3aa04 --- /dev/null +++ b/src/screens/WeCimaExtractionScreen.js @@ -0,0 +1,59 @@ +import React, { useState } from "react"; +import { Linking, View } from "react-native"; +import { ActivityIndicator, Button } from "react-native-paper"; +import WebView from "react-native-webview"; + +const WeCimaExtractionScreen = ({ route }) => { + const { id } = route.params; + const [qualities, setQualities] = useState(null); + + const jsCode = ` + const qualities = {}; + + const items = [...document.getElementsByClassName("Season--Download--Wecima--Single")[0].querySelectorAll("a")]; + + items.forEach((item) => { + const link = item.getAttribute("href"); + const resolution = item.querySelector("resolution").innerText; + qualities[resolution] = link; + }); + + window.ReactNativeWebView.postMessage(JSON.stringify(qualities)); + + `; + + if (!qualities) { + return ( + + + + + setQualities(JSON.parse(event.nativeEvent.data)) + } + /> + + + ); + } else { + return ( + + {Object.entries(qualities).map(quality => { + return ( + + ); + })} + + ); + } +}; + +export default WeCimaExtractionScreen;