DAAPD + iTunes + Bonjour

6月 29th, 2005 2 Comments »

我在一台 FC3 Server 上架了一個 daapd,這樣,其他的電腦,不管是 Windows 或是 Mac 只要有裝 iTunes 就可以撥放 daapd 分享出來的音樂了

Fedora 相關的套件在 DAG 的網站上都有打包好的 rpm 可以直接安裝
主要會用到的是 daapd 及 faac (如果也想聽 aac 格式的音樂)
安裝好套件後,可以參考裡面附的範例設定檔,稍微修改一下即可
我的設定檔如下:

/etc/daapd.conf

Port            3689
ServerName      DAAP
DBName          candyz's MP3 DAAPd
Password        mypasswd
Root            /var/ftp/MP3
Cache           /tmp/.daapd-cache
Timescan        2
Rescan          0

然後,把 mp3 aac 等音樂,都丟到 /var/ftp/MP3 目錄下即可
由於 daapd 本身沒有提供 init.d 的 scripts,所以我自己寫了一個:

/etc/init.d/daapd

#!/bin/sh
#
# A startup script for the daapd DAAP server
#
# chkconfig: 345 98 2
# description: This script is used to start the daapd \
# server as a background process.\
#
# Usage /etc/init.d/daapd start|stop|reload|restart|status

# Source function library.
. /etc/init.d/functions

DAAP_CONF=/etc/daapd.conf
DAAP_LOG=/var/log/daapd_access_log
prog=DAAPd
exe=/usr/bin/daapd

start() {
        echo -n "Starting $prog: "
        if [ -f /var/lock/subsys/daapd ] ; then
                echo_failure
                echo
                exit 1;
        fi
        daemon $exe -c $DAAP_CONF >> $DAAP_LOG &
        RETVAL=$?
        [ $RETVAL = 0 ] && touch /var/lock/subsys/daapd && echo_success
        echo
        return $RETVAL
}

stop() {
        echo -n "Stopping $prog: "
        killproc $exe
        RETVAL=$?
        echo
        [ $RETVAL = 0 ] && rm -f /var/lock/subsys/daapd /var/run/daapd.pid
}

reload()
{
        echo -n $"Reloading $prog:"
        killproc $exe -HUP
        RETVAL=$?
        echo
}

case "$1" in
start)
        start
        ;;
stop)
        stop
        ;;
reload)
        reload
        ;;
restart)
        stop
        start
        ;;
status)
        status $exe
        RETVAL=$?
        ;;
*)
        echo "Usage: daapd {start|stop|reload|restart|status}"
        exit 1
esac

然後執行:
$ chkconfig daapd reset

要啟動 daapd 執行:
$ /etc/init.d/daapd start 即可

接下來,我要讓 daapd 也可以經由 Bonjour 分享出來
(關於 Bonjour 在 Fedora 上的設定,請參考 這裡)
因此,Bonjour 的設定檔要多加一行如下:

/etc/howl/mDNSResponder.conf

“[cacndyz] MP3 (DAAPd)” _daap._tcp local. 3689

現在,我的小白及 Mac Mini 硬碟上不用放 mp3 了,只要開啟 iTunes 後,就會自動抓到 DAAPd
輸入所設定的密碼後,就可以聽歌了…….

daapd

Podcast, iTunes 4.9, and New iPod

6月 29th, 2005 Comments Off

Apple 昨天推出了支援 Podcast 的 iTunes 4.9
把 iTunes 升級完畢,但支援中文(國語)的 Podcast 網站少的可憐
都不知道要去哪裡找,或許等過一陣子就會多起來了吧
同時, Apple 也推出新版的 iPod 支援 Podcast 且是彩色螢幕的
還好一直沒下手買 iPod,總覺得買 Apple 的硬體,好像都是早買早死
除非等到硬體功能比較完整且降價過的再來買比較不會買到地雷
看來,得找個時間來玩一玩 Podcast 了

FireStats icon Powered by FireStats