-
-
Notifications
You must be signed in to change notification settings - Fork 198
Add Pandora provider #2503
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
base: dev
Are you sure you want to change the base?
Add Pandora provider #2503
Conversation
|
Interesting work. I have used pianobar for many years and it works very well. Have you looked to that code for how to use the api? |
|
Thanks for the suggestion! I’ve reviewed pianobar’s implementation, but there’s a key concern: pianobar uses extracted partner keys from official Pandora clients and encryption meant for specific devices. Pandora has explicitly stated that pianobar “is an unauthorized third-party application, and using it is a violation of our Terms of Use.” While they’ve tolerated it for years, it’s technically unauthorized. |
| async def browse(self, path: str) -> list[Radio]: | ||
| """Browse radio stations.""" | ||
| # For now, just return all stations like get_library_radios | ||
| # Could be enhanced with categories/genres in the future | ||
| return [station async for station in self.get_library_radios()] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can be left out if you dont support this yet. So the default implementation can be used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried removing that but then there is nothing seen when browsing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, it will only work after the first sync was completed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After the sync I see the stations in the radio view but there is nothing when I browse to Pandora? This is after I see this in the log
2025-10-28 11:40:25.015 INFO (MainThread) [music_assistant.music] Sync task for Pandora/radios completed
Co-authored-by: Marcel van der Veldt <[email protected]>
…rough an exception Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
| # Is this what is envisaged to pass the static variables? | ||
| # MultiPartPath( | ||
| # path=f"{self.mass.streams.base_url}/{self.instance_id}_stream?" | ||
| # f"station_id={item_id}&track_num={i}&queue_id={queue_id}" | ||
| # f"&queue_item_id={queue_item_id}", | ||
| # ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, here you can pass whatever you want
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, so I understand where we are at is these two questions:
How to pass queue_id/queue_item_id properly?
How to sync metadata updates with actual playback timing?
This PR introduces a new Pandora Music Provider focused exclusively on Radio Station playback.
Key Features
Radio Integration: Allows users to access and play their saved Pandora radio stations within Music Assistant.
Authentication: Uses the web-based Pandora REST API (username/password login) to retrieve the user's station list.
Streaming: Streams are served by fetching multiple playlist fragments from Pandora, assembling a multi-part path for continuous playback. Station promos also play.
🛑 Scope Limitations (API Constraint)
This provider is limited to Radio Stations Only and does not support search or station creation.This constraint is due to Pandora's API structure:
The REST API used here only provides access to login, station lists, and playback fragments.
Features like Search and Station Creation are restricted to Pandora's separate GraphQL API, which requires a completely different OAuth authentication flow and developer credentials.
Thus users must continue to create stations on the official Pandora app/website, and those stations will then automatically appear in MA.
There is no metadata for tracks as I'm not sure how to get that back when there are multiple URLs being streamed?
⏱️ Streaming Time Limit
The provider build a dummy list of 1000 URLs which should ensure playback lasts for more than 2 days.