⬆️ ⬇️

Broadcast your music anywhere in the world and share it with friends.

Subsonic - free media player

using the web interface to play music or your favorite player.



Demo you can try right now .





Here it is worth noting that the article was written by my friends, but it cannot be published in the sandbox, since they do not take software reviews and pieces of software code there.

Help someone who can evgeniy.arapov@gmail.com (:

')

Installation is very simple:

wget downloads.sourceforge.net/project/subsonic/subsonic/4.0.1/subsonic-4.0.1.deb && sudo apt-get -y install openjdk-6-jre lame flac faad vorbis-tools ffmpeg python-mutagen && sudo dpkg -i subsonic-4.0.1.deb





What are the packages for:

openjdk-6-jre - Subsonic is based on java, so install the java machine.

lame flac faad vorbis-tools ffmpeg - for transcoding (installation is optional).

python-mutagen - for fixing tags (installation is optional).



After everything is installed go to the web interface http: // host: 4040

user - admin password - admin







Configure music catalogs:







After the first indexation of the catalog, we see the added music (including from folders with names from Cyrillic characters) and the incorrect encoding of some songs:







After rebooting the computer with Subsonic, it does not display folders with names from Cyrillic characters:







This is solved simply, you can manually, but I made it a script. Create a script that will be



rename directories and files to translit and correct the encoding (for this you need python-mutagen).



#!/bin/bash

#

# .

# *.mp3



shopt -s nullglob

for NAME in *

do

TRS=`echo $NAME |tr : _`

TRS=${TRS ///A};

TRS=${TRS ///a};

TRS=${TRS ///B};

TRS=${TRS ///b};

TRS=${TRS ///v};

TRS=${TRS ///V};

TRS=${TRS ///g};

TRS=${TRS ///G};

TRS=${TRS ///d};

TRS=${TRS ///D};

TRS=${TRS ///e};

TRS=${TRS ///yo};

TRS=${TRS ///Yo};

TRS=${TRS ///zh};

TRS=${TRS ///Zh};

TRS=${TRS ///z};

TRS=${TRS ///Z};

TRS=${TRS ///i};

TRS=${TRS ///I};

TRS=${TRS ///j};

TRS=${TRS ///J};

TRS=${TRS ///k};

TRS=${TRS ///K};

TRS=${TRS ///l};

TRS=${TRS ///L};

TRS=${TRS ///m};

TRS=${TRS ///M};

TRS=${TRS ///n};

TRS=${TRS ///N};

TRS=${TRS ///o};

TRS=${TRS ///O};

TRS=${TRS ///p};

TRS=${TRS ///P};

TRS=${TRS ///r};

TRS=${TRS ///R};

TRS=${TRS ///s};

TRS=${TRS ///S};

TRS=${TRS ///t};

TRS=${TRS ///T};

TRS=${TRS ///u};

TRS=${TRS ///U};

TRS=${TRS ///f};

TRS=${TRS ///F};

TRS=${TRS ///h};

TRS=${TRS ///H};

TRS=${TRS ///c};

TRS=${TRS ///C};

TRS=${TRS ///ch};

TRS=${TRS ///Ch};

TRS=${TRS ///sh};

TRS=${TRS ///Sh};

TRS=${TRS ///sch};

TRS=${TRS ///Sch};

TRS=${TRS ///e};

TRS=${TRS ///E};

TRS=${TRS ///ju};

TRS=${TRS ///Ju};

TRS=${TRS ///ya};

TRS=${TRS ///Ya};

TRS=${TRS ///\`};

TRS=${TRS ///\`};

TRS=${TRS ///\'};

TRS=${TRS ///\'};

TRS=${TRS ///y};

TRS=${TRS ///Y};

TRS=${TRS // /_};

TRS=${TRS //_-_/-};

if [[ `file -b "$NAME" ` == directory ]]; then

mv -v "$NAME" "$TRS"

cd "$TRS"

"$0"

cd ..

else



mv -v "$NAME" "$TRS"

fi

done



find -iname '*.mp3' -print0 | xargs -0 mid3iconv -eCP1251 --remove-v1




* This source code was highlighted with Source Code Highlighter .




Add a task to cron every day at 18:00 to run the script as root:

* 18 * * * root cd /home/zhek/ss && /home/zhek/renamer.sh



All settings are made, you can manually run the script to check everything at once.

cd /home/zhek/ss && /home/zhek/renamer.sh

and index Subsonic:







You can enjoy music, for this we use the same web interface settings before this user https: // host: 4040:







UPD: On the manufacturer's website these features are described:



Support for most formats



Personally, I tried to use it only with Aimp and Windows Media Player, because there is no communicator at hand

Source: https://habr.com/ru/post/96625/



All Articles