File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
plugins/domains/soundcloud.com Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 1+ import * as URL from 'url' ;
2+
13export default {
24
35 provides : [ '__allow_soundcloud_meta' , 'sound' ] ,
@@ -28,8 +30,15 @@ export default {
2830 }
2931 if ( options . getRequestOptions ( 'soundcloud.hide_artwork' ) !== undefined ) {
3032 params . show_artwork = ! options . getRequestOptions ( 'soundcloud.hide_artwork' ) ;
31- }
32- if ( options . getProviderOptions ( 'soundcloud.color' ) ) {
33+ }
34+ if ( options . redirectsHistory && / ^ h t t p s : \/ \/ w \. s o u n d c l o u d \. c o m \/ p l a y e r \/ / . test ( options . redirectsHistory [ 0 ] ) ) {
35+ var original = URL . parse ( options . redirectsHistory [ 0 ] , true ) . query ?. color ;
36+ var color = original && decodeURIComponent ( original ) ;
37+ if ( color && ! options . getProviderOptions ( 'app.disable_url_options' , false ) ) {
38+ params . color = color ; // overide with provider options below, if any
39+ }
40+ }
41+ if ( options . getRequestOptions ( 'soundcloud.color' ) ) {
3342 params . color = options . getProviderOptions ( 'soundcloud.color' ) ;
3443 }
3544
You can’t perform that action at this time.
0 commit comments