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

Game Categories List Per VoD? #317

Open
AdamGaffney96 opened this issue Nov 23, 2023 · 3 comments
Open

Game Categories List Per VoD? #317

AdamGaffney96 opened this issue Nov 23, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@AdamGaffney96
Copy link

Hi there, first off I love the app, been running it for a while now and I find it so much nicer and less awful to use than Twitch's VoD player. The only thing I feel like it critically missing is a list of which games have been played in the VoD. I don't even mind about it being timestamped or anything, it's easy enough to seek through a video to find it, however when you have a large archive it would be nice to just find the VoD's with the games you are interested in at a glance.

I assume this is info that can be fetched from the Twitch API as there is already the feature to filter downloads by game when setting up a watched channel, but are there any limitations that would cause this to not be pulled through? And if not, is it already pulled through and I'm just missing it?

Thanks,
Adam

@Zibbp
Copy link
Owner

Zibbp commented Nov 23, 2023

This is possible using the GraphQL API and is already used to filter games as you said.

func GQLGetChapters(id string) (GQLChapterResponse, error) {
body := fmt.Sprintf(`{"operationName":"VideoPlayer_ChapterSelectButtonVideo","variables":{"videoID":"%s","includePrivate":false},"extensions":{"persistedQuery":{"version":1,"sha256Hash":"8d2793384aac3773beab5e59bd5d6f585aedb923d292800119e03d40cd0f9b41"}}}`, id)
resp, err := gqlChapterRequest(body)
if err != nil {
return resp, fmt.Errorf("error getting video chapters: %w", err)
}
return resp, nil
}

I can have this run before the video JSON manifest is saved and include it in that. I'll probably also end up creating a database table to hold these as well so it's easier to query.

The player already supports chapters so I just need to get that information into the player which would look something like this
image

@Zibbp Zibbp added the enhancement New feature or request label Nov 23, 2023
@AdamGaffney96
Copy link
Author

I wonder, would this be something only available for VoD's going forward, or would it be possible to refresh this metadata for existing VoD's (if they still exist on Twitch of course)?

@Zibbp
Copy link
Owner

Zibbp commented Nov 23, 2023

I can create a task that will go through all vods and run a function to add this information. I can for sure add the chapters to the database and most likely to the info.json file as well.

Maybe a future version 2 of this could allow manual chapter creation via the ui.

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

2 participants