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

Support loading premium exclusive albums for premium accounts #1636

Merged
merged 5 commits into from
Oct 26, 2024

Conversation

gechoto
Copy link
Contributor

@gechoto gechoto commented Oct 5, 2024

This change makes premium-exclusive albums visible on artist pages - given the user is logged in and has an active music premium subscription

Fixes #1630

@gechoto
Copy link
Contributor Author

gechoto commented Oct 5, 2024

NOTE:
I couldn't test the function in artistItemsContinuation yet because the continuation is broken currently

For some reason you set continuation = null here:

UPDATE: New PR is up fixing this: #1637
Also tested the continuation with premium albums now. Works.

@gechoto
Copy link
Contributor Author

gechoto commented Oct 5, 2024

Only downside is that we have to send the login cookie in more places so it makes it slightly worse for privacy.
However they already know what we listen to since we send the cookie with each player request anyways.
This only makes a difference in case someone opens an artist page but does not start listening to any song from them.

Note: for now the login cookie is not sent on search requests. This means that premium albums will not show in searches but only when opening artist pages.
This makes it a bit better privacy wise.

@gechoto
Copy link
Contributor Author

gechoto commented Oct 12, 2024

I now added a toggle to the settings for this:

This is OFF by default.
This makes it better for privacy because users can turn it on only when needed.

@z-huang let me know what you think and if this is fine code wise


Btw. now that we have this toggle I could also try to add premium albums on search.

@gechoto
Copy link
Contributor Author

gechoto commented Oct 13, 2024

I just added login support for searches. Also renamed the option:

Enabling this now uses the login cookie on artist pages and when using the search bar

@z-huang
Copy link
Owner

z-huang commented Oct 16, 2024

Once you're logged in your account, you don't have pure privacy. Therefore, I think we can send cookies as long as the api needs login information to respond more information or unlock some features. What do you think?

@gechoto
Copy link
Contributor Author

gechoto commented Oct 17, 2024

Once you're logged in your account, you don't have pure privacy.

I think we should still try to find a balance here. For most users it is not necessary to send the login cookie with every request so we should not force them to.
(Personally I also don't like it and disable it when I know it is not needed currently.)

Especially with the recent changes now YTM forces users to log in, see issues like these:
#1614
#1653

So I guess many users now log in only to avoid the playback issues.
All these users need is sending the cookie with the player request but nothing else.
I think it makes sense being able to limit the cookie usage to that to keep InnerTune still somewhat privacy focused at least as best as we can.

What do you think?

I think this toggle is pretty cool and we should keep it.

Besides privacy another nice thing I noticed while using it the last few days:
YTM does not mark premium-only content. Once you are logged in you don't know anymore what content is free and what is premium exclusive.
Having this toggle helps me for example because I can quickly switch to a logged-out view to see what content is free and what I can share with my friends who don't have a premium subscription.

So yeah, good to have the option.

@gechoto
Copy link
Contributor Author

gechoto commented Oct 17, 2024

Btw I now send the cookie on all browse request if the option is enabled.
This makes the code a bit simpler and I think it is more what people would expect when enabling such an option.

Also changed the description to reflect that:

@z-huang lmk if you have any more questions or feedback I should consider

@gechoto
Copy link
Contributor Author

gechoto commented Oct 26, 2024

@z-huang I don't like to stress but unfortunately my premium runs out soon and I'm not sure yet if I will extend the subscription. If I can't get everything working that I need I might have to switch to a different streaming service and cancel premium for now. But this means I can't test anymore if anything comes up.

Not sure what is going on in your life but it would be cool to know approximately when you can review this. If you need a longer time it will be okay, I only want to know.

@z-huang
Copy link
Owner

z-huang commented Oct 26, 2024

I understand your concern. This PR looks okay, so I'll merge it right away. Is there anything else you need?

@z-huang z-huang merged commit 9feaa23 into z-huang:dev Oct 26, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Premium exclusive albums
2 participants