Skip to content

Added spotify playback and other stuff - #83

Open
sushant2812 wants to merge 4 commits into
ldelvoye:mainfrom
sushant2812:spotify-playback
Open

sushant2812 wants to merge 4 commits into
ldelvoye:mainfrom
sushant2812:spotify-playback

Conversation

@sushant2812

Copy link
Copy Markdown

Added support for Spotify playback and:

  • Queuing songs
  • Playing albums
  • Search Functionality
image image image

@sushant2812 sushant2812 changed the title Added spotify playback/ Added spotify playback and other stuff Sep 12, 2026

@ldelvoye ldelvoye left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall the feature is really cool. I really appreciate the PR, it seems like your implementation agent took the liberty to overwrite important architectural and implementation quality rules (architecture.md, CONTRIBUTING.md). If things were unclear for your agent please let me know and I'll try to patch things up.

Lastly, this PR bundles four changes: a shell write seam, transport controls, search + picker, and album art with a new dependency. Those could definitely be shipped as separate PRs where we can validate and let features soak.

Comment thread test.py

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

architecture: this is the scratch CLI the ASCII module was ported from, this should be deleted?

return
enabled = not state.shuffle

def work(credentials, http):

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

architecture: the panel is only supposed to draw, talking to spotify is the source's job, and deciding when to call the source is the shell's job. Here the panel picks the function and the arguments itself

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rule that catches this (test_seams.py) was ignored

Comment thread src/smorg/shell/panel.py
self.panel = panel
self.item = item

class CredentialWorkRequested(Message):

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The shell runs code it can't identify. The shell is meant to know what an integration is doing, so it can gate it later. Here it's handed a closure and told "run this", with no way to tell a shuffle toggle from anything else.

Comment thread src/smorg/shell/panel.py
from smorg.shell.refresh_indicator import RefreshIndicator
from smorg.shell.terminal_palette import StatusColors, status_colors, widget_background

if TYPE_CHECKING:

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The panel base class now knows about credentials. Credentials were only ever the shell's and auth's business. Now every panel's base class has them in its signature.

Comment thread docs/architecture.md

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't change the architecture requirements

def _run_mode_change(self, work, verb: str) -> None:
self._work_pending = True
self.post_message(
Panel.CredentialWorkRequested(

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cost: refresh_on_success is True here, so one shuffle toggle costs the PUT, then player, queue, recently-played and the cover download again. Cache the cover by url, or skip the refresh for mode changes the panel already knows the outcome of

Comment thread pyproject.toml
dependencies = [
"httpx>=0.28",
"keyring>=25.0",
"pillow>=12.3.0",

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dependency: 12.3.0 is the version that happened to be installed, not the oldest that works. Also a hard dependency for one integration's cosmetic feature, worth a thought

else:
repeat_glyph = "🔁 off"

columns = (

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code quality: these hints hardcode keys the manifest already declares. Change the manifest and the bar lies, read them from the actions instead

work = queue_selected
elif isinstance(chosen, (Album, Playlist)):
if action is _SearchAction.QUEUE:
self.notify("only songs can be queued", severity="warning")

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code quality: unreachable, the queue picker already filters to tracks

Comment thread docs/architecture.md
| | MCP transport | REST transport |
| ---------------- | ------------- | -------------- |
| **OAuth** | Linear | — |
| **OAuth** | Linear | Spotify |

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep this row: Spotify was already OAuth + REST on main while the doc still called it a roadmap candidate. It's the prose above that has to go back, not this

This branch has not been deployed

No deployments
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.

2 participants