Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read skip times of sites with their own aniskip implementations #753

Open
1 task done
ThaUnknown opened this issue Feb 7, 2023 · 0 comments
Open
1 task done

Read skip times of sites with their own aniskip implementations #753

ThaUnknown opened this issue Feb 7, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@ThaUnknown
Copy link

ThaUnknown commented Feb 7, 2023

Is your feature request related to a problem?

A lot of sites have their own aniskip implementations as of late [zoro, 9anime etc], and they don't really use aniskip API for it, instead use their own private backends.

Describe the solution you'd like

aniskip could read their metadata for it if their skip times exist and automatically upload it to aniskip API

Describe alternatives you've considered

there are 2 ways of solving this issue, the shit way, and the lazy way.

the shit way aka for the metadata in the obfuscated site code and the video player, possible but very yucky

the lazy way aka intercept network assets:

  • for intro data: zoro for example has /ajax/embed-6/getSources?id= so any request coming from that could be read and it's intro extracted, 9anime does it similarly
  • for duration: intercept m3u8 files and read their duration which is fairly easy to do:
    const regex = /^#EXTINF:(?:[0-9]*[.])?[0-9]+/gm
    let duration = 0
    for (const match of text.match(regex) || []) {
      duration += Number(match.slice(8))
    }

or read the video duration from the video element in the iframe

the network way seems by far the easiest and shouldn't be too troublesome to implement

Additional context

No response

Code of Conduct

  • I agree to fill in the correct information
@ThaUnknown ThaUnknown added the enhancement New feature or request label Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant