Skip to content

Commit

Permalink
+ fixed ep skiping issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Incredibleflamer committed Jan 8, 2025
1 parent e397e5e commit 70224d8
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 26 deletions.
18 changes: 9 additions & 9 deletions src/backend/Scrappers/animez.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,12 @@ async function ExtractCardsData($, page = 1) {
return searchResult;
}

(async () => {
try {
// const data = await SearchAnime("one piece", 2);
const data = await AnimeInfo("one-piece-7096");
console.log(data);
} catch (err) {
console.log(err);
}
})();
// (async () => {
// try {
// // const data = await SearchAnime("one piece", 2);
// const data = await AnimeInfo("one-piece-7096");
// console.log(data);
// } catch (err) {
// console.log(err);
// }
// })();
2 changes: 1 addition & 1 deletion src/backend/Scrappers/anivibe.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ async function fetchRecentEpisodes(page = 1) {
const { data } = await axios.get(`${baseurl}/newest?page=${page}`);

const $ = cheerio.load(data);
console.log($);
// console.log($);

const results = [];

Expand Down
11 changes: 1 addition & 10 deletions src/backend/database.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,8 @@ async function continuousExecution() {

for (let i = 0; i < AnimeQueue.length; i++) {
try {
const currentTask = AnimeQueue[i];
const currentTask = AnimeQueue[0];
if (!currentTask) {
AnimeQueue.splice(i, 1);
await SaveQueueData(AnimeQueue);
break;
}

Expand Down Expand Up @@ -180,11 +178,7 @@ async function downloadEpisodeByQuality(
episodeNumber
);

console.log(downloadedPaths);
console.log(config);
console.log(config?.mergeSubtitles);
if (config?.mergeSubtitles === "on" || !config?.mergeSubtitles) {
console.log("merging!");
const outputFile = path.join(
directoryName,
`${episodeNumber}Ep.mp4`
Expand Down Expand Up @@ -298,8 +292,6 @@ async function downloadSubtitle(subtitles, dir, episodeNumber) {
});

downloadedPaths.push(subtitlePath);

console.log(`downlaoded! lang : ${lang} : ${url}`);
}
return { downloadedPaths, episodeDir };
}
Expand Down Expand Up @@ -329,7 +321,6 @@ async function mergeSubtitleWithVideo(
const metadata = subtitleFiles
.map((filePath, index) => {
const lang = path.basename(filePath, path.extname(filePath));
console.log(lang);
return `-metadata:s:s:${index} language=${lang.split("_")}`;
})
.join(" ");
Expand Down
3 changes: 0 additions & 3 deletions src/backend/utils/queue.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,11 @@ async function loadQueue() {

// remove anime from queue
async function removeQueue(AnimeEpId) {
console.log(`id : ${AnimeEpId}`);
console.log(`before : ${AnimeQueue.toString()}`);
const indexToRemove = AnimeQueue.findIndex((item) => item.epid === AnimeEpId);
if (indexToRemove !== -1) {
AnimeQueue.splice(indexToRemove, 1);
await saveQueue();
}
console.log(`after : ${AnimeQueue.toString()}`);
}

// Remove With Index
Expand Down
4 changes: 2 additions & 2 deletions src/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "animedownloader",
"version": "2.7.1",
"version": "2.7.2",
"description": "Download anime in batches & its fast :3",
"main": "gui.js",
"scripts": {
Expand Down

0 comments on commit 70224d8

Please sign in to comment.