Skip to content

Commit

Permalink
Merge pull request #1191 from rern/UPDATE
Browse files Browse the repository at this point in the history
Update
  • Loading branch information
rern authored Jan 17, 2023
2 parents e279490 + d10a9e2 commit f6f1aa5
Show file tree
Hide file tree
Showing 48 changed files with 1,062 additions and 1,145 deletions.
93 changes: 6 additions & 87 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ alias=r1

. /srv/http/bash/addons.sh

# 20230117
file=/etc/systemd/system/spotifyd.service
! grep -q ^User $file && sed -i '/CPUAffinity/ a\User=root' $file
systemctl daemon-reload
systemctl try-restart spotifyd

# 20221229
files=$( ls /etc/systemd/network/e* )
for file in $files; do
Expand All @@ -12,16 +18,6 @@ for file in $files; do
RequiredForOnline=no' >> $file
done

# 20221117
dirbash=/srv/http/bash
dirsettings=$dirbash/settings
dirdata=/srv/http/data
dirmpd=$dirdata/mpd
dirmpdconf=$dirdata/mpdconf
dirshm=$dirdata/shm
dirsystem=$dirdata/system
dirwebradio=/srv/http/data/webradio

# 20221218
[[ -L $dirdata/playlists ]] && chown -h mpd:audio $dirdata/playlists

Expand Down Expand Up @@ -130,80 +126,3 @@ $dirsettings/system.sh dirpermissions

# 20221123
[[ $restartbrowser ]] && systemctl try-restart localbrowser

# 20221117
overrideconf=/etc/systemd/system/mpd.service.d/override.conf
grep -q systemd $overrideconf && installfinish && exit

echo -e "\n$bar Rearrange MPD Configuration...\n"

cat << EOF > $overrideconf
[Unit]
BindsTo=mpdidle.service
[Service]
CPUAffinity=3
ExecStart=
ExecStart=/usr/bin/mpd --systemd /srv/http/data/mpdconf/mpd.conf
EOF
[[ -e /boot/kernel.img ]] && sed -i '/CPUAffinity/ d' $overrideconf

mkdir -p $dirmpdconf

linkConf() {
ln -s $dirmpdconf/{conf/,}$1.conf
}

[[ -e $dirsystem/custom-global ]] && mv $dirsystem/custom-global $dirmpdconf/conf/custom.conf
if [[ -e $dirsystem/soxr.conf ]]; then
echo "\
resampler {
plugin \"soxr\"
$( < $dirsystem/soxr.conf )" > $dirmpdconf/conf/soxr-custom.conf
fi
grep -q 'mixer_type.*none' /etc/mpd.conf \
&& grep -q 'replaygain.*off' /etc/mpd.conf \
&& ! grep -q normalization /etc/mpd.conf \
&& novolume=1
if [[ ! $novolume ]]; then
if grep -q quality.*custom /etc/mpd.conf; then
linkConf soxr-custom
echo custom > $dirsystem/soxr
else
linkConf soxr
echo 'very high' > $dirsystem/soxr
fi
fi

grep -q auto_update /etc/mpd.conf && linkConf autoupdate
if grep -q audio_buffer /etc/mpd.conf; then
buffer=$( grep audio_buffer_size /etc/mpd.conf | cut -d'"' -f2 )
echo 'audio_buffer_size "'$buffer'"' > $dirmpdconf/conf/buffer.conf
linkConf buffer
fi
if grep -q max_output_buffer_size /etc/mpd.conf; then
outputbuffer=$( grep max_output_buffer_size /etc/mpd.conf | cut -d'"' -f2 )
echo 'max_output_buffer_size "'$outputbuffer'"' > $dirmpdconf/conf/outputbuffer.conf
linkConf outputbuffer
fi
if ! grep -q replaygain.*off /etc/mpd.conf; then
replaygain=$( grep replaygain /etc/mpd.conf | cut -d'"' -f2 )
echo 'replaygain "'$replaygain'"' > $dirmpdconf/conf/replaygain.conf
linkConf replaygain
fi
grep -q volume_normalization /etc/mpd.conf && linkConf normalization
[[ -e $dirshm/audiocd ]] && linkConf cdio
[[ -e $dirsystem/custom && -e $dirmpdconf/conf/custom.conf ]] && linkConf custom
grep -q plugin.*ffmpeg /etc/mpd.conf && linkConf ffmpeg
grep -q type.*httpd /etc/mpd.conf && linkConf httpd
systemctl -q is-active snapserver && linkConf snapserver

rm -f $dirsystem/{buffer,bufferoutput,replaygain,soxr}.conf $dirsystem/{crossfade,streaming}

