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

[Feature Request]: Support for 6K Labs' Amuse Plugin #2546

Open
2 tasks done
AsuToki360 opened this issue Oct 24, 2024 · 13 comments · May be fixed by #2723
Open
2 tasks done

[Feature Request]: Support for 6K Labs' Amuse Plugin #2546

AsuToki360 opened this issue Oct 24, 2024 · 13 comments · May be fixed by #2723
Labels
enhancement New feature or request

Comments

@AsuToki360
Copy link

Preflight Checklist

  • I use the latest version of YouTube Music (Application).
  • I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Problem Description

I usually put some music on my streams, and I really like this app, it's just missing a feature that has the other YT Music Desktop client to make it work with the Amuse plugin which shows the title and artist info, etc.
It's the "Remote Control" option, when that is enabled in the other client it does work with the Amuse plugin, however I would like to hear my music with no ads, and that client doesn't have an ad-blocker.
image
At the moment I'm writing this I haven't even found a similar option in this client, making the Amuse page a bit useless for my streams.

Proposed Solution

Add a similar option in this client or add a similar option, if possible.

Alternatives Considered

I'm thinking of something similar could happen if I tried the Tuna OBS plugin, although I haven't tested it yet.

Additional Information

No response

@JellyBrick JellyBrick added the enhancement New feature or request label Oct 24, 2024
@ArjixWasTaken
Copy link
Contributor

I'd assume OBS plugins like that would support mpris metadata (on unix) and whatever alternative windows has.
It is information provided to the OS.

image

@h-banii
Copy link
Contributor

h-banii commented Oct 26, 2024

Apparently, despite Amuse saying they have "youtube music support", they actually mean ytmdesktop specifically

amuse: https://docs.6klabs.com/docs/accounts-apps/youtube-music
ytmdesktop API: https://github.com/ytmdesktop/ytmdesktop/wiki/Remote-Control-API

Amuse seems to be closed source and requires login to use, so I couldn't find much

@ArjixWasTaken
Copy link
Contributor

They do give an option of connecting specifically to "th-ch/youtube-music", they have a drop-down when customizing the "connection" settings.

The issue is that they are asking for an IP and port, which doesn't make sense, and the guide they have is for ytmdesktop

@ArjixWasTaken
Copy link
Contributor

I didn't test if they supported our new http api, but I highly doubt that.

@ArjixWasTaken
Copy link
Contributor

As a former maintainer and current contributor, thankfully I can say "fuck it" and not work on this.

If a proprietary service does not give good documentation, and they would make profit from us supporting them...there is no motivation to actually support them.

They could make a PR to fix this, it honestly would be a 30 minute job if given the proper knowledge of how their API works.

(this is my personal opinion and doesn't necessarily reflect the opinion of the maintainers and other contributors)

@ne0lines
Copy link

ne0lines commented Dec 9, 2024

Is this happening? I know the Amuse team are interested in supporting this.

@ArjixWasTaken
Copy link
Contributor

If anyone with knowledge on undocumented APIs for amuse is willing to make a PR, yes.

Otherwise, no.

Their documentation last time I checked is incomplete.

@HetIsJoey
Copy link

Id love to implement this in my NowPlaying Widget: https://nowplaying.site/ using the new api-server plugin, although I do have some questions about it.

@MaxLikesCode
Copy link

@ArjixWasTaken Hey, the developer of 6K Labs here. A forked version of this youtube music application by iryis, who made it to make it work with Amuse, is actually currently in use. I tried the new api server, but there are some issues I encountered. I'd like to talk to you about it as well as giving you the documentation you were looking for.

@ArjixWasTaken
Copy link
Contributor

ArjixWasTaken commented Dec 11, 2024

I'm all aboard then!

PS: I'd prefer if you could share this information in this issue, so that other contributors can view it as well.

@MaxLikesCode
Copy link

I'm all aboard then!

PS: I'd prefer if you could share this information in this issue, so that other contributors can view it as well.

Sounds great! First of all, thank you for maintaining and contributing to this app. I really like it myself and it offers a very smooth experience.

I was about to report an issue regarding the elapsed seconds not updating when querying /song-info, but after some digging, I found out that @Azorant had actually created a fix for it based on this issue, which described my problem exactly. I was wondering why I was still experiencing the issue but then realized that the fix was made on October 28, roughly two weeks after the most recent release, v3.6.2, on October 16. It seems all that’s needed for it to work is a new build, assuming the pull request did indeed fix it. When do you think a new release will be possible? If there’s anything I can do to help, please let me know.

Additionally, since Amuse is so popular and people love this YouTube Music desktop app, especially because it has an ad blocker, I think it would make sense to have a dedicated plugin for Amuse. Since the api server can change over time, I’d like to have the peace of mind that the plugin remains stable and stays in sync with Amuse's development. Maybe we can get @iryis in the boat to port their implementation with some changes into the main branch since theirs worked great so far. If I remember correctly, iryis was waiting for the api server to be merged so they could port their implementation into the main branch, making use of the api server.

While the documentation isn’t too strict yet and instead adapts to whatever the app offers, having some standards would be beneficial. A few potential rules could be:

  1. The app should be able to be called from a port on localhost.
  2. The endpoint should be able to handle 60 requests per minute.

I've seen some apps put rate limiters on localhost queries. While I appreciate their security measures, I think this is a bit much.

Another standard could be ensuring that the endpoint returns at least the following values:

  • title
  • artist
  • duration
  • elapsedSeconds
  • isPlaying
  • coverUrl

I'm not sure if isAdvertisement can be implemented or if YouTube doesn’t expose that information or if it’s just too difficult to scrape it efficiently. That said, as far as I can tell, the api server already meets all these requirements.

@iryis
Copy link

iryis commented Dec 14, 2024

Apparently, despite Amuse saying they have "youtube music support", they actually mean ytmdesktop specifically

amuse: https://docs.6klabs.com/docs/accounts-apps/youtube-music ytmdesktop API: https://github.com/ytmdesktop/ytmdesktop/wiki/Remote-Control-API

Amuse seems to be closed source and requires login to use, so I couldn't find much

Amuse backend currently conforms to their project's no longer used APIs for Youtube Music support. My fork is simply a mapping of SongInfo to ytmdesktop data structure.
I can port this over mostly 1 to 1 if that is okay, otherwise it would require a few changes on @MaxLikesCode's end as they are similar but not the same; plus it wouldn't be backwards compatible with however-many users are currently using that fork if the structure is changed.

@ArjixWasTaken
Copy link
Contributor

@iryis a 1:1 porting should be fine, as long as the code is not total spaghetti 🤣
if you need help reviewing the code, etc feel free to tag me in your PR

@iryis iryis linked a pull request Dec 16, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

8 participants