mirror of
https://github.com/ThaUnknown/miru.git
synced 2026-04-20 09:42:05 +00:00
fix: GPU flag stuff
This commit is contained in:
parent
ad53734aff
commit
6abc544d01
3 changed files with 12 additions and 5 deletions
|
|
@ -30,6 +30,7 @@
|
|||
/** @type {{ airingAt: number; episode: number; }[]} */
|
||||
let alEpisodes = episodeList
|
||||
|
||||
// fallback: pull episodes from airing schedule if anime doesn't have expected episode count
|
||||
if (!(media.episodes && media.episodes === episodeCount && media.status === 'FINISHED')) {
|
||||
const settled = (await anilistClient.episodes({ id })).data.Page?.airingSchedules
|
||||
if (settled?.length) alEpisodes = settled
|
||||
|
|
@ -37,6 +38,7 @@
|
|||
for (const { episode, airingAt } of alEpisodes) {
|
||||
const alDate = new Date((airingAt || 0) * 1000)
|
||||
|
||||
// validate by air date if the anime has specials AND doesn't have matching episode count
|
||||
const needsValidation = !(!specialCount || (media.episodes && media.episodes === episodeCount && episodes[Number(episode)]))
|
||||
const { image, summary, rating, title, length, airdate } = needsValidation ? episodeByAirDate(alDate, episodes, episode) : (episodes[Number(episode)] || {})
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "Miru",
|
||||
"version": "5.0.6",
|
||||
"version": "5.0.7",
|
||||
"private": true,
|
||||
"author": "ThaUnknown_ <ThaUnknown@users.noreply.github.com>",
|
||||
"description": "Stream anime torrents, real-time with no waiting for downloads.",
|
||||
|
|
|
|||
|
|
@ -4,18 +4,23 @@ import store from './store.js'
|
|||
export const development = process.env.NODE_ENV?.trim() === 'development'
|
||||
|
||||
const flags = [
|
||||
// not sure if safe?
|
||||
['disable-gpu-sandbox'],
|
||||
// not sure if safe?
|
||||
['disable-direct-composition-video-overlays'],
|
||||
// not sure if safe?
|
||||
['double-buffer-compositing'],
|
||||
['enable-gpu-rasterization'],
|
||||
// not sure if safe?
|
||||
['enable-zero-copy'],
|
||||
// not sure if safe?
|
||||
['ignore-gpu-blocklist'],
|
||||
['enable-hardware-overlays', 'single-fullscreen,single-on-top,underlay'],
|
||||
// dv, drdc display compositor uses 2 gpu threads instead of 1, rest is safe performance
|
||||
['enable-features', 'PlatformEncryptedDolbyVision,EnableDrDc,CanvasOopRasterization,ThrottleDisplayNoneAndVisibilityHiddenCrossOriginIframes,UseSkiaRenderer,WebAssemblyLazyCompilation'],
|
||||
['force_high_performance_gpu'],
|
||||
// disabling shit, vulkan rendering, native window occlusion calculation, widget layering aka right click context menus [I think] for macOS [I think]
|
||||
['disable-features', 'Vulkan,CalculateNativeWinOcclusion,WidgetLayering'],
|
||||
['autoplay-policy', 'no-user-gesture-required'], ['disable-notifications'], ['disable-logging'], ['disable-permissions-api'], ['no-sandbox'], ['no-zygote'],
|
||||
['bypasscsp-schemes']
|
||||
// utility stuff, aka website security that's useless for a native app:
|
||||
['autoplay-policy', 'no-user-gesture-required'], ['disable-notifications'], ['disable-logging'], ['disable-permissions-api'], ['no-sandbox'], ['no-zygote'], ['bypasscsp-schemes']
|
||||
]
|
||||
for (const [flag, value] of flags) {
|
||||
app.commandLine.appendSwitch(flag, value)
|
||||
|
|
|
|||
Loading…
Reference in a new issue