You are not logged in.
And i can only repeat myself: mpd works fine with files outside of the library...
Put
bind_to_address "/path/to/socket"
in your mpd.conf and any client connecting to that socket will be able to use files from anywhere on your HD.
He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.
Douglas Adams
Offline
And i can only repeat myself: mpd works fine with files outside of the library...
Putbind_to_address "/path/to/socket"
in your mpd.conf and any client connecting to that socket will be able to use files from anywhere on your HD.
what do you mean "use files from anywhere on your hd"? because i just had a look at http://mpd.wikia.com/wiki/MusicPlayerDaemonCommands and it looks like in order to be able to play a file, it must be in the music database, which is kinda limiting. are you saying you can just play files and create playlists from files who are *not* in the music database?
< Daenyth> and he works prolifically
4 8 15 16 23 42
Offline
Rasi wrote:And i can only repeat myself: mpd works fine with files outside of the library...
Putbind_to_address "/path/to/socket"
in your mpd.conf and any client connecting to that socket will be able to use files from anywhere on your HD.
what do you mean "use files from anywhere on your hd"? because i just had a look at http://mpd.wikia.com/wiki/MusicPlayerDaemonCommands and it looks like in order to be able to play a file, it must be in the music database, which is kinda limiting. are you saying you can just play files and create playlists from files who are *not* in the music database?
i still haven't found out a way to add random (outside of music database) files ...
btw I use the following config now:
music_directory "~/audio"
playlist_directory "~/.local/share/mpd/playlists"
db_file "~/.local/share/mpd/mpd.db"
log_file "~/.local/share/mpd/mpd.log"
error_file "~/.local/share/mpd/mpd.error"
pid_file "~/.cache/mpd.pid"
state_file "~/.local/share/mpd/mpdstate"
bind_to_address "127.0.0.1"
#port "6600"
# "default", "secure", or "verbose".
#log_level "default"
#replaygain "album"
#replaygain_preamp "0"
#volume_normalization "no"
works quite nicely. i just start mpd by doing `mpd .config/mpd/mpd.conf` and bam, it runs in userspace and adheres to the xdg spec
< Daenyth> and he works prolifically
4 8 15 16 23 42
Offline
i still haven't found out a way to add random (outside of music database) files ...
If you want to play a song outside your database, brisbin33 cooked up this little bash scheme:
#!/bin/sh
#
# creates a temp symlink to a file outside mpd DB
# adds it to the playlist and plays it
#
###
# usage: playnow [file]
[ $# -ne 1 ] && exit 1
# find our music directory
mdir="$(awk -F '"' '/^music_directory/ {print $2}' /etc/mpd.conf)"
mdir="${mdir/\~/$HOME}"
# no matter what we pass, or where we are, we get
# an absolute path to the file we want. nifty.
file="$(basename "$1")"
dir="$(dirname "$1")"
cd "${dir:-./}" && dir="$PWD" || exit 1
# clean the temp dir and make the new symlink
rm -rf "$mdir/temp"; mkdir "$mdir/temp"
ln -s "$dir/$file" "$mdir/temp/$file"
# update the db, add the new file, and play it
mpc --no-status update "temp/$file"
mpc --no-status add "temp/$file" &>/dev/null || exit 1
mpc play $(mpc playlist | wc -l)
exit $?
And for playing an m3u or pls playlist there are a couple of scripts in the hacks section of the mpd wiki.
Scott
Offline
And perl:
#!/usr/bin/perl
# mpc-play
# version 0.2
# by Ilya "Voyager" Schurov (http://comm.noo.ru/iv-en/)
$MUSIC_PREFIX="/mnt/Music_1/";
$TEMP_DIR=".temp";
$SCRIPT_NAME="mpc-play";
# warning! all symlinks in $MUSIC_PREFIX/$TEMP_DIR will be lost on start!
$DEBUG=0;
$PWD=`pwd`;
chomp $PWD;
if(!@ARGV)
{
print "Usage:\n$SCRIPT_NAME <files-to-play>\n";
}
say_and_do("mpc --no-status stop",$DEBUG);
say_and_do("mpc --no-status clear",$DEBUG);
# removing symlinks from $TEMP_DIR
while(<$MUSIC_PREFIX/$TEMP_DIR/*>)
{
unlink if(-l);
}
foreach $file (@ARGV)
{
$link=$file;
# stripping slashes from arguments
$link=~s/\//_/g;
if($file!~/^\//)
{
$file="$PWD/$file";
}
symlink("$file","$MUSIC_PREFIX/$TEMP_DIR/$link")
|| die("Can't create symlink from $file to $MUSIC_PREFIX/$TEMP_DIR/$link: $!");
push @links, $link;
}
say_and_do("mpc update $TEMP_DIR",$DEBUG);
# now we need to wait while mpd updating DB
do
{
$stat=`mpc`;
sleep(0.1);
}while($stat=~/^Updating DB/m);
# generating playlist
foreach $link(@links)
{
$link=~s/\`/\\\`/g;
say_and_do("mpc --no-status add \"$TEMP_DIR/$link\"",$DEBUG);
}
#let's the music begins! :)
say_and_do("mpc play",$DEBUG);
sub say_and_do
{
my $str=shift;
my $debug=shift;
print "$str\n" if($debug);
system($str);
}
Offline
hmm those are pretty ugly workarounds. i've gone through their mantis, but nothing about this.
< Daenyth> and he works prolifically
4 8 15 16 23 42
Offline
Auto quote mode from an other post :
Please make a try of plait / plaiter player
For all cli lovers, it's a killer KISS app.The way it's handle music is base on files and directories and text files.
No db no bloat. I never care again about how to tag compilation, multiple artists ...
Combination for mixing songs, construct dynamical lists is very impressive.It's a pure way of life.
Please refer to:
http://plait.sourceforge.net/
https://aur.archlinux.org/packages.php?ID=35525I've mention a bug here :
https://bbs.archlinux.org/viewtopic.php?id=108455thx alterecco for the AUR package.
You have 2 bash scripts plaiter who pilot mpg123 via playlists and plait who manage index of your audio file in your filesystem.
mpg123 or mpg321 are most simpler players because mplayer, vlc ... are already heavy full features complex softwares for playing audio files.
Offline