philippe44 / SpotConnect

Turn any UPnP or AirPlay player into a Spotify Connect device
MIT License
74 stars 3 forks source link

Spotraop does not respect port range for _spotify-connect._tcp port #37

Open gilliginsisland opened 7 months ago

gilliginsisland commented 7 months ago

When running spotraop, the spotify connect ports that are advertised via mdns are not chosen from the port range specified with the -a, the itunes control port is chosen from the range however.

When running with a firewall this prevents initial pairing of spotify credentials while the firewall is active. This can be worked around by using cli username and password or turning off the firewall, playing on each device at least once (to gen the credentials) and then turning it back on after.

It would be more ideal if the ports were chosen from the specified range however.

philippe44 commented 7 months ago

Fair point, I've fixed that in 0.9.2. Not perfect but should do

gilliginsisland commented 7 months ago

Thanks.

I should have opened with this, but thank you for this project, and for your airconnect project. I use both of these apps everyday!

Any chance you plan on adding a spotcast (spotify to chromecast) variant? I know that spotify can send to chromecast natively, but it times out eventually and isn't as reliable as something running on a headless server maintaining the stream.

philippe44 commented 7 months ago

No worries - I'm glad you find these useful. Regarding sending to a CC, it's not really possible unfortunately as the apps that are sent in the devices are vendor specific and certified by Google which make the runtime environment impossible to emulate. In other words, you can't make a fake chromecast as they not only exchange data according to a protocol, but they host closed application that are loaded at play.

gilliginsisland commented 7 months ago

I meant the opposite way.

In the same way as you have spotraop = spotify_connect => airplay, spotupnp = spotify_connect => upnp, you would have spotcast => spotify_connect => cast,

I know that Spotify can already cast directly to a chromecast, and technically if you start playing from your iphone to a chromecast and you close the app, the song will continue playing because the chromecast runs the spotify receiver and operates independent of the phone. The problem is that eventually the chromecast will stop playing if the spotify app is not left open.

Your spotraop application is much more reliable and I figured that since you already have the airplay => cast bridge, that you would be able to reuse that logic for spotify_connect => cast.

philippe44 commented 7 months ago

ah, this way, yes I thought about it but as you said, Spotify can cast directly. I understand your point but I'd say there is a likely a "limited" general interest for such bridge. Even the these SpotConnect bridges seem to have much less success than I anticipated (especially compared to AirConnect whose popularity, on the other hand, surprised me). And yes I have all the bits and pieces but still, this is yet another piece of work and I'm really overloaded with too many projects.