Skip to content

Commit

Permalink
feat(client): added the ability to show a specific feed by changing t…
Browse files Browse the repository at this point in the history
…he URL's path to match a folder
  • Loading branch information
Will Moss committed Jul 26, 2024
1 parent 7437650 commit 7f24988
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import VideoCard from "./components/VideoCard";
import { faCompactDisc } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import "./App.css";
import BottomMetadata from "./components/BottomMetadata";
import BlacklistManager from "./components/BlacklistManager";
import BottomMetadata from "./components/BottomMetadata";

const App = () => {
// Misc - General niceties
Expand Down Expand Up @@ -119,7 +119,7 @@ const App = () => {
.map((v) => v.url)
.includes(_v.url)
),
[videos, blackListUpdater]
[videos, blackListUpdater] // eslint-disable-line react-hooks/exhaustive-deps
);

// Member - Determines which videos are currently loaded and visible on screen
Expand Down Expand Up @@ -238,14 +238,18 @@ const App = () => {
res([...results.flat(), ..._files]);
});
})
);
)
.catch((_) => new Promise((res, rej) => res([])));
};

// Method - Retrieve all the video links
const retrieveVideos = () => {
if (!hasCache) setLoading(true);

_retrieveVideosRecursively().then((files) => {
let startingPath = window.location.pathname.slice(1);
if (startingPath.length > 1 && !startingPath.endsWith("/")) startingPath += "/";

_retrieveVideosRecursively(startingPath).then((files) => {
if (!files) setLoading(false);

let _videoFiles = files
Expand Down

0 comments on commit 7f24988

Please sign in to comment.