Skip to content

Commit

Permalink
even smaller chance because its happening too often
Browse files Browse the repository at this point in the history
  • Loading branch information
ajgeiss0702 committed Oct 5, 2024
1 parent 502b350 commit 48b805d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fetchers/youtube/scrape.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export async function getLivestreamId(env: Env) {
lastHandledYoutubeCallback = lastYoutubeCallback.date;
}

if((nearWan && Math.random() < (wasLiveRecently ? 0.01 : 0.50)) || lastYoutubeCallback) {
if((nearWan && Math.random() < (wasLiveRecently ? 0.001 : 0.50)) || lastYoutubeCallback) {
// if we are near wan, then 50% chance, check if floatplane is live. If it is, use api
const useApi = isYoutubeCallbackExpiry || (wasLiveRecently ? true : await fetch("https://fp-proxy.ajg0702.us/channel/linustechtips")
.then(r => r.json()).then(r => (r as {isLive: boolean}).isLive));
Expand Down

0 comments on commit 48b805d

Please sign in to comment.