TRF小兵的怨念空間

歡迎來到閒聊式的學習分享網誌

samurize 進階 (線上自動更新專輯圖片顯示)

leave a comment »

最近發現Last.fm這個音樂社群網站上面的資訊
慢慢有人去注意到了…

foobar2000其中有一個插件叫Biography View
http://foo2k.chottu.net/

可以去截取Last.fm上的資料顯示在foobar 2000的介面面板上
插件還提供專輯、歌手圖片下載的功能
所以要跟samurize作結合是很簡單的事….
不過要達到目的還需要Now Playing Simple這個插件
http://skipyrich.com/wiki/Foobar2000:Now_Playing_Simple

Biography View上只要設定圖片的存放位置好讓samurize去抓就好
而且存放路徑支援fb2k的語法…真是太棒了
但是問題來了…他的圖片格式不是固定的…
有三種可能性…png,jpg,gif
後面在講解決方法好了…

我歌手圖片的路徑是
C:\Program Files\Samurize\LAST.FM\artist\%artist%

專輯圖片的路徑是
C:\Program Files\Samurize\LAST.FM\album\%album%

這個時候就要開始用到Now Playing Simple了
Now Playing Simple這個插件功能是
你有一個編輯區域
可以設定你想要的文字或參數
然後將內容存放在txt文字檔內

我只要在編輯區域輸入
C:\Program Files\Samurize\LAST.FM\album\%album%.jpg
在使用Samurize裡面的文字檔案讀取的功能即可
但是我前面提到…輸出格式有三種
所以…三個可能性都要輸入上去

我的設定是
C:\Program Files\Samurize\LAST.FM\artist\%artist%.jpg$char(10)
C:\Program Files\Samurize\LAST.FM\artist\%artist%.png$char(10)
C:\Program Files\Samurize\LAST.FM\artist\%artist%.gif$char(10)
C:\Program Files\Samurize\LAST.FM\album\%album%.jpg$char(10)
C:\Program Files\Samurize\LAST.FM\album\%album%.png$char(10)
C:\Program Files\Samurize\LAST.FM\album\%album%.gif$char(10)
%artist%$char(10)
%title%$char(10)
%album%$char(10)
%lastfm_bio%

$char(10)是換行的語法
%lastfm_bio%是歌手資訊

在利用Samurize裡面的文字檔案讀取功能
設定從第幾行開始讀取,最大讀取行數
然後文字再轉圖片顯示時如果圖片有存在
就會顯示出來了….所以同一個位置要重疊這三種圖片路徑設定

經過我測式抓取機率還挺高的
懶人用還挺方便的….
最新版本開始加入Wikipedia上的情報
期待他繼續更新啊…
目前好像只能輸出Last.fm的資訊
歌手資訊的內容有多有少
很難去配合….
這點還待研究…

作者為TRF小兵

四月 16, 2010 於 10:31 下午

發表迴響

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 變更 )

Twitter picture

You are commenting using your Twitter account. Log Out / 變更 )

Facebook照片

You are commenting using your Facebook account. Log Out / 變更 )

連結到 %s

Follow

Get every new post delivered to your Inbox.