PodFetch icon indicating copy to clipboard operation
PodFetch copied to clipboard

making Spotify Podcasts accessible to your favourite Podcast client

Open alexanderadam opened this issue 2 years ago • 14 comments

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. :wink:

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

  • [X] Follow our Code of Conduct
  • [X] Read the Contributing Guide.
  • [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

alexanderadam avatar May 24 '23 21:05 alexanderadam

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.

SamTV12345 avatar May 27 '23 15:05 SamTV12345

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?

alexanderadam avatar May 27 '23 16:05 alexanderadam

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.

SamTV12345 avatar May 27 '23 18:05 SamTV12345

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.

alexanderadam avatar May 27 '23 19:05 alexanderadam

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

SamTV12345 avatar May 27 '23 21:05 SamTV12345

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 😄

alexanderadam avatar May 28 '23 06:05 alexanderadam

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.

SamTV12345 avatar Jun 07 '23 20:06 SamTV12345

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 avatar Jun 07 '23 21:06 alexanderadam

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?

alexanderadam avatar Jun 07 '23 21:06 alexanderadam

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.

SamTV12345 avatar Jun 07 '23 22:06 SamTV12345

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 ?

alexanderadam avatar Oct 15 '23 14:10 alexanderadam

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

SamTV12345 avatar Oct 15 '23 16:10 SamTV12345

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

hugolinhares avatar Nov 03 '23 01:11 hugolinhares

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.

SamTV12345 avatar Aug 12 '24 18:08 SamTV12345