matthieugrieger / mumbledj

A Mumble bot that plays audio fetched from various media sites.
MIT License
170 stars 59 forks source link

Some artsits' songs fail to queue via SoundCloud #138

Open DanielMarquard opened 8 years ago

DanielMarquard commented 8 years ago

First of all, great script. I started using it in our Mumble last night and everyone in my guild, @critcola, has been loving it. My only complaint has been the TTS channel spam, but I forked it and changed a bunch of channel messages to instead send as private messages.

I don't think this is an issue with MumbleDJ, but we've not been able to queue any songs posted by Yellow Claw on SoundCloud. When we try queuing any of their songs, the error MumbleDJ does not have a valid Soundcloud API key. is returned in chat. No errors in the console.

I've not been able to replicate this with any other artist on SoundCloud. I tried googling, but didn't find anything to suggest that artists can disable API access to their songs, if that's what's causing it, or is that not a thing?

Thanks!

matthieugrieger commented 8 years ago

Hi!

Glad you like the bot! The channel spam is something that will be addressed in the refactored version that I've been working on. No ETA on that though since I've been fairly busy as of late. :)

As for the SoundCloud issue, I haven't come across this myself with any other artists. Here is what I get as a JSON response when I request one of Yellow Claw's tracks:

{
  "duration": 3269643,
  "release_day": 20,
  "permalink_url": "http:\/\/soundcloud.com\/yellowclaw\/sets\/yellow-claw-blood-for-mercy",
  "genre": "BloodForMercy",
  "permalink": "yellow-claw-blood-for-mercy",
  "purchase_url": "http:\/\/MadDecent.lnk.to\/BFM",
  "release_month": 11,
  "description": "BLOOD FOR MERCY IS OUT NOW.\n\nGET YOUR FIX: MadDecent.lnk.to\/BFM",
  "uri": "https:\/\/api.soundcloud.com\/playlists\/167270544",
  "label_name": "Mad Decent",
  "tag_list": "\"Yellow Claw\"",
  "release_year": 2015,
  "track_count": 16,
  "user_id": 5717310,
  "last_modified": "2015\/12\/06 15:48:50 +0000",
  "license": "all-rights-reserved",
  "tracks": [
    {
      "kind": "track",
      "id": 218066181,
      "created_at": "2015\/08\/06 16:03:09 +0000",
      "user_id": 14730,
      "duration": 228018,
      "commentable": true,
      "state": "finished",
      "original_content_size": 9229921,
      "last_modified": "2016\/04\/25 11:48:06 +0000",
      "sharing": "public",
      "tag_list": "\"yellow claw\" cesqeaux \"becky g\"",
      "permalink": "yellow-claw-cesqeaux-wild-mustang-feat-becky-g",
      "streamable": true,
      "embeddable_by": "all",
      "downloadable": false,
      "purchase_url": "https:\/\/MadDecent.lnk.to\/BFM",
      "label_id": null,
      "purchase_title": "GET IT NOW",
      "genre": "dance",
      "title": "Yellow Claw & Cesqeaux - Wild Mustang (feat. Becky G)",
      "description": "Get it Now: https:\/\/MadDecent.lnk.to\/BFM\n\nYellow Claw\u2019s track \u201cWild Mustang\u201d with rising star Cesqeaux brings out a different style of production for one of dance music's favorite power-groups, showcasing their versatility with an upbeat summer tune . The feel-good, tropical beats overlaid with Becky G\u2019s sugary vocals evokes Summer vibes. \n\nFollow Yellow Claw\nFacebook: http:\/\/www.facebook.com\/yellowclaw\nTwitter: http:\/\/twitter.com\/YELLOWCLAW\nSoundcloud: https:\/\/soundcloud.com\/yellowclaw\n\nFollow Cesqeaux\nFacebook: http:\/\/www.facebook.com\/CESQEAUX\nTwitter: http:\/\/www.twitter.com\/cesqeaux\nSoundcloud: https:\/\/soundcloud.com\/cesqeaux",
      "label_name": null,
      "release": null,
      "track_type": null,
      "key_signature": null,
      "isrc": null,
      "video_url": null,
      "bpm": null,
      "release_year": null,
      "release_month": null,
      "release_day": null,
      "original_format": "mp3",
      "license": "all-rights-reserved",
      "uri": "https:\/\/api.soundcloud.com\/tracks\/218066181",
      "user": {
        "id": 14730,
        "kind": "user",
        "permalink": "maddecent",
        "username": "Mad Decent",
        "last_modified": "2016\/05\/10 19:13:17 +0000",
        "uri": "https:\/\/api.soundcloud.com\/users\/14730",
        "permalink_url": "http:\/\/soundcloud.com\/maddecent",
        "avatar_url": "https:\/\/i1.sndcdn.com\/avatars-000162027261-tfnd06-large.jpg"
      },
      "permalink_url": "http:\/\/soundcloud.com\/maddecent\/yellow-claw-cesqeaux-wild-mustang-feat-becky-g",
      "artwork_url": "https:\/\/i1.sndcdn.com\/artworks-000133712518-nv4ret-large.jpg",
      "waveform_url": "https:\/\/w1.sndcdn.com\/zDrf5b0ZMx8x_m.png",
      "stream_url": "https:\/\/api.soundcloud.com\/tracks\/218066181\/stream",
      "playback_count": 1512982,
      "download_count": 0,
      "favoritings_count": 38826,
      "comment_count": 460,
      "attachments_uri": "https:\/\/api.soundcloud.com\/tracks\/218066181\/attachments"
    }
  ],
  "playlist_type": null,
  "id": 167270544,
  "downloadable": false,
  "sharing": "public",
  "created_at": "2015\/11\/20 14:08:06 +0000",
  "release": null,
  "kind": "playlist",
  "title": "Yellow Claw - Blood For Mercy",
  "type": null,
  "purchase_title": null,
  "created_with": {
    "permalink_url": "http:\/\/developers.soundcloud.com\/",
    "name": "SoundCloud.com",
    "external_url": "",
    "uri": "https:\/\/api.soundcloud.com\/apps\/46941",
    "creator": "soundcloud",
    "id": 46941,
    "kind": "app"
  },
  "artwork_url": "https:\/\/i1.sndcdn.com\/artworks-000136773042-o6g1lq-large.jpg",
  "ean": null,
  "streamable": true,
  "user": {
    "permalink_url": "http:\/\/soundcloud.com\/yellowclaw",
    "permalink": "yellowclaw",
    "username": "Yellow Claw",
    "uri": "https:\/\/api.soundcloud.com\/users\/5717310",
    "last_modified": "2016\/05\/04 12:08:21 +0000",
    "id": 5717310,
    "kind": "user",
    "avatar_url": "https:\/\/i1.sndcdn.com\/avatars-000184078214-xm1tw0-large.jpg"
  },
  "embeddable_by": "all",
  "label_id": null
}

I'll have to look at it more later since I'm not quite sure what is happening, especially since a valid API key seems to return a valid result.

DanielMarquard commented 8 years ago

Also noticed the same error today when queuing songs by Kygo and Steve Aoki. All three are big EDM artists, so I'm thinking they maybe disallow API plays? Not sure.