justjason wrote: 
> I am getting mixed results from this , some of the tracks that were
> playing before are no longer playing and visa versa some that were not
> now are

Can you provide a youtube link to one of the tracks that is failing? I
would be curious to see what it looks like.

And as Hawkeyenl mentions, you can certainly combine both the old and
new checks


Code:
--------------------
    
  # Try getting the player's url using assets:..js value
  my ($player_url) = ($content =~ /"assets":.+?"js":\s*("[^"]+")/);
  
  # if unavailable, try jsUrl value
  if ( !$player_url ) {
  my ($player_url) = ($content =~ /"jsUrl":\s*("[^"]+")/);
  }
  
--------------------


There might be a clever way to combine both statements into one with
some fancy Perl syntax and remove the if statement but I am not really
that proficient with Perl to do that (especially since we are dealing
with regex extractions, not simple assignments)...


------------------------------------------------------------------------
dawansv's Profile: http://forums.slimdevices.com/member.php?userid=22248
View this thread: http://forums.slimdevices.com/showthread.php?t=105840

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to