php-soundcloud icon indicating copy to clipboard operation
php-soundcloud copied to clipboard

Updating playlist hangs for an unusually long time

Open alexweinstein opened this issue 7 years ago • 0 comments

New and strange behavior while editing playlists. Not sure if this is a php-soundcloud issue or SoundCloud API.

Running the code below, will cause the browser to hang. The playlist metadata (on SoundCloud.com) is actually updated immediately, but echo 'success'; doesn't get triggered for 20-30 seconds.

This only happens when editing playlists, editing track metadata behaves normally.

<?php

require_once('vendor/autoload.php');

$client = new SoundCloud\Client('xxxxxxxxxx', 'xxxxxxxxxx');
$client->setAccessToken("1-xxxxxx-xxxxx-xxxxxxxxxxx");
$playlist_id = "xxxxxxxxxx";
$title = "New Title";

$client->put("playlists/".$playlist_id, array("playlist[title]"=>$title));

echo "success";

composer.json

{
    "repositories": [{
        "type": "git",
        "url": "https://github.com/mptre/php-soundcloud"
    }],
    "require": {
        "glenscott/soundcloud": "dev-psr-4",
    }
}

Anyone else seeing this behavior?

alexweinstein avatar Jul 10 '17 20:07 alexweinstein