Skip to content

feat(Bugs): Implement Bugs! provider#213

Merged
kellnerd merged 1 commit into
kellnerd:mainfrom
Maxr1998:bugs-provider
Jun 24, 2026
Merged

feat(Bugs): Implement Bugs! provider#213
kellnerd merged 1 commit into
kellnerd:mainfrom
Maxr1998:bugs-provider

Conversation

@Maxr1998

@Maxr1998 Maxr1998 commented May 1, 2026

Copy link
Copy Markdown
Contributor

Bugs! is a South Korean digital streaming service that also offers digital downloads (FLAC or MP3). This provider uses the mobile app's API, which requires an access token that can be obtained from a separate endpoint using the client credentials of the app. The device ID is usually queried from the device the app is running on, but can be any random value as it doesn't seem to be validated. Thus, it's set to a hardcoded value which can optionally be overridden through an environment variable. The brand color and icon have been taken from the website.

To implement this change, I used the help of an AI tool (namely Claude Code using the Sonnet 4.6 model), which created the Bugs! API types from the HAR log captured from my device with HTTP Toolkit, and wrote the initial provider implementation and tests scaffold. Regardless, all code changes have been personally reviewed by me, and I take full responsibility for them. I also selected and wrote the test cases myself.

Inspired by and closes #202.

Comment thread providers/Bugs/api_types.ts
Comment thread providers/Bugs/mod.ts Outdated
Comment thread providers/Bugs/mod.ts Outdated
@kellnerd kellnerd added feature New feature or request provider Metadata provider labels May 1, 2026
@kellnerd kellnerd self-assigned this May 1, 2026

@kellnerd kellnerd left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, this is looking good already! I only have a few comments until I get to test the new provider myself.

Comment thread providers/Bugs/mod.ts Outdated
Comment thread providers/Bugs/api_types.ts
Comment thread providers/Bugs/mod.test.ts Outdated
Comment thread providers/Bugs/mod.ts
Comment thread providers/Bugs/mod.ts Outdated
Comment thread providers/Bugs/mod.ts Outdated
Comment thread providers/Bugs/mod.ts Outdated
Comment thread providers/Bugs/mod.ts Outdated
@Maxr1998 Maxr1998 force-pushed the bugs-provider branch 2 times, most recently from 5e88563 to 89ee095 Compare May 1, 2026 23:23
@Maxr1998 Maxr1998 requested a review from kellnerd May 1, 2026 23:24
@Maxr1998

Maxr1998 commented May 1, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the thorough review! I think I caught & fixed everything. I left your comments open so that you can verify and resolve them yourself. Once the review is complete and before this is merged, I'd like to squash the second commit so that the client secret is removed from the history again.

@Maxr1998

Copy link
Copy Markdown
Contributor Author

I just rebased the PR to fix the conflicts, please let me know if you need anything else.

@kellnerd kellnerd left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your patience, I've finally found the time to test the provider and it's looking solid as far as I can tell.
You can now squash your commits (and reword the slightly outdated message) if you want (and still remember all the details after the long delay, sorry for that).
Otherwise I can also do that. I've made two minor changes locally (setting the new category "digital", and error handling for missing credentials) which I will push after the merge.

P.S. One of your example releases made me realize that I haven't given Hangul a proper weight in utils/script.ts yet, which makes the detected scripts 86% Latin and only 14% Hangul. By giving Hangul a weight of 3, we would get more reasonable 67% and 33%. What do you think? These values would then be below the threshold where Harmony seeds the scripts.

Bugs! is a South Korean digital streaming service that also offers digital downloads (FLAC or MP3). This provider uses the mobile app's API, which requires an access token that can be obtained from a separate endpoint using the client credentials of the app.
The required client secret has to be provided as an environment secret named HARMONY_BUGS_CLIENT_SECRET.
The brand color and icon have been taken from the website.

To implement this change, I used the help of an AI tool (namely Claude Code using the Sonnet 4.6 model), which created the Bugs! API types from the HAR log captured from my device with HTTP Toolkit, and wrote the initial provider implementation and tests scaffold. Regardless, all code changes have been personally reviewed by me, and I take full responsibility for them. I also selected and wrote the test cases myself.

Assisted-by: Claude:claude-sonnet-4.6
@Maxr1998

Copy link
Copy Markdown
Contributor Author

Thank you for your patience, I've finally found the time to test the provider and it's looking solid as far as I can tell. You can now squash your commits (and reword the slightly outdated message) if you want (and still remember all the details after the long delay, sorry for that). Otherwise I can also do that. I've made two minor changes locally (setting the new category "digital", and error handling for missing credentials) which I will push after the merge.

No worries, and thanks for your review. I have squashed the two commits now (force-push diff is empty), and reworded the message to mention the client secret and drop the device ID. Had to do some reading in the review comment history to remember what happened to it but thankfully it's all documented 😄

P.S. One of your example releases made me realize that I haven't given Hangul a proper weight in utils/script.ts yet, which makes the detected scripts 86% Latin and only 14% Hangul. By giving Hangul a weight of 3, we would get more reasonable 67% and 33%. What do you think? These values would then be below the threshold where Harmony seeds the scripts.

That seems fair. I have once read the argument that releases should somewhat bias the most specific language/script, which would be Korean/Hangul in this case. Increasing the weight does exactly that, so I'm all for it.

@kellnerd kellnerd merged commit 757b9e0 into kellnerd:main Jun 24, 2026
@Maxr1998 Maxr1998 deleted the bugs-provider branch June 24, 2026 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request provider Metadata provider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bugs!

2 participants