pstream is dead; long live pstream taciturnaxolotl.github.io/pstream-ng/
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add sharks, fix easter eggs and increase visablity of 'did you enable the extension?'

+41 -16
+1 -1
package.json
··· 1 1 { 2 2 "name": "sudo-flix", 3 - "version": "4.5.0", 3 + "version": "4.5.1", 4 4 "private": true, 5 5 "homepage": "https://sudo-flix.lol", 6 6 "scripts": {
public/lightbar-images/shark.png

This is a binary file and will not be displayed.

+1 -1
src/assets/locales/cat.json
··· 139 139 } 140 140 }, 141 141 "media": { 142 - "episodeDisplay": "S{{season}} E{{episode}}", 142 + "episodeDisplay": "S{{season}} - E{{episode}}", 143 143 "types": { 144 144 "movie": "Meow Movie", 145 145 "show": "Meow Show"
+1 -1
src/assets/locales/en.json
··· 386 386 "badge": "Not found", 387 387 "detailsButton": "Show details", 388 388 "homeButton": "Go home", 389 - "text": "We can not find the media you are looking for or no one provides it... Did you enable the extension for this site?", 389 + "text": "We can not find the media you are looking for or no one provides it... <bold>Did you enable the extension for this site?</bold>", 390 390 "title": "We couldn't find that" 391 391 } 392 392 },
+24 -11
src/components/utils/Lightbar.tsx
··· 52 52 53 53 this.radius = 1 + Math.floor(Math.random() * 0.5); 54 54 this.direction = (Math.random() * Math.PI) / 2 + Math.PI / 4; 55 - this.speed = 0.02 + Math.random() * 0.08; 55 + this.speed = 0.02 + Math.random() * 0.085; 56 56 57 57 const second = 60; 58 58 this.lifetime = second * 3 + Math.random() * (second * 30); ··· 107 107 ctx.translate(this.x, this.y); 108 108 const w = this.size; 109 109 const h = (this.image.naturalWidth / this.image.naturalHeight) * w; 110 - ctx.rotate(this.direction - Math.PI); 111 - ctx.drawImage(this.image, -w / 2, h, h, w); 110 + if (this.image.src.includes("shark")) { 111 + const flip = this.direction === Math.PI ? 1 : -1; 112 + ctx.scale(flip, 1); 113 + ctx.drawImage(this.image, (-w / 2) * flip, -h / 2, w, h); 114 + } else { 115 + ctx.rotate(this.direction - Math.PI); 116 + ctx.drawImage(this.image, -w / 2, h, h, w); 117 + } 112 118 } else { 113 119 ctx.ellipse( 114 120 this.x, ··· 138 144 canvas.height = canvas.scrollHeight; 139 145 140 146 // Basic particle config 141 - const particleCount = 25; 147 + const particleCount = Math.floor(Math.random() * (30 - 25 + 1)) + 25; 142 148 let imageParticleCount = particleCount; 143 149 144 150 // Holiday overrides ··· 160 166 } 161 167 162 168 // Fish easter egg 163 - const shouldShowFishie = Math.floor(Math.random() * 75) > 69; 169 + const shouldShowFishie = Math.floor(Math.random() * 73) > 69; 164 170 if (shouldShowFishie) { 165 171 imageOverride = [ 166 172 { 167 173 image: "/lightbar-images/fishie.png", 168 174 sizeRange: [10, 13] as [number, number], 169 175 }, 176 + { 177 + image: "/lightbar-images/shark.png", 178 + sizeRange: [48, 56] as [number, number], 179 + }, 170 180 ]; 171 - imageParticleCount = particleCount / 2; 181 + imageParticleCount = particleCount * 0.9; // Adjusting the count to display significantly more fish than sharks 172 182 } 173 183 174 184 // Weed easter egg 175 - const shouldShowZa = Math.floor(Math.random() * 435) > 420; 185 + const month2 = date.getMonth() + 1; 186 + const day2 = date.getDate(); 187 + const shouldShowZa = 188 + (month2 === 4 && day2 === 20) || Math.floor(Math.random() * 425) > 420; 176 189 if (shouldShowZa) { 177 190 imageOverride = [ 178 191 { 179 192 image: "/lightbar-images/weed.png", 180 - sizeRange: [23, 28] as [number, number], 193 + sizeRange: [25, 28] as [number, number], 181 194 }, 182 195 ]; 183 196 imageParticleCount = particleCount / 2; 184 197 } 185 198 186 199 // Kitty easter egg 187 - const shouldShowCat = Math.floor(Math.random() * 83) > 50; 200 + const shouldShowCat = Math.floor(Math.random() * 50) > 45; 188 201 if (shouldShowCat) { 189 202 imageOverride = [ 190 203 { 191 204 image: "/lightbar-images/cat.png", 192 - sizeRange: [26, 30] as [number, number], 205 + sizeRange: [27, 32] as [number, number], 193 206 }, 194 207 ]; 195 208 imageParticleCount = particleCount / 2; ··· 203 216 const src = imageOverride[randomImageIndex]?.image; 204 217 const particle = new Particle(canvas, { 205 218 imgSrc: isImageParticle ? src : undefined, 206 - horizontalMotion: src?.includes("fishie"), 219 + horizontalMotion: src?.includes("fishie") || src?.includes("shark"), 207 220 sizeRange, 208 221 }); 209 222 particles.push(particle);
+14 -2
src/pages/parts/player/ScrapeErrorPart.tsx
··· 1 1 import { useMemo } from "react"; 2 - import { useTranslation } from "react-i18next"; 2 + import { Trans, useTranslation } from "react-i18next"; 3 3 import { useLocation } from "react-router-dom"; 4 4 5 5 import { Button } from "@/components/buttons/Button"; ··· 49 49 {t("player.scraping.notFound.badge")} 50 50 </IconPill> 51 51 <Title>{t("player.scraping.notFound.title")}</Title> 52 - <Paragraph>{t("player.scraping.notFound.text")}</Paragraph> 52 + <Paragraph> 53 + <Trans 54 + i18nKey="player.scraping.notFound.text" 55 + components={{ 56 + bold: ( 57 + <span 58 + className="text-white·font-bold" 59 + style={{ color: "#DADADA" }} 60 + /> 61 + ), 62 + }} 63 + /> 64 + </Paragraph> 53 65 <div className="flex gap-3"> 54 66 <Button 55 67 href="/"