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

making Spotify Podcasts accessible to your favourite Podcast client #143

Open
3 tasks done
alexanderadam opened this issue May 24, 2023 · 14 comments
Open
3 tasks done
Labels
enhancement New feature or request

Comments

@alexanderadam
Copy link

alexanderadam commented May 24, 2023

Clear and concise description of the problem

Just think about it: what if PodFetch would have support for other 'proprietary Providers' like Spotify?
Platforms like Spotify claim to have Podcasts yet the original idea of Podcasts were standardised RSS feeds and sadly not every 'Podcast' on Spotify has an RSS feed. Often their Podcasts are only accessible within their own client or 'hacks' like this one.

There are some feeds that are accessible and some that aren't.
So I'm thinking that global or user specific provider credentials (i.e. for Spotify in this case) could be added and PodFetch would handle it like a regular RSS feed and provide a proper mirrored feed for it, too.

This would also help in cases where some Podcasts are region restricted and there fore liberate knowledge for people on different levels. Furthermore it might keep the web open (1, 2, 3).

PS: It would probably also make sense to integrate Podcast results from Spotify search
PPS: This is surely a tough feature but I thought the same with my last idea and you mastered this feature super quickly so I'm not sure you're considering things a difficult when I think they are. 😉

Suggested solution

Apparently there are crates like rspotify, spotify_api, spotify and many others that abstract the provider specific API calls.

Alternative

There were projects like this one

Additional context

No response

Validations

@alexanderadam alexanderadam added the enhancement New feature or request label May 24, 2023
@SamTV12345
Copy link
Owner

There is a mention in the documentation. I have no idea if this is legal as I would circumvent their security mechanisms:

The technical details: Spotify's anon-podcast.scdn.co server has been
discontinued. This served as an unauthenticated proxy server for podcast
episode audio. They have switched to streaming directly from the
podcast's source server. For non-exclusive podcasts, that is simply
whatever is in the RSS feed (in which case, you can access those
podcasts directly without Spotifeed's help). For exclusive podcasts,
Spotify is using their audio-fa.scdn.co server, which appears to be
using a chunked MP4 stream that is not usable by general podcast
clients. That means Spotifeed would have to re-host the podcast audio
files to make those downloadable, which is not feasible or legal.

@alexanderadam
Copy link
Author

alexanderadam commented May 27, 2023

I don't have any clue about the legal state of it either.
Should I close this issue then or might it be implemented anyway since it's the responsibility of the administrator whether or how this feature is used?

@SamTV12345
Copy link
Owner

You could leave it open for now. Maybe someone has an idea on how to do that without having the Spotify legal team sueing you.

@alexanderadam
Copy link
Author

How about having this feature disabled behind an ENV variable that makes it super obvious that the contributors won't take any responsibility about its usage.

Something like

ACTIVATE_SPOTIFY_SYNC_WITHOUT_ANY_RESPONSIBILITY_OF_THE_CONTRIBUTORS_AND_MAINTAINERS=yes

And maybe writing something like this in the license might make sense as well I guess.

Some Bittorrent client maintainers have these lines included:

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

@SamTV12345
Copy link
Owner

Something like this should be appropriate. But it can take some time.

@alexanderadam
Copy link
Author

Something like this should be appropriate. But it can take some time.

I fully understand that.
I'm still not sure how you were able to implement the gPodder API this fast 😄

@SamTV12345
Copy link
Owner

Spotify is the ridiculous company I have ever thought they would be. They send every 5-10 seconds rolling keys that encrypt the next part of the chunk. In order to decrypt an hour long play you need to listen to the full podcast. Doing this automatic would trigger the Google Captcha on their side as I would need to run this in a real browser to get the keys. You don't even have an audio tag or something else that streams from an url. Everything is handled via GraphQL resulting in so many requests and traffic that I'm astonished that this company still exists.

TLDR: I have no idea how I would start with this task. Spotify seems to have won on that and there is no possibility to download a podcast.

@alexanderadam
Copy link
Author

alexanderadam commented Jun 7, 2023

Today I learned about this, this and this.

This is indeed ridiculous.
Well, I guess I should close this then.

Thank you that you took the time to look into this though. I'm sure that it would've been a huge selling point for many.

@alexanderadam
Copy link
Author

alexanderadam commented Jun 7, 2023

I guess spotifyd is doing exactly this, right?

Would it somehow be possible to integrate spotifyd to dump the files one by one in the background?

@SamTV12345
Copy link
Owner

I'm not sure if that works either. If I read correctly running this is similar to the desktop app. I'm not sure if this performs any download and you need a premium subscription.

@alexanderadam
Copy link
Author

Btw I'm not sure whether I should keep this issue closed or open.

The Podgrab issue is open too.

Maybe someone who sees this ticket as open, has further input.

What do you think @SamTV12345 ?

@SamTV12345
Copy link
Owner

Yes. Let's reopen this. There is also a new crate available: /~https://github.com/librespot-org/librespot

@SamTV12345 SamTV12345 reopened this Oct 15, 2023
@hugolinhares
Copy link

hugolinhares commented Nov 3, 2023

Hey, I have found this project that might help: /~https://github.com/Yetangitu/Spodcast/

@SamTV12345
Copy link
Owner

Hmm. How would I use that? It's written in Python so I would have to invoke it via CLI. Maybe a rewrite in Rust as an actual library would work.

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

3 participants