systemctl daemon-reload

$dirsettings/player-conf.sh

installfinish

echo -e "$info Backup of Data and Settings: Backup again to include new configuration"
22 changes: 9 additions & 13 deletions srv/http/assets/css/common.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@font-face {
font-family : rern;
src : url( '/assets/fonts/rern.woff2?v.2022122700' ) format( 'woff2' );
src : url( '/assets/fonts/rern.woff2?v.2023010200' ) format( 'woff2' );
font-display : block;
font-style : normal;
font-weight : normal;
Expand Down Expand Up @@ -40,7 +40,7 @@
.fa-arrow-right::before { content: '\F603' }
.fa-artist::before { content: '\F556' }
.fa-audiocd::before { content: '\F538' }
.fa-backspace:before { content: '\F608' }
.fa-backspace::before { content: '\F608' }
.fa-bars::before { content: '\F51C' }
.fa-bio::before { content: '\F51D' }
.fa-bookmark::before { content: '\F550' }
Expand All @@ -50,7 +50,7 @@
.fa-brush::before { content: '\F536' }
.fa-camilladsp::before { content: '\F59D'; position: absolute; color: var( --cg60 ); }
.fa-camilladsp::after { content: '\F59C'; position: relative; } /* position: relative - fix order */
.fa-capslock:before { content: '\F607' }
.fa-capslock::before { content: '\F607' }
.fa-check::before { content: '\F51B' }
.fa-chevron-down::before { content: '\F605' }
.fa-chevron-up::before { content: '\F604' }
Expand All @@ -60,6 +60,8 @@
.fa-conductor::before { content: '\F559' }
.fa-consume::before { content: '\F566' }
.fa-copy::before { content: '\F54E' }
.fa-coverart::before { content: '\F58A'; position: absolute; }
.fa-coverart::after { content: '\F58B'; position: relative; color: #000; opacity: 40%; text-shadow: none; }
.fa-crop::before { content: '\F568' }
.fa-dabradio::before { content: '\F589' }
.fa-dabupdate::before { content: '\F589'; animation: blinkopaque 1.5s linear infinite; }
Expand All @@ -85,7 +87,7 @@
.fa-guide::before { content: '\F579' }
.fa-hdmi::after { content: '\F58B' }
.fa-help::before { content: '\F560' }
.fa-hide:before { content: '\F575' }
.fa-hide::before { content: '\F575' }
.fa-i2saudio::before { content: '\F571' }
.fa-info-circle::before { content: '\F561' }
.fa-input::before { content: '\F529' }
Expand Down Expand Up @@ -158,7 +160,7 @@
.fa-search::before { content: '\F56A' }
.fa-set0::before { content: '\F515' }
.fa-settings::before { content: '\F509' }
.fa-shift:before { content: '\F606' }
.fa-shift::before { content: '\F606' }
.fa-shuffle::before { content: '\F513' }
.fa-single::before { content: '\F514' }
.fa-sliders::before { content: '\F50B' }
Expand Down Expand Up @@ -319,13 +321,6 @@ codered {
animation: none !important;
}

.iconcover {
content : url( '/assets/img/iconcover.svg' );
width : 24px !important;
margin : 5px !important;
border : 1px solid hsl(0,0%,20%);
}

/* banner() */
#banner .fa-firefox::before { color: #000 }
#banner {
Expand Down Expand Up @@ -805,8 +800,9 @@ input[type=number]:disabled {
}
#infoContent .fa-eye {
width: 30px;
text-align: center;
margin-right: -25px;
text-align: center;
font-size: 20px;
}
input[type=radio],
input[type=checkbox] {
Expand Down
5 changes: 3 additions & 2 deletions srv/http/assets/css/equalizer.css
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,14 @@
}
#eq i {
font-size: 24px;
vertical-align: -7px !important;
}
#eq i,
#eqname {
#eq i {
position: relative;
}
#eqname {
padding-right: 21px;
vertical-align: -5px;
text-align: center;
}
#eqsave {
Expand Down
62 changes: 28 additions & 34 deletions srv/http/assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,6 @@ i.map.disabled, .map.disabled i {
.submenu.active {
background: var( --cgl );
}
.menu .iconcover {
margin: -2px 8px 0 !important;
vertical-align: middle;
}
#settings .gr {
font-size: 22px;
}
Expand Down Expand Up @@ -1129,6 +1125,7 @@ i.map.disabled, .map.disabled i {
#lyricstitle {
display: inline-block;
margin-left: 5px;
width: calc( 100vw - 84px );
font-size: 26px;
font-weight: 300;
line-height: 40px;
Expand Down Expand Up @@ -1315,38 +1312,39 @@ i.map.disabled, .map.disabled i {
}
.bk-cover {
bottom: 0;
height: 34px;
}
.coveredit {
position: absolute;
right: 0;
bottom: 0;
width: 34px;
height: 34px;
z-index: 17;
width: 40px !important;
height: 40px !important;
line-height: 40px;
}
.coveredit i,
.bk-cover i {
margin: 0 !important;
font-size: 24px !important;
color: var( --cw ) !important;
}
.bk-cover i {
line-height: 34px !important;
}
.cover-save {
left: 0;
width: 40px !important;
text-align: center;
}
.coveredit.cover-save i {
width: 30px !important;
height: 30px;
margin-left: 2px;
font-size: 24px;
line-height: 30px !important;
margin-top: 5px !important;
text-align: center;
color: var( --cgd ) !important;
background: var( --cw );
color: var( --cw ) !important;
background: var( --cg );
border-radius: 50%;
box-shadow: -1px 1px 2px #000000;
}
#bannerIcon .iconcover {
margin: 3px;
}
#infoTop .iconcover {
margin-top: 5px !important;
width: 28px !important;
}
.infoimgname {
line-height: 25px;
clear: both;
Expand Down Expand Up @@ -1684,8 +1682,7 @@ i.map.disabled, .map.disabled i {
#pl-list li.active.updn {
background: var( --cma );
}
.lib-icon,
.pl-icon,
.li-icon,
#lib-list li span i {
margin-right: 10px;
}
Expand Down Expand Up @@ -1745,8 +1742,7 @@ i.map.disabled, .map.disabled i {
#pl-list li.active .pl-remove {
color: var( --cga ) !important;
}
.lib-icon,
.pl-icon,
.li-icon,
#pl-savedlist span::before,
#pl-savedlist i,
#lib-list i {
Expand All @@ -1757,8 +1753,7 @@ i.map.disabled, .map.disabled i {
text-align: center;
color: var( --cg60 );
}
.lib-icon,
.pl-icon {
.li-icon {
float: left;
display: block;
min-height: 20px;
Expand Down Expand Up @@ -1799,10 +1794,11 @@ li.active .iconthumb {
#li-count {
margin-left: 20px;
font-weight: 300;
}
#li-count span {
color: var( --cw );
}
#li-count i {
color: var( --cg60 );
}
#pl-count,
#pl-path {
display: inline-block;
Expand Down Expand Up @@ -1881,8 +1877,7 @@ li.active .li1 bl {
#pl-list .unsaved {
color: var( --cw );
}
li.active .lib-icon,
li.active .pl-icon,
li.active .li-icon,
li.active .li1 i,
li.active .li2,
li.active .li2 a,
Expand All @@ -1891,7 +1886,7 @@ li.active .time,
.licover.active i.fa-file-playlist {
color: var( --cga ) !important;
}
li.active .pl-icon.wh {
li.active .li-icon.wh {
color: var( --cw ) !important;
}
li.active gr {
Expand Down Expand Up @@ -1923,7 +1918,7 @@ li.active .li2 bl {
.pl-sortable-ghost {
background: var( --cg60 );
}
.pl-sortable-ghost .pl-icon {
.pl-sortable-ghost .li-icon {
visibility: hidden;
}
.pl-sortable-ghost a,
Expand Down Expand Up @@ -2003,7 +1998,6 @@ li.active .li2 bl {
width: calc( 100% - 40px );
margin: -13px 0 7px 5px;
line-height: 24px;
color: var( --cw );
cursor: pointer;
}
.tagmessage img {
Expand Down Expand Up @@ -2267,7 +2261,7 @@ li.active .li2 bl {
#volume-knob,
#guide-lyrics { display: none; }
#coverart-block { margin-bottom : 0; }
#divcover .iconcover,
#divcover .fa-coverart,
#divcover .fa-save { top: 5px; }
}
@media ( max-width: 480px ) and ( max-height: 320px ) {
Expand Down
8 changes: 5 additions & 3 deletions srv/http/assets/css/select2.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@
line-height : 40px !important;
border-radius : 3px;
}
.select2-container--focus .select2-selection__rendered {
outline: 2px solid var( --cgl );
}
.select2-results__option {
padding-left: 8px;
}
Expand Down Expand Up @@ -81,3 +78,8 @@
.select2-container--disabled .select2-selection__arrow {
display: none;
}
@media ( hover:hover ) {
.select2-container--focus .select2-selection__rendered {
outline: 2px solid var( --cgl );
}
}
Loading

0 comments on commit f6f1aa5

Please sign in to comment.