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

Commit

Permalink
More hdw removing
Browse files Browse the repository at this point in the history
  • Loading branch information
N0-0NE-Dev committed May 6, 2023
1 parent 4d11e2c commit c45fbaf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 33 deletions.
18 changes: 0 additions & 18 deletions src/data/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,6 @@
"key": "tvshows"
}
],
"categoriesHdw": [
{
"label": "Movies",
"key": "hdwmovies"
},
{
"label": "Series",
"key": "hdwseries"
},
{
"label": "Arabic Series",
"key": "arabic-series"
},
{
"label": "Arabic Movies",
"key": "arabic-movies"
}
],
"fileUrlsFasel": [
"https://raw.githubusercontent.com/N0-0NE-Dev/no-fasel-scrapers/main/output/all-content.json",
"https://raw.githubusercontent.com/N0-0NE-Dev/no-fasel-scrapers/main/output/anime.json",
Expand Down
23 changes: 9 additions & 14 deletions src/screens/SearchScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@ import ReactNativeBlobUtil from "react-native-blob-util";
import { getPaletteSync } from "@assembless/react-native-material-you";

const SearchScreen = ({ navigation }) => {
const provider = Storage.getString("provider");
const common = require("../data/common.json");
const genres = provider == "fasel" ? common.genresFasel : common.genresHdw;
let allContentPath = ReactNativeBlobUtil.fs.dirs.DocumentDir;
let featuredContentPath = ReactNativeBlobUtil.fs.dirs.DocumentDir;
const genres = common.genresFasel;

let allContentPath =
ReactNativeBlobUtil.fs.dirs.DocumentDir + "/all-content.json";

let featuredContentPath =
ReactNativeBlobUtil.fs.dirs.DocumentDir + "/featured-content.json";

const theme = useTheme();
const palette = getPaletteSync();

Expand All @@ -32,8 +36,7 @@ const SearchScreen = ({ navigation }) => {
const [end, setEnd] = useState(20);
const pageNumber = end / 20;

const categories =
provider == "fasel" ? common.categoriesFasel : common.categoriesHdw;
const categories = common.categoriesFasel;

const handleNext = () => {
setStart(end);
Expand All @@ -49,14 +52,6 @@ const SearchScreen = ({ navigation }) => {
}
};

if (provider == "fasel") {
allContentPath += "/all-content.json";
featuredContentPath += "/featured-content.json";
} else {
allContentPath += "/hdw-all-content.json";
featuredContentPath += "/hdw-featured-content.json";
}

useEffect(() => {
ReactNativeBlobUtil.fs
.readFile(featuredContentPath)
Expand Down
1 change: 0 additions & 1 deletion src/screens/TabScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { getPaletteSync } from "@assembless/react-native-material-you";
const TabScreen = ({ navigation }) => {
const palette = getPaletteSync();
let progress = 0;
const provider = Storage.getString("provider");
const common = require("../data/common.json");
const [contentUpdated, setContentUpdated] = useState(false);
const [index, setIndex] = useState(0);
Expand Down

0 comments on commit c45fbaf

Please sign in to comment.