Skip to content

Commit

Permalink
feat: Rating system, Mark as Watched, data fetching refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Ipmake committed Jan 31, 2025
1 parent 6d964b7 commit 799d04e
Show file tree
Hide file tree
Showing 5 changed files with 1,001 additions and 445 deletions.
45 changes: 44 additions & 1 deletion backend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,48 @@ app.use(express.json());
}
}


// if(!status.error) {
// let checkAllows = false;
// const fetchStatus = async () => {
// try {
// const res = await axios.get(`${process.env.PROXY_PLEX_SERVER}/`, {
// timeout: 2500,
// });

// const m = res.data.MediaContainer;

// if(
// !m.transcoderAudio ||
// !m.transcoderSubtitles ||
// !m.transcoderVideo
// ) {
// status.error = true;
// status.message = `PLEX_SERVER ${m.friendlyName} does not allow transcoding`;
// console.error(`PLEX_SERVER ${m.friendlyName} does not allow transcoding`);
// return;
// }

// checkAllows = true;
// status.error = false;

// } catch (error: any) {
// status.error = true;
// status.message = 'Server cannot reach PLEX_SERVER' + error.message;
// console.error('Server cannot reach PLEX_SERVER ' + error.message);
// }
// }

// await new Promise<void>((resolve) => {
// setTimeout(() => {
// if(checkAllows) return resolve();
// fetchStatus();
// }, 5000);
// })
// }


if(status.error) return;
status.ready = true;
status.message = 'OK';
})();
Expand Down Expand Up @@ -223,4 +265,5 @@ let io = (process.env.DISABLE_PERPLEXED_SYNC === 'true') ? null : new SocketIOSe

export { app, server, io, deploymentID, prisma };

import './common/sync';
import './common/sync';
import { features } from 'process';
Loading

0 comments on commit 799d04e

Please sign in to comment.