Paul Webster wrote: > Something like this might work (untested - I don't use the YouTube > plugin) - in that same file (ProtocolHandler.pm) > > The line > > Code: -------------------- > > > my $value = "YES+cb." . gmtime->ymd('') . "-00-p0.en+FX" . ($id || int(rand(900)) + 100); > -------------------- > > > might work as > > Code: -------------------- > > > my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday) = gmtime(); > if ( $year < 1900){ > $year += 1900; # add offset to get this year as 4 digit ... some routines return as offset from 1900 > } > # Month starts from 0 > my $value = "YES+cb." . $year . '-' . sprintf("%02d",$mon+1) . '-' . sprintf("%02d",$mday) . "-00-p0.en+FX" . ($id || int(rand(900)) + 100); > -------------------- > > > > Edit: > couple of small changes since first posted
Thanks Paul for providing a fix meanwhile :)! LMS 8.1.x on Odroid-C4 - *SqueezeAMP!*, 5xRadio, 5xBoom, 2xDuet, 1xTouch, 1xSB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, RivaArena 1 & 3 ------------------------------------------------------------------------ philippe_44's Profile: http://forums.slimdevices.com/member.php?userid=17261 View this thread: http://forums.slimdevices.com/showthread.php?t=105840 _______________________________________________ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins