vixalien / muse

Youtube Music API (InnerTube) client for Deno, Node and the browser
https://deno.land/x/muse
MIT License
31 stars 5 forks source link

Section "audiobooks and shows" not shown #12

Open gregthwuen opened 1 month ago

gregthwuen commented 1 month ago

The section "audiobooks and shows" is not shown on an artist's profiles. The albums in question can still be found and played back by searching for them.

As an example, here's one of the affected artists: https://music.youtube.com/channel/UCkBOK5_V5AcQlye0TV2g0-A (you might not see all the items since most of them are premium-only)

Screenshot from 2024-05-18 02-23-40 Screenshot from 2024-05-18 02-21-35

vixalien commented 1 month ago

Yes. Audiobooks and podcasts are not explicitly supported by Muzika (and https://github.com/vixalien/muse). I don't know if the support is worth it to be honest. They will possibly be supported later.

gregthwuen commented 1 month ago

The way I understand it, a "Show" is just another album_type. Wouldn't adding this category simply consist of copying the logic of the existing categories?

I totally understand if that's not your priority, but if it's really this straight-forward I'd be willing to give it a try.

vixalien commented 1 month ago

The way I understand it, a "Show" is just another album_type.

Ah, I see. It's still going to get a bit complicated though. Here's a rough guide to get you started. You'll run into a few issues as the muse stuff isbt that documented yet, but you can give it a go.

First, you gotta download and prepare https://github.com/vixalien/muse by cloning it and then installing deno.land.

Then you're gonna log in by running the file.

deno run -A client.ts

Then you're going to want to add the audio books and shows section here https://github.com/vixalien/muse/blob/fda6e764a11db3e86669f75467aecdcc1bbdfb86/locales/strings.ts#L27 so we can automatically get different translations and be able to correctly get that info.

Then add the channel for the artist above here https://github.com/vixalien/muse/blob/fda6e764a11db3e86669f75467aecdcc1bbdfb86/locales/strings.ts#L210

Then you can run the locales/strings.ts script and make sure it runs completely without errors.

After that the locales/strings.json file will get updated. Check to see if the correct translations have been added in.

After that it's time to make sure that information shows up in channel pages (I'm assuming it's a channel, not an artist page). Add a line here https://github.com/vixalien/muse/blob/fda6e764a11db3e86669f75467aecdcc1bbdfb86/parsers/browsing.ts#L296 to get the audio books and shows.

To test all this, update the code in the client.ts file to call get_channel with the specified channel ID above. If all goes well, you should be able to see the information.

After that, the libmuse part will be done and we will need to update Muzika.

Sorryy this stuff is not really documented but I'm working on improving it and ask questions when you get confused.

gregthwuen commented 1 month ago

Thanks for the intro! I already played around with the library earlier, I'll definitely give it a try and let you know if it worked out :)