diff options
author | 2013-08-23 22:05:42 +0100 | |
---|---|---|
committer | 2013-08-23 22:05:42 +0100 | |
commit | a375dfd408d3be7df457c6dfad64d53e7ff8b01e (patch) | |
tree | be8ca89fc8c66a8d09d988b3e5a2dca819e19b84 /media-sound | |
parent | Merge tag 'lms-bin-7.7.3_alpha1-1' into develop (diff) | |
download | squeezebox-a375dfd408d3be7df457c6dfad64d53e7ff8b01e.tar.gz squeezebox-a375dfd408d3be7df457c6dfad64d53e7ff8b01e.tar.bz2 squeezebox-a375dfd408d3be7df457c6dfad64d53e7ff8b01e.zip |
Bump for official Logitech 7.7.3 release
This release supports Perl 5.16, but only on x86. On amd64 Perl 5.14 is
the latest supported version.
Also included are a couple of patches of my own:
1. Support for shuffle settings on alarms.
2. Prevent cross-fade between tracks with different sample rates.
3. Don't check file extension of soft linked media files.
Diffstat (limited to 'media-sound')
8 files changed, 505 insertions, 9 deletions
diff --git a/media-sound/logitechmediaserver-bin/ChangeLog b/media-sound/logitechmediaserver-bin/ChangeLog index b8d57e4..fcf0a9c 100644 --- a/media-sound/logitechmediaserver-bin/ChangeLog +++ b/media-sound/logitechmediaserver-bin/ChangeLog @@ -2,6 +2,23 @@ # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ +*logitechmediaserver-bin-7.7.3 (23 Aug 2013) + + 23 Aug 2013; Stuart Hickinbottom <stuart@hickinbottom.com> + -logitechmediaserver-bin-7.7.3_alpha1.ebuild, + +logitechmediaserver-bin-7.7.3.ebuild, + +files/logitechmediaserver-bin-7.7.3-add-alarm-shuffle-setting.patch, + +files/logitechmediaserver-bin-7.7.3-client-playlists-gentoo.patch, + +files/logitechmediaserver-bin-7.7.3-fix-transition-sample-rates2.patch, + +files/logitechmediaserver-bin-7.7.3-remove-softlink-target-check.patch, + +files/logitechmediaserver-bin-7.7.3-uuid-gentoo.patch, + -files/logitechmediaserver-bin-7.7.3_alpha1-client-playlists-gentoo.patch, + -files/logitechmediaserver-bin-7.7.3_alpha1-uuid-gentoo.patch: + Bump for official Logitech 7.7.3 release + + This release supports Perl 5.16, but only on x86. On amd64 Perl 5.14 is + the latest supported version. + 07 Jul 2013; Stuart Hickinbottom <stuart@hickinbottom.com> -files/logitechmediaserver-bin-7.7.3-client-playlists-gentoo.patch, -files/logitechmediaserver-bin-7.7.3-uuid-gentoo.patch, diff --git a/media-sound/logitechmediaserver-bin/Manifest b/media-sound/logitechmediaserver-bin/Manifest index 05674d0..71167dd 100644 --- a/media-sound/logitechmediaserver-bin/Manifest +++ b/media-sound/logitechmediaserver-bin/Manifest @@ -3,15 +3,16 @@ AUX Gentoo-plugins-README.txt 884 SHA256 44491e0815c1a188968bd07732c3f99a056990a AUX gentoo-filepaths.pm 1790 SHA256 f001f68aef00d0b104ce33dfff65a02c233ad753aa368e5b1ae1142acfbe6613 SHA512 8f9236bdbb4894bb39856acda6316c230f65600190d240b4bb68aaa71e592317951047403e595eb00d02f34e7381f62f78018e80610d7864b234c9c58242131c WHIRLPOOL b947ad80b2827ce51a6b6e46071ad66e54aa195688464ceb16b22fee641a01859b4fb8befb1f75dc9f36ee60fae152a23d7906c92de2d3d480ce1145d8d9cc13 AUX logitechmediaserver-bin-7.7.2-client-playlists-gentoo.patch 395 SHA256 f8983578bff560217fc352c236eb3b07b9292c75351e4691778acd9972483612 SHA512 82e7d7eb092b740c564d4fa31f43eab821001b9f30fb284e63b58de4119a3964c197481100e0422bcb0b8b2a57eb77110b3ce500bdb4d65e09383c8ed34d491f WHIRLPOOL 8642690494d291ef257bb06e5e88926c8490495857685ed78c9fd9ebf34365c7f8787cfd471267474fda06e22e53444575d68b016971f2a4f391e9fd89c4eb88 AUX logitechmediaserver-bin-7.7.2-uuid-gentoo.patch 524 SHA256 087f93d09e1eaef491bc244d74333c610504fa81c54d1b7d0594b1575a32e95f SHA512 61acd813060a8559636110423c8f9cd73a6bcee5f3d577c2875755f7bdf2458925d4a33a8e420db623cc02639cc62f5071dfe11499d634654040acc6fc3f858b WHIRLPOOL 5674e4f31e5d425d010219d2ae69ef6c882ac9c7773952b2fb3dd5979f9cfbf8c33dc3d01413fa76b13f5355da2e265aad7048f52de645aa169639c2a8e2e01f +AUX logitechmediaserver-bin-7.7.3-add-alarm-shuffle-setting.patch 8857 SHA256 cdbd04cbc12ce1ee10d1b3bba901e7553883b27324620126d4969a7e9a5725d4 SHA512 f1dd352ca40d1205422b410f3cd2b6150fc9bb62fd52f25f9ab45589c868e3ebd4569bde7469e5085a34a7e9b4c982554219880fcbad14d771d3aefdae12a1e0 WHIRLPOOL 8c0d50f9bb6bdbe067515c006dc8e4f7f1887dd8b86392b3cbd9a8da00e1ab21ac601d9bfb1b32e4eb74f7834b8ed1f5734ac77a1efe051537b19f8cfa387ad6 AUX logitechmediaserver-bin-7.7.3-client-playlists-gentoo.patch 395 SHA256 6ffa1ba22f6e519c02abafd4ae16055a4cb555af113bbac25f3a30d0a85f8845 SHA512 45ee8ee475b5dc798081608c95a8c0fffa4e4f5e4b03c53f38288fc534bf9818d6c7b8829fbbef2e5e5d8790922a7f77b557277ffda863ba20c937c795fefc4a WHIRLPOOL 481f9451a125119edf92e9e5f413628b3bdfb698b27271ccc36d033f91c538f1ac0796f5dc0117cfcb80ae0bfbbc6d8b3fea62985fcce1a1900ae0f8e631be4b +AUX logitechmediaserver-bin-7.7.3-fix-transition-sample-rates2.patch 5351 SHA256 96809cd24a48e3ffe9849967b8ae426ddbda43388399a5ace39e1753afc16c70 SHA512 db80f58129e3d60cdc6fbf3d039827cb55906ceafcf1f91c5425eae88b7d87a0d9ccf2847ac304fe24ca5e3b57b002f3c4f6a33a3d7d6838f93bbce1dc506432 WHIRLPOOL 080d19a145419437c041ff6c196392c5bad1dfd5a5dee6e9de9f09a44acc2d841899f8442b5b10be9bb3da6cf3d889392fcaa3c97eb42a5ff5060b425c367f0c +AUX logitechmediaserver-bin-7.7.3-remove-softlink-target-check.patch 502 SHA256 069005bba8fe7f18965b128d0207361b849ebf4049c6ee02da15d810cf8e847b SHA512 6f5ca88f52bb2c243e730803e4677850a774ce0fffc69b0e98a5f2dfd682594433ff9714870b62aaf028ee5f691da2902b0e104129759d3945b95fd70e200d99 WHIRLPOOL 0a2f394bc666f53c51a0ded947d4544c0250114afa8be34b829e995ce8de2329922da3272e1700ebf0053a6533819c4ebe7f98dc9cd1c800db6a193b884d3e15 AUX logitechmediaserver-bin-7.7.3-uuid-gentoo.patch 525 SHA256 032f9edec613661f691797934cf73191c8ac94269cff59773c365f20603f01c4 SHA512 4c8a65893842aa9c0be21b3ad59fcf9f350e4c1b169099f4ffafe18b298ee7860693d529a3a7d81d7f4251bad5904f975e26e5fc2a33312003354bdda3e4bb87 WHIRLPOOL e74772fec480bc46d73073d5ce11e6052758ef20f636e99a74498ae3fe624b96241f3df7d36f63a94b34dbfc3017385872ada16698c6ff6c6f4c33e471c88348 -AUX logitechmediaserver-bin-7.7.3_alpha1-client-playlists-gentoo.patch 395 SHA256 6ffa1ba22f6e519c02abafd4ae16055a4cb555af113bbac25f3a30d0a85f8845 SHA512 45ee8ee475b5dc798081608c95a8c0fffa4e4f5e4b03c53f38288fc534bf9818d6c7b8829fbbef2e5e5d8790922a7f77b557277ffda863ba20c937c795fefc4a WHIRLPOOL 481f9451a125119edf92e9e5f413628b3bdfb698b27271ccc36d033f91c538f1ac0796f5dc0117cfcb80ae0bfbbc6d8b3fea62985fcce1a1900ae0f8e631be4b -AUX logitechmediaserver-bin-7.7.3_alpha1-uuid-gentoo.patch 525 SHA256 032f9edec613661f691797934cf73191c8ac94269cff59773c365f20603f01c4 SHA512 4c8a65893842aa9c0be21b3ad59fcf9f350e4c1b169099f4ffafe18b298ee7860693d529a3a7d81d7f4251bad5904f975e26e5fc2a33312003354bdda3e4bb87 WHIRLPOOL e74772fec480bc46d73073d5ce11e6052758ef20f636e99a74498ae3fe624b96241f3df7d36f63a94b34dbfc3017385872ada16698c6ff6c6f4c33e471c88348 AUX logitechmediaserver.conf.d 1138 SHA256 07425063527c8e76f6a78af67689f19cee574fd32a20817fb6a8716ef1b709e1 SHA512 bd07fb9fd460bae650bc86f44b27a60d862a734bcba833870dbd814cc63162bdbf870b21a5ce6b5d0166d140cc411b0a3a8a9c41380fb7c6d63b9f750a79041f WHIRLPOOL fbdf39892b6f423a8c0791063baa0bd0d93ff6726c387c269c0d042a2bb78fe8554d61f0e43bff179cf71809c536b53cd43489fca83a8a8eace7c0f02955fd69 AUX logitechmediaserver.init.d 1208 SHA256 60b917c12205bf3d00a62e218513fce388dbb669a813e2926f8350cd9d0b012d SHA512 1ae58d69515a53c8528498e52a50b50f522d11b788648147e41105c814c0182b60c9555e2caf4d10a818434e23590cfe1b67fc6967ebc7c444c1636c3d219565 WHIRLPOOL 00b7ff061a5be78d1e241e123bedd33ebea811fe283cb45836c8633fa64f9833438326f2d5dee5c5321abf15f9fa6f594ad9cf1d7382fbfa9bee4c1ac824db4c AUX logitechmediaserver.logrotate.d 347 SHA256 82fd4cdb8537b610ec220545afc606c4b39481d449c08215073732fa27a247d0 SHA512 5787166d7318e494c574e965f47f6074805371283f5fd33955e02302ba43ffc64b2aa18f1c5a081d23ba49fb76cf512cfd966e5d68496fa54c05f911bab422b6 WHIRLPOOL 297329d107bc41846a4cc617c5cb05983e2839372b2684801d01ecea171d7a31603659d539e19b31559338de1702334d053c174acab697eda3d5f09e01c0efc5 DIST logitechmediaserver-7.7.2.tgz 128376300 SHA256 d7e6c2c49d4d4060e28ba5ada39be3553807b6f3949116371aa4d1ea53510e2b SHA512 7982557947d31f3c92cc1efa6fa14324e01b80cbd0d27d1a6f7528ec2e14f534d2eca43e1772b6de1dded9eff3950b978e7be7079bd57361d651a298170b66e3 WHIRLPOOL 51e59690b971ae431731b88e273671a718d8ff8057db710681a3c7859265006ea82be46df94944e0a79dca012dcae96fe2afd9069fef343fa5b6cca2a490e739 -DIST logitechmediaserver-7.7.3-1372939239.tgz 105695597 SHA256 643769014ddaf4b674b808f88407a4a6cd53ff868d64760662563c8e0c504d67 SHA512 aca88ab1f1a293299d15b24442058590a58db9185699ffe5793464641b34150b33b233402c52afdf4fc4e513bb587eed58ac7c5aaeb8c7385fbf54ec90479773 WHIRLPOOL 534d2e7c8477be3c5445edc2d2308f525ebd064cd7117ffa1e8e5c3027b9289065251ced72430d9508e4beccc2dce4f2189d359b49c612d44440442b601ab22a +DIST logitechmediaserver-7.7.3.tgz 105690719 SHA256 829c78859ba7e460a79b3700341a1265d8c3dbdb1f679adff3fb407549828c4f SHA512 0c6d5b45f6ee98513f21400421e7fe6f6aae63e6a9040b50dec8250344574b3fbf1d10b75e336ccceba93198240b77cd1f177e1556438d4e32f8f91450625a30 WHIRLPOOL dfd7f426982119751ffb66268cba0506362c24fec23c0b9193e4339037d1a2dfb001d92a0efff2ed1e965a3b80560726cd740d56cf8a876ad8ae0cd05eddc59b EBUILD logitechmediaserver-bin-7.7.2-r2.ebuild 51271 SHA256 b83a1011420d104d77392a70bfd41c8d03a9d69fc97a04ce5b94c321f7f8ba44 SHA512 399a1a0fffc685ef09c58328ea353e95701df84a404593210b59e5bdb77819f59f75ff7aba1c30a669ef04a1dd90cadfcc52b6328549aa5345840411d0e98658 WHIRLPOOL 6e6d753ad22eb2248495c9ba89eafa05f1cf1a005b493ea3e1e289fa1ea70f0944a14431fb90a14d7baae4bdeec9ddf04bd28e7deae79ded2ef2b47e74542729 -EBUILD logitechmediaserver-bin-7.7.3_alpha1.ebuild 50983 SHA256 1ac7b7fa255e7565a86afb0362585ad5731588225ae561c3d5b2288b94d90358 SHA512 71d277f10ab793a555b37e189149a30b52a7a44d780999be82d122eaef7561e192afc07c982a35e21fc52883426a61abc6aab5fc5268cb95be00115ee4e3f30b WHIRLPOOL 64ea8b504768b027aa7c0e67b1f3b293f886d0b2b9d24048720573923644a0d1cec6072569d71e60781972c28ae2ba4ecf4cab6d1c5d5c67b4f5218795720aaf +EBUILD logitechmediaserver-bin-7.7.3.ebuild 51755 SHA256 7363b3a454fbe45fd2e51f502b4eef05a24e6263ddfc3c1757efad735b5a2015 SHA512 8ef24ae14dd766c4f7313f81f47583f3d0497fbd7b711dd933a894c6d0f4d2376b54c2544a4fbfa3c833858cdb6090c5f3a32a4de0b6fb05bee84e3276643fd5 WHIRLPOOL 6185e095d61de8344b42cb33615c76b5a835394fceca3931045a078aa4210165d0e86ef694905914a08bfcef54d7b4abf0d25cf79fd01be0abec26058c99207d MISC metadata.xml 696 SHA256 fbdc4cc9be99f9293be5c7527ea8f5662c87e79d8f2408d53b5137e340edf763 SHA512 50a24dec62483c8ab21de63397a113b7ae218ea3fb5f454aecb7c647ecf336dfc0e4d276f594e5dd036f8851fad9a28c2077bf10f94ee0de591cafbb9f3a80e2 WHIRLPOOL c569ea771de1dacfc99c2495d8a4872ac95ede6e75b593fe2f893cbcf476d32d5daedeec9685ad7c84734fb1bbf421523ecd1ac9d8e1500886275ea90179dbb7 diff --git a/media-sound/logitechmediaserver-bin/files/logitechmediaserver-bin-7.7.3-add-alarm-shuffle-setting.patch b/media-sound/logitechmediaserver-bin/files/logitechmediaserver-bin-7.7.3-add-alarm-shuffle-setting.patch new file mode 100644 index 0000000..100d6d2 --- /dev/null +++ b/media-sound/logitechmediaserver-bin/files/logitechmediaserver-bin-7.7.3-add-alarm-shuffle-setting.patch @@ -0,0 +1,271 @@ +diff --git a/HTML/EN/settings/player/alarm.html b/HTML/EN/settings/player/alarm.html +index 65d7663..f0d9b55 100644 +--- a/HTML/EN/settings/player/alarm.html ++++ b/HTML/EN/settings/player/alarm.html +@@ -55,6 +55,21 @@ + </select> + [% END %] + ++ [% alarmTitle = "SHUFFLE" | string %] ++ [% WRAPPER settingGroup title='<div style="font-weight:normal;">' _ alarmTitle _ "</div>" desc="" %] ++ <select class="stdedit" name="alarm_shufflemode[% alarm.id %]" id="alarm_shufflemode[% alarm.id %]"> ++ ++ [% FOREACH option = { ++ '0' => 'SHUFFLE_OFF', ++ '1' => 'SHUFFLE_ON_SONGS', ++ '2' => 'SHUFFLE_ON_ALBUMS', ++ } %] ++ <option [% IF alarm.shufflemode == option.key %]selected='selected' [% END %]value="[% option.key %]">[% option.value | string %]</option> ++ [%- END -%] ++ ++ </select> ++ [% END %] ++ + [% alarmTitle = "ALARM_ALARM_REPEAT" | string %] + [% WRAPPER settingGroup title='<div style="font-weight:normal;">' _ alarmTitle _ "</div>" desc="ALARM_ALARM_REPEAT_DESC" %] + <select class="stdedit" name="alarm_repeat[% alarm.id %]" id="alarm_repeat[% alarm.id %]"> +diff --git a/Slim/Buttons/Alarm.pm b/Slim/Buttons/Alarm.pm +index c7ab86f..a22734f 100644 +--- a/Slim/Buttons/Alarm.pm ++++ b/Slim/Buttons/Alarm.pm +@@ -45,6 +45,13 @@ my @daysMenu = ( + { title => 'ALARM_DAY0', type => 'checkbox', checked => \&dayEnabled, toggleFunc => \&toggleDay, params => {day => 0} }, + ); + ++# Alarm playlist shuffle option menu ++my @shuffleModeMenu = ( ++ { title => 'SHUFFLE_OFF', type => 'checkbox', checked => \&shuffleModeSelected, toggleFunc => \&toggleShuffleMode, params => {shuffleMode => 0} }, ++ { title => 'SHUFFLE_ON_SONGS', type => 'checkbox', checked => \&shuffleModeSelected, toggleFunc => \&toggleShuffleMode, params => {shuffleMode => 1} }, ++ { title => 'SHUFFLE_ON_ALBUMS', type => 'checkbox', checked => \&shuffleModeSelected, toggleFunc => \&toggleShuffleMode, params => {shuffleMode => 2} }, ++); ++ + # Menu to confirm removal of an alarm + my @deleteMenu = ( + { +@@ -125,6 +132,11 @@ my @alarmMenu = ( + items => \&buildPlaylistMenu, + }, + { ++ title => 'SHUFFLE', ++ type => 'menu', ++ items => \@shuffleModeMenu, ++ }, ++ { + title => 'ALARM_ALARM_REPEAT', + type => 'checkbox', + checked => sub { +@@ -259,6 +271,30 @@ sub dayEnabled { + } + } + ++sub toggleShuffleMode { ++ my $client = shift; ++ my $item = shift; ++ ++ my $alarm = $client->modeParam('alarm_alarm'); ++ my $shuffleMode = $item->{params}->{shuffleMode}; ++ ++ main::DEBUGLOG && $log->debug("toggleShuffleMode called for mode: $shuffleMode"); ++ ++ $alarm->shufflemode($shuffleMode); ++ saveAlarm($client, $alarm); ++} ++ ++# Return whether the current alarm shuffle mode is set to a specific mode ++sub shuffleModeSelected { ++ my $client = shift; ++ my $item = shift; ++ ++ my $alarm = $client->modeParam('alarm_alarm'); ++ my $shuffleMode = $item->{params}->{shuffleMode}; ++ ++ return $alarm->shufflemode == $shuffleMode; ++} ++ + sub init { + Slim::Buttons::Common::addMode('alarm', undef, \&setMode); + +diff --git a/Slim/Control/Commands.pm b/Slim/Control/Commands.pm +index 43e0ac9..c4c0fe7 100644 +--- a/Slim/Control/Commands.pm ++++ b/Slim/Control/Commands.pm +@@ -85,7 +85,7 @@ sub alarmCommand { + my $client = $request->client(); + my $cmd = $request->getParam('_cmd'); + +- my @tags = qw( id dow dowAdd dowDel enabled repeat time volume playlisturl url cmd ); ++ my @tags = qw( id dow dowAdd dowDel enabled repeat time volume shufflemode playlisturl url cmd ); + + # legacy support for "bare" alarm cli command (i.e., sending all tagged params) + my $params; +@@ -195,6 +195,7 @@ sub alarmCommand { + } + + $alarm->volume($params->{volume}) if defined $params->{volume}; ++ $alarm->shufflemode($params->{shufflemode}) if defined $params->{shufflemode}; + $alarm->enabled($params->{enabled}) if defined $params->{enabled}; + $alarm->repeat($params->{repeat}) if defined $params->{repeat}; + +diff --git a/Slim/Control/Jive.pm b/Slim/Control/Jive.pm +index 4a55cb3..bd59514 100644 +--- a/Slim/Control/Jive.pm ++++ b/Slim/Control/Jive.pm +@@ -789,6 +789,65 @@ sub alarmUpdateMenu { + }; + push @menu, $playlistChoice; + ++ my $currentShuffleMode = $alarm->shufflemode; ++ my @shuffleMode_menu= ( ++ { ++ text => $client->string('SHUFFLE_OFF'), ++ radio => ($currentShuffleMode == 0) + 0, ++ onClick => 'refreshOrigin', ++ actions => { ++ do => { ++ player => 0, ++ cmd => ['alarm', 'update'], ++ params => { ++ id => $params->{id}, ++ shufflemode => 0, ++ }, ++ }, ++ }, ++ nextWindow => 'refresh', ++ }, ++ { ++ text => $client->string('SHUFFLE_ON_SONGS'), ++ radio => ($currentShuffleMode == 1) + 0, ++ onClick => 'refreshOrigin', ++ actions => { ++ do => { ++ player => 0, ++ cmd => ['alarm', 'update'], ++ params => { ++ id => $params->{id}, ++ shufflemode => 1, ++ }, ++ }, ++ }, ++ nextWindow => 'refresh', ++ }, ++ { ++ text => $client->string('SHUFFLE_ON_ALBUMS'), ++ radio => ($currentShuffleMode == 2) + 0, ++ onClick => 'refreshOrigin', ++ actions => { ++ do => { ++ player => 0, ++ cmd => ['alarm', 'update'], ++ params => { ++ id => $params->{id}, ++ shufflemode => 2, ++ }, ++ }, ++ }, ++ nextWindow => 'refresh', ++ }, ++ ); ++ my $shuffleMode = { ++ text => $client->string('SHUFFLE'), ++ count => scalar(@shuffleMode_menu), ++ offset => 0, ++ item_loop => \@shuffleMode_menu, ++ }; ++ push @menu, $shuffleMode; ++ + my $repeat = $alarm->repeat(); + my $repeatOn = { + text => $client->string("ALARM_ALARM_REPEAT"), +diff --git a/Slim/Utils/Alarm.pm b/Slim/Utils/Alarm.pm +index acc64dd..c625630 100644 +--- a/Slim/Utils/Alarm.pm ++++ b/Slim/Utils/Alarm.pm +@@ -117,6 +117,7 @@ sub new { + _days => (! defined $time || $time < 86400) ? [(1) x 7] : undef, + _enabled => 0, + _repeat => 1, ++ _shufflemode => 0, + _playlist => undef, + _title => undef, + _volume => undef, # Use default volume +@@ -253,6 +254,24 @@ sub repeat { + + return $self->{_repeat}; + } ++=head3 shufflemode ( [0/1/2] ) ++ ++Sets/returns the shuffle mode that will be used for the playlist for this alarm. ++ ++ 0 = no shuffling ++ 1 = shuffle-by-song ++ 2 = shuffle-by-album ++ ++=cut ++ ++sub shufflemode { ++ my $self = shift; ++ my $newValue = shift; ++ ++ $self->{_shufflemode} = $newValue if defined $newValue; ++ ++ return $self->{_shufflemode}; ++} + + =head3 time( [ $time ] ) + +@@ -622,6 +641,15 @@ sub sound { + $client->execute(['mixer', 'volume', $self->volume]); + } + ++ # Set the player shuffle mode prior to loading ++ # playlist ++ my $currentShuffleMode = $prefs->client($client)->get('shuffle'); ++ $self->{_originalShuffleMode} = $currentShuffleMode; ++ if (defined $self->shufflemode) { ++ main::DEBUGLOG && $isDebug && $log->debug('Alarm playlist shufflemode: ' . $self->shufflemode); ++ $client->execute(['playlist', 'shuffle', $self->shufflemode]); ++ } ++ + # Play alarm playlist, falling back to the current playlist if undef + if (defined $self->playlist) { + main::DEBUGLOG && $isDebug && $log->debug('Alarm playlist url: ' . $self->playlist); +@@ -895,6 +923,11 @@ sub stop { + main::DEBUGLOG && $isDebug && $log->debug('Restoring pre-alarm volume level: ' . $self->{_originalVolume}); + $client->volume($self->{_originalVolume}); + } ++ ++ # Restore client shuffle mode ++ main::DEBUGLOG && $isDebug && $log->debug('Restoring pre-alarm shuffle mode: ' . $self->{_originalShuffleMode}); ++ $client->execute(['playlist', 'shuffle', $self->{_originalShuffleMode}]); ++ + # Bug: 12760, 9569 - Return power state to that prior to the alarm + main::DEBUGLOG && $isDebug && $log->debug('Restoring pre-alarm power state: ' . ($self->{_originalPower} ? 'on' : 'off')); + $client->power($self->{_originalPower}); +@@ -1069,6 +1102,7 @@ sub _createSaveable { + _days => $self->{_days}, + _enabled => $self->{_enabled}, + _repeat => $self->{_repeat}, ++ _shufflemode => $self->{_shufflemode}, + _playlist => $self->{_playlist}, + _title => $self->{_title}, + _volume => $self->{_volume}, +@@ -1359,6 +1393,7 @@ sub loadAlarms { + $alarm->{_days} = $prefAlarm->{_days}; + $alarm->{_enabled} = $prefAlarm->{_enabled}; + $alarm->{_repeat} = $prefAlarm->{_repeat}; ++ $alarm->{_shufflemode} = $prefAlarm->{_shufflemode}; + $alarm->{_playlist} = $prefAlarm->{_playlist}; + $alarm->{_title} = $prefAlarm->{_title}; + $alarm->{_volume} = $prefAlarm->{_volume}; +diff --git a/Slim/Web/Settings/Player/Alarm.pm b/Slim/Web/Settings/Player/Alarm.pm +index fc47916..0547d69 100644 +--- a/Slim/Web/Settings/Player/Alarm.pm ++++ b/Slim/Web/Settings/Player/Alarm.pm +@@ -163,6 +163,7 @@ sub saveAlarm { + $alarm->time($t); + $alarm->enabled( $paramRef->{'alarm_enable' . $id} ); + $alarm->repeat( $paramRef->{'alarm_repeat' . $id} ); ++ $alarm->shufflemode( $paramRef->{'alarm_shufflemode' . $id} ); + + for my $day (0 .. 6) { + diff --git a/media-sound/logitechmediaserver-bin/files/logitechmediaserver-bin-7.7.3_alpha1-client-playlists-gentoo.patch b/media-sound/logitechmediaserver-bin/files/logitechmediaserver-bin-7.7.3-client-playlists-gentoo.patch index b906595..b906595 100644 --- a/media-sound/logitechmediaserver-bin/files/logitechmediaserver-bin-7.7.3_alpha1-client-playlists-gentoo.patch +++ b/media-sound/logitechmediaserver-bin/files/logitechmediaserver-bin-7.7.3-client-playlists-gentoo.patch diff --git a/media-sound/logitechmediaserver-bin/files/logitechmediaserver-bin-7.7.3-fix-transition-sample-rates2.patch b/media-sound/logitechmediaserver-bin/files/logitechmediaserver-bin-7.7.3-fix-transition-sample-rates2.patch new file mode 100644 index 0000000..313663b --- /dev/null +++ b/media-sound/logitechmediaserver-bin/files/logitechmediaserver-bin-7.7.3-fix-transition-sample-rates2.patch @@ -0,0 +1,171 @@ +diff --git a/Slim/Player/ReplayGain.pm b/Slim/Player/ReplayGain.pm +index 10afe1f..d142364 100644 +--- a/Slim/Player/ReplayGain.pm ++++ b/Slim/Player/ReplayGain.pm +@@ -74,10 +74,7 @@ sub fetchGainMode { + return preventClipping( $track->replay_gain(), $track->replay_peak() ); + } + +-# Based on code from James Sutula's Dynamic Transition Updater plugin, +-# this method determines whether tracks at a given offset from each +-# other in the playlist are similarly adjacent within the same album. +-sub trackAlbumMatch { ++sub findTracksByIndex { + my $class = shift; + my $client = shift; + my $offset = shift; +@@ -114,10 +111,24 @@ sub trackAlbumMatch { + # Get the track objects + my $current_url = Slim::Player::Playlist::song($client, $current_index); + my $current_track = Slim::Schema->objectForUrl({ 'url' => $current_url, 'create' => 1, 'readTags' => 1 }); +- ++ + my $compare_url = Slim::Player::Playlist::song($client, $compare_index); + my $compare_track = Slim::Schema->objectForUrl({ 'url' => $compare_url, 'create' => 1, 'readTags' => 1 }); + ++ return ($current_track, $compare_track); ++} ++ ++# Based on code from James Sutula's Dynamic Transition Updater plugin, ++# this method determines whether tracks at a given offset from each ++# other in the playlist are similarly adjacent within the same album. ++sub trackAlbumMatch { ++ my $class = shift; ++ my $client = shift; ++ my $offset = shift; ++ ++ my ($current_track, $compare_track) = $class->findTracksByIndex($client, $offset); ++ return if (!$current_track || !$compare_track); ++ + if (!blessed($current_track) || !blessed($compare_track)) { + + logError("Couldn't find object for track: [$current_track] or [$compare_track] !"); +@@ -178,18 +189,88 @@ sub trackAlbumMatch { + return 0; + } + ++# Identify whether the sample rates match between two tracks in a ++# client playlist. This is modelled after the trackAlbumMatch function ++# above. ++sub trackSampleRateMatch { ++ my $class = shift; ++ my $client = shift; ++ my $offset = shift; ++ ++ my ($current_track, $compare_track) = $class->findTracksByIndex($client, $offset); ++ return if (!$current_track || !$compare_track); ++ ++ if (!blessed($current_track) || !blessed($compare_track)) { ++ ++ logError("Couldn't find object for track: [$current_track] or [$compare_track] !"); ++ ++ return 0; ++ } ++ ++ if (!$current_track->can('samplerate') || !$compare_track->can('samplerate')) { ++ ++ logError("Couldn't a find valid object for track: [$current_track] or [$compare_track] !"); ++ ++ return 0; ++ } ++ ++ # For remote tracks, get metadata from the protocol handler ++ if ( $current_track->remote ) { ++ if ( !$compare_track->remote ) { ++ # Other track is not remote, fail ++ return; ++ } ++ ++ my $current_meta = {}; ++ my $compare_meta = {}; ++ ++ my $current_handler = Slim::Player::ProtocolHandlers->handlerForURL( $current_track->url ); ++ my $compare_handler = Slim::Player::ProtocolHandlers->handlerForURL( $compare_track->url ); ++ ++ if ( $current_handler && $current_handler->can('getMetadataFor') ) { ++ $current_meta = $current_handler->getMetadataFor( $client, $current_track->url ); ++ } ++ ++ if ( $compare_handler && $compare_handler->can('getMetadataFor') ) { ++ $compare_meta = $compare_handler->getMetadataFor( $client, $compare_track->url ); ++ } ++ ++ if ( $current_meta->{samplerate} ++ && $compare_meta->{samplerate} ++ && $current_meta->{samplerate} eq $compare_meta->{samplerate} ++ ) { ++ # Sample rate metadata matches ++ return 1; ++ } ++ else { ++ return; ++ } ++ } ++ ++ # Check sample rates match ++ my $compare_rate = $compare_track->samplerate; ++ my $current_rate = $current_track->samplerate; ++ if ($compare_rate && $current_rate && ++ ($compare_rate == $current_rate)) { ++ ++ return 1; ++ } ++ ++ return 0; ++} ++ + # Bug 5119 + # Reduce the gain value if necessary to avoid clipping + sub preventClipping { + my ( $gain, $peak ) = @_; +- ++ + if ( defined $peak && defined $gain && $peak > 0 ) { + my $noclip = -20 * ( log($peak) / log(10) ); + if ( $noclip < $gain ) { + return $noclip; + } + } +- ++ + return $gain; + } + +diff --git a/Slim/Player/Squeezebox.pm b/Slim/Player/Squeezebox.pm +index dbcf313..e93fdcf 100644 +--- a/Slim/Player/Squeezebox.pm ++++ b/Slim/Player/Squeezebox.pm +@@ -994,19 +994,30 @@ sub stream_s { + } + } + ++ # Don't do transitions if the sample rates of the two ++ # songs differ. This avoids some unpleasant white ++ # noise from (at least) the Squeezebox Touch when ++ # using the analogue outputs. This might be bug#1884. ++ if (!Slim::Player::ReplayGain->trackSampleRateMatch($master, -1) ++ || ++ !Slim::Player::ReplayGain->trackSampleRateMatch($master, 1)) { ++ main::INFOLOG && $log->info('Overriding transition due to differing sample rates'); ++ $transitionType = 0; ++ } ++ + } +- ++ + if ($transitionDuration > $client->maxTransitionDuration()) { + $transitionDuration = $client->maxTransitionDuration(); + } +- ++ + if ( main::INFOLOG && $log->is_info ) { + $log->info(sprintf( + "Starting decoder with format: %s flags: 0x%x autostart: %s buffer threshold: %s output threshold: %s samplesize: %s samplerate: %s endian: %s channels: %s", + $formatbyte, $flags, $autostart, $bufferThreshold, $outputThreshold, $pcmsamplesize, $pcmsamplerate, $pcmendian, $pcmchannels, + )); + } +- ++ + my $frame = pack 'aaaaaaaCCCaCCCNnN', ( + 's', # command + $autostart, diff --git a/media-sound/logitechmediaserver-bin/files/logitechmediaserver-bin-7.7.3-remove-softlink-target-check.patch b/media-sound/logitechmediaserver-bin/files/logitechmediaserver-bin-7.7.3-remove-softlink-target-check.patch new file mode 100644 index 0000000..f10c069 --- /dev/null +++ b/media-sound/logitechmediaserver-bin/files/logitechmediaserver-bin-7.7.3-remove-softlink-target-check.patch @@ -0,0 +1,20 @@ +diff --git a/Slim/Utils/Misc.pm b/Slim/Utils/Misc.pm +index fca9db1..3d9f7f4 100644 +--- a/Slim/Utils/Misc.pm ++++ b/Slim/Utils/Misc.pm +@@ -852,15 +852,7 @@ sub fileFilter { + elsif ($validRE && -f _) { + return 0 if $item !~ $validRE; + } +- elsif ($validRE && -l _ && defined ($target = readlink($fullpath))) { +- # fix relative/absolute path +- $target = ($target =~ /^\// ? $target : catdir($dirname, $target)); + +- if (-f $target) { +- return 0 if $target !~ $validRE; +- } +- } +- + return 1; + } + diff --git a/media-sound/logitechmediaserver-bin/files/logitechmediaserver-bin-7.7.3_alpha1-uuid-gentoo.patch b/media-sound/logitechmediaserver-bin/files/logitechmediaserver-bin-7.7.3-uuid-gentoo.patch index c94aef8..c94aef8 100644 --- a/media-sound/logitechmediaserver-bin/files/logitechmediaserver-bin-7.7.3_alpha1-uuid-gentoo.patch +++ b/media-sound/logitechmediaserver-bin/files/logitechmediaserver-bin-7.7.3-uuid-gentoo.patch diff --git a/media-sound/logitechmediaserver-bin/logitechmediaserver-bin-7.7.3_alpha1.ebuild b/media-sound/logitechmediaserver-bin/logitechmediaserver-bin-7.7.3.ebuild index f4e2a2b..0f8c4d9 100644 --- a/media-sound/logitechmediaserver-bin/logitechmediaserver-bin-7.7.3_alpha1.ebuild +++ b/media-sound/logitechmediaserver-bin/logitechmediaserver-bin-7.7.3.ebuild @@ -6,8 +6,8 @@ EAPI="3" inherit eutils user -BUILD_NUM="1372939239" -SRC_DIR="LogitechMediaServer_Perl5.16" +BUILD_NUM="1375965195" +SRC_DIR="LogitechMediaServer_v${PV}" MY_PN="${PN/-bin}" MY_PV="${PV/_*}" MY_P_BUILD_NUM="${MY_PN}-${MY_PV}-${BUILD_NUM}" @@ -21,7 +21,7 @@ SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="" -SRC_URI="http://downloads.slimdevices.com/${SRC_DIR}/${MY_P_BUILD_NUM}.tgz" +SRC_URI="http://downloads.slimdevices.com/${SRC_DIR}/${MY_P}.tgz" # Installation dependencies. DEPEND=" @@ -30,10 +30,18 @@ DEPEND=" " # Runtime dependencies. +# +# TODO: Currently doesn't support Perl 5.16 on amd64 because the +# binaries for that are not packaged in the Logitech release tarball. +# Perl dependency for amd64 could be relaxed when they include those +# (they include the binaries for 5.16/x32 so I think it's just an +# oversight for now.) RDEPEND=" !prefix? ( >=sys-apps/baselayout-2.0.0 ) !prefix? ( virtual/logger ) - >=dev-lang/perl-5.16[ithreads] + >=dev-lang/perl-5.8.8[ithreads] + x86? ( <=dev-lang/perl-5.16[ithreads] ) + amd64? ( <=dev-lang/perl-5.14[ithreads] ) >=dev-perl/Data-UUID-1.202 " @@ -541,9 +549,17 @@ pkg_setup() { } src_prepare() { - # Apply patches + # Apply patches to make LMS work on Gentoo. epatch "${FILESDIR}/${P}-uuid-gentoo.patch" epatch "${FILESDIR}/${P}-client-playlists-gentoo.patch" + + # Add some enhancement patches of my own. + epatch "${FILESDIR}/${P}-fix-transition-sample-rates2.patch" + epatch "${FILESDIR}/${P}-remove-softlink-target-check.patch" + # This can come out when we have a 7.8 ebuild as this patch has + # already been accepted upstream. This is backported from my + # original 7.8 patch. + epatch "${FILESDIR}/${P}-add-alarm-shuffle-setting.patch" } src_install() { |