Skip to content

Spotify playlist - title and cover art problems again? #2501

Answered by TommyTaif
TommyTaif asked this question in Q&A
Discussion options

You must be logged in to vote

It looks like inc.viewFolderTree.php has a problem for me. It reads the stream address in line 117:
$uri = file_get_contents($subfolder."/spotify.txt");

But spotify.txt contains the address in a format like
spotify:album:4wjxmqXnSQvBZWL3IbYngX

The next line generating the URL seems to need
https%3A%2F%2Fopen.spotify.com%2Falbum%2F4wjxmqXnSQvBZWL3IbYngX

Not knowing much about php, I replaced line 118 with

$urisegments = explode(":", trim($uri));
$url = "https://open.spotify.com/oembed?url=https%3A%2F%2Fopen.spotify.com%2F".$urisegments[1]."%2F".$urisegments[2]."&format=json";

This works now fine (tested for albums and individual songs). I cannot understand why it was working fine the way i…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by TommyTaif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant