mherger wrote: > > Ok, you seem to be pretty technical :-). Could you please try to replace > > http with https (or vice versa) for one of those non-working URLs? Would > > they work then (using curl or the like)? > > -- > > Michael
I find that Tidal works equally well with both http:// and https:// schemes, I can even interchange them within a session. I know what follows will not be helpful to everyone. But if you are a developer-type AND you have a Tidal premium account AND you understand how to obtain a Tidal sessionId from the TidalAPI, then you may be able to apply this temporary local fix. It gets the streamUrl directly from Tidal and substitutes it for the streamUrl obtained from mysqueezebox.com 0. Obtain a Tidal sessionId. They are valid for a very long time (months). You can sniff an existing web session, use Chrome Developer Tools, or use this python library (https://pypi.org/project/tidalapi/) 1. In a terminal, cd to the location of your squeezeboxserver Perl modules. For many Linuxes, this will be /usr/share/perl5, but can vary. 2. Now cd to Slim/Plugin/WiMP 3. Start editing the file ProtocolHandler.pm 4. Find the subroutine _gotTrack (line 243 in the current commit, YMMV) and modify the initial code so you end up with something like this: Code: -------------------- sub _gotTrack { my ( $client, $info, $params ) = @_; # START of workaround for bad streamUrls from www.squeezebox.com # my $tidalInfo; my $tidalSessionId = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' #INSERT YOUR TIDAL SESSIONID HERE if ($info->{id}) { main::DEBUGLOG && $log->is_debug && $log->debug('Calling TidalAPI directly for streamUrl of track ' . $info->{id}); my $tidalUrl = 'http://api.tidalhifi.com/v1/tracks/' . $info->{id} . '/streamUrl?sessionId=' . $tidalSessionId . '&countryCode=US&limit=999&soundQuality=LOSSLESS'; my $response = LWP::UserAgent->new->get( $tidalUrl ); $tidalInfo = eval { from_json( $response->content ) }; if ($tidalInfo->{url}) { main::DEBUGLOG && $log->is_debug && $log->debug('Substituting url: ' . $tidalInfo->{url}); $info->{url} = $tidalInfo->{url}; } } # END of workaround for bad streamUrls from www.squeezebox.com # my $song = $params->{song}; -------------------- The line my $song = $params->{song}; is where the original code picks up. Save your changes. 5. Find the subroutine _getTrack and within this routine change the line: Code: -------------------- if ( $@ || $info->{error} ) { -------------------- to Code: -------------------- if ( $@ ) { -------------------- This is line 205 in the current commit, YMMV. I found this necessary because even with (or maybe because of) the streamUrl replacement, MSB.com is generating additional errors about the SqueezeNetwork session not have Streaming privileges. 6. Restart LMS. I'm so sorry this is probably obtuse for non-developers, but I offer it as a temporary fix that will get some of us though the weekend with our Tidal tunes :-). Hopefully, those with the proper access to MSB.com will sort out why the streamUrls from there are so wrong. --Carl ------------------------------------------------------------------------ csmig's Profile: http://forums.slimdevices.com/member.php?userid=37011 View this thread: http://forums.slimdevices.com/showthread.php?t=112300 _______________________________________________ squeezenetwork mailing list [email protected] http://lists.slimdevices.com/mailman/listinfo/squeezenetwork
