Giter Club home page Giter Club logo

douban.fm's Introduction

douban.fm

简洁优雅的豆瓣电台命令行版,基于 Node.js。

[WIP] 目前 master 分支正在使用 ES6 重写,处于不稳定状态,新用户请使用 npm 中的最后一个稳定版本.

screenshot

功能特性

  • 支持歌曲加心
  • 支持私人电台、红心电台
  • 支持离线播放本地电台
  • 支持 PRO 用户高码率歌曲
  • 支持滚动歌词显示
  • 支持部分 ID3 信息补全
  • 支持HTTP代理

如何安装

从 NPM 中安装稳定的版本:

$ [sudo] npm install douban.fm -g

更推荐使用 cnpm 镜像源加速安装

$ [sudo] npm install douban.fm -g \
         --disturl=http://dist.u.qiniudn.com \
         --registry=http://r.cnpmjs.org

从 Git 仓库中安装最新的开发版本:

$ [sudo] npm install git://github.com/turingou/douban.fm.git -g \
         --disturl=http://dist.u.qiniudn.com \
         --registry=http://r.cnpmjs.org

模块依赖

由于需要使用到 speaker 等模块,安装时需要编译文件,对安装环境有一定要求。 推荐在 Mac OSX 下使用,在安装之前或安装遇到问题时,确保以下依赖状态正常:

Linux & Mac OSX

  • 安装了 Python 2.x 并配置好环境变量
  • 安装了 Node-gyp 编译工具
  • 安装了 xcode,或已安装 xcodebuild 工具和 command line tools 工具集
  • 曾经安装过 xcode 并已同意用户协议,确保更新 xcode 版本后同意过用户协议
  • 非 Mac OSX 用户需要检查 node-speaker 模块的外部依赖情况,详见 node-speaker 文档,按照你使用的操作系统安装相应外部依赖
  • 确保权限一致。如果没有使用 sudo 则尝试使用 sudo 安装
  • 各种 Linux 发行版外部依赖问题,先确认是否安装了 libasound2,如果没有,尝试 sudo apt-get install libasound2-dev,fedora 下 yum install alsa-lib-devel

Windows

  • 此项目的部分依赖模块在 Windows 下支持状况不是很好,因此不建议在 Windows 环境下安装。
  • 最新版本的 x86 Node.js for Windows, 注意不要安装 x64 版本。
  • 安装 Visual C++ 2010 Express
  • 安装 Python 2.7, installed in the default location of C:\Python27

安装的时候都用默认的下一步吧,保险起见再重启一下电脑。现在,你的 Windows 系统就可以安装带有 c++ addons 的 Node.js 模块了。

如果遇到无法解决的问题,请到 issue 板块先检索是否有人遇到相同的错误,或者直接发帖求助。

使用方法

开启命令行豆瓣电台:

$ douban.fm

收听私人频道需要设置账户信息。账户信息、配置文件将会保存在 ~/.douban.fm.profile.json( >= 0.1.2 版本后) 歌曲将会默认保存在 ~/douban.fm 目录下,当然你也可以通过配置自定义歌曲保存的目录。

使用配置向导,配置豆瓣电台账户信息、下载目录路径以及使用更多特性功能:

$ douban.fm config

菜单快捷键列表

在相应的命令行菜单中,按下以下快捷键,可以在收听豆瓣电台的过程中,标注自己喜欢的红心歌曲, 跳转到专辑的介绍页面,或者分享这首歌曲到你的新浪微博。

[return]      - >     播放另一个频道,或者重新播放当前频道 (PLAY)
[backspace]   - >     停止播放当前歌曲或频道 (DELETE)
[n]           - >     本频道列表的下一首歌曲 (NEXT)
[l]           - >     添加到红心列表或者删除红心 (LOVE)
[s]           - >     分享当前歌曲到新浪微博 (SHARE)
[r]           - >     开启或关闭歌词,默认关闭歌词显示 (LRC)
[g]           - >     跳转到当前播放歌曲的专辑页面 (GOTO)
[q]           - >     退出豆瓣电台 (QUIT)

如果你忘了快捷键设置,可以打开配置向导,查看帮助菜单,或者:

$ douban.fm help

支持 Pro 用户高码率音乐

支持 pro 用户收听高码率 mp3,pro 用户默认会先寻找 192kbps 的歌曲播放,非 pro 用户不受影响。 在同样的网络情况下,收听高码率的电台可能意味着加载资源的速度更慢,但是目前豆瓣电台命令行版还不支持随时自定义码率。

歌词显示

豆瓣电台命令行版 >= 0.1.2 版本支持显示歌词功能,这个功能尚在调试中,歌词可能无法与音乐精确匹配,歌词显示默认关闭,可以使用快捷键 R 开启,开启后在下一首歌曲播放时将会加载歌词。

本地电台

豆瓣电台命令行版 >= 0.1.2 版本支持本地电台功能,这意味着在离线情况下,或者网络不佳,通信失败的情况下,豆瓣电台命令行版会自动切换到本地电台进行播放,方便您在旅行时使用豆瓣电台。

ID3 信息补全

豆瓣电台命令行版 >= 0.1.2 版本支持本地 ID3 信息补全,方便用户同步到 iTunes 等播放软件。目前暂不支持为歌曲添加封面。此功能需要外部依赖 ffmpeg 使用前确保已经安装 ffmpeg command-line toollibav fork

HTTP代理

支持HTTP代理设置,代理格式为http://IP_ADDRESS:PORT

范例代码

豆瓣电台 SDK 已迁移到 douban-sdk 模块,请参考此模块接口文档使用,如需更多使用范例,可以参考本项目下的 ./libs/sdk.js 文件。

致谢

豆瓣电台命令行版作为一款开源命令行播放器,有你们的参与才能日趋完善:

单元测试 (Mocha)

$ git clone https://github.com/turingou/douban.fm.git
$ cd douban.fm
$ npm install --disturl=http://dist.u.qiniudn.com --registry=http://r.cnpmjs.org
$ npm test

MIT license

Copyright (c) 2013 turing <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


docor built upon love by docor v0.1.2

douban.fm's People

Contributors

acecode avatar anson0370 avatar buhe avatar fengmk2 avatar guo-yu avatar iamgqb avatar iamxz avatar leask avatar peachscript avatar qivhou avatar stormluke avatar youxiachai avatar zhuangya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

douban.fm's Issues

一首歌听不完会抛出错误

stream.js:94
throw er; // Unhandled stream error in pipe.
^
Error: read ECONNRESET
at errnoException (net.js:884:11)
at TCP.onread (net.js:539:19)

unhandled - -

私人兆赫播放停止

听着听着就暂停了,不知道是下载不了后续的歌曲了还是程序bug
只能重新播放整个兆赫

选择码率

会员需要选择码率选项啊。 很棒的工具。加油。(PS 我就提提issue好了)

开发版安装出错啊

Mini:~ yangsq$ sudo npm install https://github.com/turingou/douban.fm.git -g
Password:
npm http GET https://github.com/turingou/douban.fm.git
npm http 200 https://github.com/turingou/douban.fm.git
npm ERR! not a package /Users/yangsq/tmp/npm-5786-a8KQQuT-/1390185350581-0.3966983426362276/tmp.tgz
npm ERR! Error: ENOENT, open '/Users/yangsq/tmp/npm-5786-a8KQQuT-/1390185350581-0.3966983426362276/package/package.json'
npm ERR! If you need help, you may report this entire log,
npm ERR! including the npm and node versions, at:
npm ERR! http://github.com/isaacs/npm/issues

npm ERR! System Darwin 13.0.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "https://github.com/turingou/douban.fm.git" "-g"
npm ERR! cwd /Users/yangsq
npm ERR! node -v v0.10.24
npm ERR! npm -v 1.3.21
npm ERR! path /Users/yangsq/tmp/npm-5786-a8KQQuT-/1390185350581-0.3966983426362276/package/package.json
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/yangsq/npm-debug.log
npm ERR! not ok code 0

douban.fm: command not found

不知道为什么报这个错误

douban.fm: command not found

就是用

$ sudo npm install douban.fm -g

安装的

是否在播放的字符提示

现象

现在无论是否在播放命令行的显示都是

  › 轻音乐 ♥ 男&女 64kbps ... ♪ ♫ ♫ ♪ ♫ ♫ ♪ ♪ ... Love Scene • Yiruma 2001

只有那堆音符是否在跳的区别

问题

动画只有凝视一段时间才能发觉差异,
对于程序猿而言就 图样图森破 了,无法一眼明确状态的都是渣!

建议

将频道指示字符升级,根据状态进行变化:

  >     当前频道
  >>    在播放
  ||    已暂停

以上

OS X 10.9.1 锁屏之后音乐还是在放

锁屏之后音乐还是在放,

另外,开了 douban.fm 之后,锁屏的相应速度好慢,可以装个 alfred 然后执行 lock 看看 :) 不过不确定锁屏慢是不是因为 douban.fm 的缘故。

安装错误

ggice@ggice-PAF4:~$ sudo npm install douban.fm -g
[sudo] password for ggice:
npm http GET https://registry.npmjs.org/douban.fm
npm http 304 https://registry.npmjs.org/douban.fm
npm http GET https://registry.npmjs.org/player
npm http GET https://registry.npmjs.org/beer
npm http GET https://registry.npmjs.org/term-list
npm http GET https://registry.npmjs.org/optimist
npm http GET https://registry.npmjs.org/underscore
npm http GET https://registry.npmjs.org/consoler
npm http GET https://registry.npmjs.org/colorful
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/paramrule
npm http GET https://registry.npmjs.org/sprintf
npm http GET https://registry.npmjs.org/exeq
npm http 304 https://registry.npmjs.org/term-list
npm http 304 https://registry.npmjs.org/consoler
npm http 304 https://registry.npmjs.org/player
npm http 304 https://registry.npmjs.org/colorful
npm http 304 https://registry.npmjs.org/beer
npm http 304 https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/underscore
npm http 304 https://registry.npmjs.org/optimist
npm http 304 https://registry.npmjs.org/sprintf
npm http 304 https://registry.npmjs.org/paramrule
npm http 304 https://registry.npmjs.org/exeq
npm http GET https://registry.npmjs.org/request
npm http GET https://registry.npmjs.org/term-canvas/0.0.5
npm http GET https://registry.npmjs.org/keypress
npm http GET https://registry.npmjs.org/colors
npm http GET https://registry.npmjs.org/speaker
npm http GET https://registry.npmjs.org/lame
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/win-spawn
npm http GET https://registry.npmjs.org/arale
npm http GET https://registry.npmjs.org/wordwrap
npm http GET https://registry.npmjs.org/minimist
npm http 304 https://registry.npmjs.org/term-canvas/0.0.5
npm http 304 https://registry.npmjs.org/colors
npm http 304 https://registry.npmjs.org/lame
npm http 304 https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/win-spawn
npm http 304 https://registry.npmjs.org/arale
npm http 304 https://registry.npmjs.org/wordwrap
npm http 304 https://registry.npmjs.org/minimist
npm http 304 https://registry.npmjs.org/request
npm http GET https://registry.npmjs.org/qs
npm http GET https://registry.npmjs.org/json-stringify-safe
npm http GET https://registry.npmjs.org/forever-agent
npm http GET https://registry.npmjs.org/node-uuid
npm http GET https://registry.npmjs.org/mime
npm http GET https://registry.npmjs.org/tough-cookie
npm http GET https://registry.npmjs.org/form-data
npm http GET https://registry.npmjs.org/tunnel-agent
npm http 304 https://registry.npmjs.org/keypress
npm http GET https://registry.npmjs.org/http-signature
npm http GET https://registry.npmjs.org/oauth-sign
npm http GET https://registry.npmjs.org/hawk
npm http GET https://registry.npmjs.org/aws-sign2
npm http 304 https://registry.npmjs.org/speaker
npm http 304 https://registry.npmjs.org/node-uuid
npm http 304 https://registry.npmjs.org/mime
npm http 304 https://registry.npmjs.org/qs
npm http 304 https://registry.npmjs.org/json-stringify-safe
npm http 304 https://registry.npmjs.org/forever-agent
npm http 304 https://registry.npmjs.org/tough-cookie
npm http 304 https://registry.npmjs.org/form-data
npm http GET https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/debug
npm http GET https://registry.npmjs.org/readable-stream
npm http 304 https://registry.npmjs.org/http-signature
npm http 304 https://registry.npmjs.org/tunnel-agent
npm http 304 https://registry.npmjs.org/oauth-sign
npm http 304 https://registry.npmjs.org/hawk
npm http 304 https://registry.npmjs.org/aws-sign2
npm http GET https://registry.npmjs.org/combined-stream
npm http 304 https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/ctype/0.5.2
npm http GET https://registry.npmjs.org/asn1/0.1.11
npm http GET https://registry.npmjs.org/assert-plus/0.1.2
npm http 304 https://registry.npmjs.org/debug
npm http 304 https://registry.npmjs.org/readable-stream
npm http GET https://registry.npmjs.org/punycode
npm http GET https://registry.npmjs.org/boom
npm http GET https://registry.npmjs.org/hoek
npm http GET https://registry.npmjs.org/sntp
npm http GET https://registry.npmjs.org/cryptiles
npm http GET https://registry.npmjs.org/core-util-is
npm http GET https://registry.npmjs.org/debuglog/0.0.2
npm http 304 https://registry.npmjs.org/assert-plus/0.1.2
npm http 304 https://registry.npmjs.org/combined-stream
npm http 304 https://registry.npmjs.org/asn1/0.1.11
npm http 304 https://registry.npmjs.org/boom
npm http 304 https://registry.npmjs.org/ctype/0.5.2
npm http GET https://registry.npmjs.org/delayed-stream/0.0.5
npm http 304 https://registry.npmjs.org/punycode
npm http 304 https://registry.npmjs.org/hoek
npm http 304 https://registry.npmjs.org/sntp
npm http 304 https://registry.npmjs.org/core-util-is
npm http 304 https://registry.npmjs.org/cryptiles
npm http 304 https://registry.npmjs.org/debuglog/0.0.2

[email protected] install /usr/local/lib/node_modules/douban.fm/node_modules/player/node_modules/speaker
node-gyp rebuild

npm http 304 https://registry.npmjs.org/delayed-stream/0.0.5

[email protected] install /usr/local/lib/node_modules/douban.fm/node_modules/player/node_modules/lame
node-gyp rebuild

make: Entering directory /usr/local/lib/node_modules/douban.fm/node_modules/player/node_modules/speaker/build' CC(target) Release/obj.target/output/deps/mpg123/src/output/alsa.o ../deps/mpg123/src/output/alsa.c:19:28: fatal error: alsa/asoundlib.h: No such file or directory compilation terminated. make: Entering directory/usr/local/lib/node_modules/douban.fm/node_modules/player/node_modules/lame/build'
deps/mpg123/test.target.mk:116: warning: overriding commands for target Release/test' deps/lame/test.target.mk:124: warning: ignoring old commands for targetRelease/test'
CC(target) Release/obj.target/mp3lame/deps/lame/libmp3lame/VbrTag.o
make: *** [Release/obj.target/output/deps/mpg123/src/output/alsa.o] Error 1
make: Leaving directory /usr/local/lib/node_modules/douban.fm/node_modules/player/node_modules/speaker/build' gyp ERR! build error gyp ERR! stack Error:makefailed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23) gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12) gyp ERR! System Linux 3.11.0-031100-generic gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /usr/local/lib/node_modules/douban.fm/node_modules/player/node_modules/speaker gyp ERR! node -v v0.10.21 gyp ERR! node-gyp -v v0.10.10 gyp ERR! not ok npm ERR! weird error 1 ../deps/lame/libmp3lame/VbrTag.c:1082:1: fatal error: opening dependency file ./Release/.deps/Release/obj.target/mp3lame/deps/lame/libmp3lame/VbrTag.o.d.raw: No such file or directory compilation terminated. Cannot create temporary file in /usr/local/lib/node_modules/douban.fm/node_modules/player/node_modules/lame/: No such file or directory make: *** [Release/obj.target/mp3lame/deps/lame/libmp3lame/VbrTag.o] Aborted make: Leaving directory/usr/local/lib/node_modules/douban.fm/node_modules/player/node_modules/lame/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Linux 3.11.0-031100-generic
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/douban.fm/node_modules/player/node_modules/lame
gyp ERR! node -v v0.10.21
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok
npm ERR! not ok code 0

MAC 10.9 升级失败!

环境

MAC OS X 10.9
标准 node 环境

现象:

$ sudo npm install douban.fm -g 之后,

开始有汇报 /Users/zoomq/.node-gyp 目录 Root 没有权限

$ chmod -R 775 /Users/zoomq/.node-gyp 处理后:

...

[email protected] install /usr/local/share/npm/lib/node_modules/douban.fm/node_modules/player/node_modules/speaker
node-gyp rebuild

gyp http GET http://nodejs.org/dist/v0.10.24/node-v0.10.24.tar.gz
gyp http 200 http://nodejs.org/dist/v0.10.24/node-v0.10.24.tar.gz

gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: Connection closed while downloading tarball file
gyp ERR! stack at Request. (/usr/local/Cellar/node/0.10.24/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:223:14)
gyp ERR! stack at Request.EventEmitter.emit (events.js:117:20)
gyp ERR! stack at IncomingMessage. (/usr/local/Cellar/node/0.10.24/lib/node_modules/npm/node_modules/request/request.js:846:44)
gyp ERR! stack at IncomingMessage.EventEmitter.emit (events.js:117:20)
gyp ERR! stack at IncomingMessage. (http.js:1515:11)
gyp ERR! stack at IncomingMessage.EventEmitter.emit (events.js:117:20)
gyp ERR! stack at _stream_readable.js:920:16
gyp ERR! stack at process._tickCallback (node.js:415:13)
gyp ERR! System Darwin 13.0.0
gyp ERR! command "node" "/usr/local/Cellar/node/0.10.24/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/share/npm/lib/node_modules/douban.fm/node_modules/player/node_modules/speaker
gyp ERR! node -v v0.10.24
gyp ERR! node-gyp -v v0.12.1
gyp ERR! not ok

[email protected] install /usr/local/share/npm/lib/node_modules/douban.fm/node_modules/player/node_modules/lame
node-gyp rebuild

node.js:811
var cwd = process.cwd();
^
Error: ENOENT, no such file or directory
at Function.startup.resolveArgv0 (node.js:811:23)
at startup (node.js:58:13)
at node.js:902:3
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the speaker package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls speaker
npm ERR! There is likely additional logging output above.

npm ERR! System Darwin 13.0.0
npm ERR! command "/usr/local/Cellar/node/0.10.24/bin/node" "/usr/local/bin/npm" "install" "douban.fm" "-g"
npm ERR! cwd /Users/zoomq
npm ERR! node -v v0.10.24
npm ERR! npm -v 1.3.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/zoomq/npm-debug.log
npm ERR! not ok code 0

分析

点解?

openSUSE13.1无法安装

[email protected] install /home/rainsun/douban.fm/node_modules/player/node_modules/speaker
node-gyp rebuild

[email protected] install /home/rainsun/douban.fm/node_modules/player/node_modules/lame
node-gyp rebuild

npm http 200 https://registry.npmjs.org/punycode/-/punycode-1.2.3.tgz
gyp: /usr/share/node/common.gypi not found (cwd: /home/rainsun/douban.fm/node_modules/player/node_modules/speaker) while reading includes of binding.gyp while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/lib64/node_modules/npm/node_modules/node-gyp/lib/configure.js:417:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:784:12)
gyp ERR! System Linux 3.11.6-4-desktop
gyp ERR! command "node" "/usr/lib64/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/rainsun/douban.fm/node_modules/player/node_modules/speaker
gyp ERR! node -v v0.10.5
gyp ERR! node-gyp -v v0.9.5
gyp ERR! not ok
gyp: /usr/share/node/common.gypi not found (cwd: /home/rainsun/douban.fm/node_modules/player/node_modules/lame) while reading includes of binding.gyp while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/lib64/node_modules/npm/node_modules/node-gyp/lib/configure.js:417:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:784:12)
gyp ERR! System Linux 3.11.6-4-desktop
gyp ERR! command "node" "/usr/lib64/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/rainsun/douban.fm/node_modules/player/node_modules/lame
gyp ERR! node -v v0.10.5
gyp ERR! node-gyp -v v0.9.5
gyp ERR! not ok
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! sh "-c" "node-gyp rebuild" failed with 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the speaker package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls speaker
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.11.6-4-desktop
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! cwd /home/rainsun/douban.fm
npm ERR! node -v v0.10.5
npm ERR! npm -v 1.2.18
npm ERR! code ELIFECYCLE
npm http 200 https://registry.npmjs.org/delayed-stream/0.0.5
npm http GET https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz
npm WARN package.json [email protected] No README.md file found!
npm http 200 https://registry.npmjs.org/hoek
npm http GET https://registry.npmjs.org/hoek/-/hoek-0.9.1.tgz
npm http 200 https://registry.npmjs.org/boom/-/boom-0.4.2.tgz
npm http 200 https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz
npm http 200 https://registry.npmjs.org/hoek/-/hoek-0.9.1.tgz
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/rainsun/douban.fm/npm-debug.log
npm ERR! not ok code 0

Windows7安装为什么提示要安装visualStudio c++

安装出错,提示安装c++环境
错误提示:
MSBUILD : error MSB3428: 未能加载 Visual C++ 组件“VCBuild.exe”。要解决此问题,

  1. 安装 .NET Fram
    ework 2.0 SDK;2) 安装 Microsoft Visual Studio 2005;或 3) 如果将该组件安装到了
    其他位置,请将其位置添加到系统
    路径中。 [G:\Users\Administrator\AppData\Roaming\npm\node_modules\douban.fm\node
    _mo
    dules\player\node_modules\speaker\build\binding.sln]

需要xcode安装command line tools

下午也是装不起来,发现是speaker模块编译不通过,后来开xcode装好command line tools后解决(虽然好像还是跑test的时候有问题,不过可以用了)这部分可以考虑放文档里去说明下。

安装时提示speaker有问题,安装speaker的时候找不到一个头文件

安装的时候提示
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Linux 3.8.0-29-generic
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/ckh/node_modules/speaker
gyp ERR! node -v v0.10.24
gyp ERR! node-gyp -v v0.12.1
gyp ERR! not ok
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the speaker package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls speaker
npm ERR! There is likely additional logging output above.

然后我就使用sudo npm install speaker --mpg123-backend=openal
安装speaker,但是提示
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Linux 3.8.0-29-generic
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/ckh/node_modules/speaker
gyp ERR! node -v v0.10.24
gyp ERR! node-gyp -v v0.12.1
gyp ERR! not ok

音量调节增强

现象

  • 用 MBP 来听
  • 如果通过 耳机的话,即最小的一格音量也感觉过大了,,,

分析

  • 因为MAC 的默认音量调节只有10%的调节步进
  • 然而其它 CLI 的音乐播放器都有虚拟音量控制器
  • 以便对音量以及左右音道,甚至于风格进行调节

建议

  • 先通过系统接口,可以对音量进行更加细腻的调节

为了程序猿的健康

MAC OS X 10.9.1安装失败

sudo npm install douban.fm -g

命令行全部输出如下:

npm http GET https://registry.npmjs.org/douban.fm
npm http 304 https://registry.npmjs.org/douban.fm
npm http GET https://registry.npmjs.org/player
npm http GET https://registry.npmjs.org/beer
npm http GET https://registry.npmjs.org/term-list
npm http GET https://registry.npmjs.org/underscore
npm http GET https://registry.npmjs.org/optimist
npm http GET https://registry.npmjs.org/consoler
npm http GET https://registry.npmjs.org/colorful
npm http GET https://registry.npmjs.org/sprintf
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/paramrule
npm http GET https://registry.npmjs.org/exeq
npm http 304 https://registry.npmjs.org/underscore
npm http 304 https://registry.npmjs.org/beer
npm http 304 https://registry.npmjs.org/player
npm http 304 https://registry.npmjs.org/colorful
npm http 304 https://registry.npmjs.org/consoler
npm http 304 https://registry.npmjs.org/sprintf
npm http 304 https://registry.npmjs.org/optimist
npm http 304 https://registry.npmjs.org/term-list
npm http 304 https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/paramrule
npm http 304 https://registry.npmjs.org/exeq
npm http GET https://registry.npmjs.org/request
npm http GET https://registry.npmjs.org/term-canvas/0.0.5
npm http GET https://registry.npmjs.org/keypress
npm http GET https://registry.npmjs.org/colors
npm http GET https://registry.npmjs.org/speaker
npm http GET https://registry.npmjs.org/lame
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/win-spawn
npm http GET https://registry.npmjs.org/arale
npm http GET https://registry.npmjs.org/wordwrap
npm http GET https://registry.npmjs.org/minimist
npm http 304 https://registry.npmjs.org/term-canvas/0.0.5
npm http 304 https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/keypress
npm http GET https://registry.npmjs.org/qs
npm http GET https://registry.npmjs.org/forever-agent
npm http GET https://registry.npmjs.org/json-stringify-safe
npm http GET https://registry.npmjs.org/mime
npm http GET https://registry.npmjs.org/node-uuid
npm http GET https://registry.npmjs.org/tunnel-agent
npm http GET https://registry.npmjs.org/tough-cookie
npm http GET https://registry.npmjs.org/form-data
npm http GET https://registry.npmjs.org/http-signature
npm http GET https://registry.npmjs.org/oauth-sign
npm http GET https://registry.npmjs.org/aws-sign2
npm http GET https://registry.npmjs.org/hawk
npm http 304 https://registry.npmjs.org/lame
npm http 304 https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/win-spawn
npm http 304 https://registry.npmjs.org/wordwrap
npm http 304 https://registry.npmjs.org/arale
npm http 304 https://registry.npmjs.org/colors
npm http 304 https://registry.npmjs.org/minimist
npm http 304 https://registry.npmjs.org/qs
npm http 304 https://registry.npmjs.org/speaker
npm http 304 https://registry.npmjs.org/forever-agent
npm http 304 https://registry.npmjs.org/json-stringify-safe
npm http 304 https://registry.npmjs.org/mime
npm http 304 https://registry.npmjs.org/tunnel-agent
npm http 304 https://registry.npmjs.org/node-uuid
npm http 304 https://registry.npmjs.org/tough-cookie
npm http 304 https://registry.npmjs.org/form-data
npm http 304 https://registry.npmjs.org/http-signature
npm http 304 https://registry.npmjs.org/oauth-sign
npm http 304 https://registry.npmjs.org/aws-sign2
npm http GET https://registry.npmjs.org/readable-stream
npm http GET https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/debug
npm http 304 https://registry.npmjs.org/hawk
npm http GET https://registry.npmjs.org/combined-stream
npm http GET https://registry.npmjs.org/asn1/0.1.11
npm http GET https://registry.npmjs.org/assert-plus/0.1.2
npm http GET https://registry.npmjs.org/ctype/0.5.2
npm http GET https://registry.npmjs.org/punycode
npm http 304 https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/debug
npm http GET https://registry.npmjs.org/hoek
npm http GET https://registry.npmjs.org/boom
npm http 304 https://registry.npmjs.org/readable-stream
npm http GET https://registry.npmjs.org/cryptiles
npm http GET https://registry.npmjs.org/sntp
npm http GET https://registry.npmjs.org/core-util-is
npm http GET https://registry.npmjs.org/debuglog/0.0.2
npm http 304 https://registry.npmjs.org/assert-plus/0.1.2
npm http 304 https://registry.npmjs.org/ctype/0.5.2
npm http 304 https://registry.npmjs.org/punycode
npm http 304 https://registry.npmjs.org/asn1/0.1.11
npm http 304 https://registry.npmjs.org/hoek
npm http 304 https://registry.npmjs.org/boom
npm http 304 https://registry.npmjs.org/cryptiles
npm http 304 https://registry.npmjs.org/sntp
npm http 304 https://registry.npmjs.org/core-util-is
npm http 304 https://registry.npmjs.org/debuglog/0.0.2

[email protected] install /usr/local/lib/node_modules/douban.fm/node_modules/player/node_modules/speaker
node-gyp rebuild

gyp WARN EACCES user "root" does not have permission to access the dev dir "/Users/hustlzp/.node-gyp/0.10.24"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/douban.fm/node_modules/player/node_modules/speaker/.node-gyp"
gyp http GET http://nodejs.org/dist/v0.10.24/node-v0.10.24.tar.gz
gyp http 200 http://nodejs.org/dist/v0.10.24/node-v0.10.24.tar.gz
gyp: /usr/local/lib/node_modules/douban.fm/node_modules/player/node_modules/speaker/.node-gyp/0.10.24/common.gypi not found (cwd: /usr/local/lib/node_modules/douban.fm/node_modules/player/node_modules/speaker) while reading includes of binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/Cellar/node/0.10.24/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:337:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Darwin 13.0.2
gyp ERR! command "node" "/usr/local/Cellar/node/0.10.24/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/douban.fm/node_modules/player/node_modules/speaker
gyp ERR! node -v v0.10.24
gyp ERR! node-gyp -v v0.12.1
gyp ERR! not ok
npm http 304 https://registry.npmjs.org/combined-stream
npm http GET https://registry.npmjs.org/delayed-stream/0.0.5
npm http 304 https://registry.npmjs.org/delayed-stream/0.0.5

[email protected] install /usr/local/lib/node_modules/douban.fm/node_modules/player/node_modules/lame
node-gyp rebuild

node.js:811
var cwd = process.cwd();
^
Error: ENOENT, no such file or directory
at Function.startup.resolveArgv0 (node.js:811:23)
at startup (node.js:58:13)
at node.js:902:3
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the speaker package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls speaker
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 13.0.2
npm ERR! command "/usr/local/Cellar/node/0.10.24/bin/node" "/usr/local/bin/npm" "install" "douban.fm" "-g"
npm ERR! cwd /Users/hustlzp
npm ERR! node -v v0.10.24
npm ERR! npm -v 1.3.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/hustlzp/npm-debug.log
npm ERR! not ok code 0

求助啊!对node不太熟...

几点建议

非常非常棒的工具! 个人用起来非常的顺手, 优雅.

同时提几点个人建议, 还请考虑一下, 我也想为优化出一份力, 但个人不太懂 node.js..

  • 加入暂停/继续功能 (10.9 backspace 无法继续).
  • 下载的歌曲加入 ID3 标签, 格式化歌曲信息.
  • 简单的进度条 / 播放进度显示.

安装失败

blue5tar 4 小时 17 分钟前
安装报错

CC(target) Release/obj.target/output/deps/mpg123/src/output/alsa.o
../deps/mpg123/src/output/alsa.c:19:28: 致命错误: alsa/asoundlib.h:没有那个文件或目录
编译中断。
make: *** [Release/obj.target/output/deps/mpg123/src/output/alsa.o] 错误 1

另外一种错误:#1

Bug:刚才提示这个

正听着呢突然提示这个,

Error: connect ECONNREFUSED
at errnoException (net.js:901:11)
at Object.afterConnect as oncomplete

重新打开选择了频道之后还是报错。。

还有一个小bug,退出douban.fm之后,Shell的图标就不见了。。。

系统支持问题..

用windows尝试使用了一下..很惊讶的发现居然可以编译通过...

不过问题来了...运行.douban.fm 就直接弹出一个应用选择打开的对话框.....

0.9在 MAC 10.9 下无法运行

前一个版本还是总算可以运行播放的,,,

这次 $ douban.fm 后:

Douban.fm 0.0.9 Loading  正在加载...

ReferenceError: consoler is not defined
    at /usr/local/share/npm/lib/node_modules/douban.fm/libs/fm.js:164:25
    at /usr/local/share/npm/lib/node_modules/douban.fm/libs/sdk.js:50:9
    at res (/usr/local/share/npm/lib/node_modules/douban.fm/node_modules/beer/index.js:15:9)
    at Request._callback (/usr/local/share/npm/lib/node_modules/douban.fm/node_modules/beer/index.js:54:9)
    at Request.self.callback (/usr/local/share/npm/lib/node_modules/douban.fm/node_modules/beer/node_modules/request/request.js:123:22)
    at Request.EventEmitter.emit (events.js:98:17)
    at Request.<anonymous> (/usr/local/share/npm/lib/node_modules/douban.fm/node_modules/beer/node_modules/request/request.js:893:14)
    at Request.EventEmitter.emit (events.js:117:20)
    at IncomingMessage.<anonymous> (/usr/local/share/npm/lib/node_modules/douban.fm/node_modules/beer/node_modules/request/request.js:844:12)
    at IncomingMessage.EventEmitter.emit (events.js:117:20)

俺的 npm list 输出:

└─┬ [email protected]
  ├── [email protected]
  ├── [email protected]
  ├─┬ [email protected]
  │ ├── [email protected]
  │ └─┬ [email protected]
  │   ├── [email protected]
  │   └── [email protected]
  ├── [email protected]
  ├─┬ [email protected]
  │ ├── [email protected]
  │ └── [email protected]
  ├── [email protected]
  ├─┬ [email protected]
  │ ├── [email protected]
  │ ├─┬ [email protected]
  │ │ ├── [email protected]
  │ │ └─┬ [email protected]
  │ │   ├── [email protected]
  │ │   └── [email protected]
  │ └── [email protected]
  ├─┬ [email protected]
  │ ├── [email protected]
  │ └─┬ [email protected]
  │   └── [email protected]
  ├─┬ [email protected]
  │ ├── [email protected]
  │ └── [email protected]
  ├── [email protected]
  ├─┬ [email protected]
  │ └── [email protected]
  ├─┬ [email protected]
  │ ├── [email protected]
  │ └─┬ [email protected]
  │   └── [email protected]
  ├─┬ [email protected]
  │ ├── [email protected]
  │ └─┬ [email protected]
  │   └── [email protected]
  ├── [email protected]
  ├─┬ [email protected]
  │ ├─┬ [email protected]
  │ │ └── [email protected]
  │ └─┬ [email protected]
  │   ├── [email protected]
  │   └─┬ [email protected]
  │     └── [email protected]
  ├─┬ [email protected]
  │ ├── [email protected]
  │ ├─┬ [email protected]
  │ │ ├── [email protected]
  │ │ └─┬ [email protected]
  │ │   ├── [email protected]
  │ │   └── [email protected]
  │ ├── [email protected]
  │ └── [email protected]
  ├── [email protected]
  ├── [email protected]
  ├── [email protected]
  ├── [email protected]
  ├── [email protected]
  ├── [email protected]
  ├── [email protected]
  ├─┬ [email protected]
  │ └─┬ [email protected]
  │   └── [email protected]
  ├── [email protected]
  ├─┬ [email protected]
  │ ├── [email protected]
  │ ├── [email protected]
  │ ├── [email protected]
  │ ├─┬ [email protected]
  │ │ ├── [email protected]
  │ │ └─┬ [email protected]
  │ │   └── [email protected]
  │ ├─┬ [email protected]
  │ │ ├── [email protected]
  │ │ ├── [email protected]
  │ │ ├── [email protected]
  │ │ └── [email protected]
  │ ├─┬ [email protected]
  │ │ ├── [email protected]
  │ │ ├── [email protected]
  │ │ └── [email protected]
  │ ├── [email protected]
  │ ├── [email protected]
  │ ├── [email protected]
  │ ├── [email protected]
  │ ├── [email protected]
  │ └── [email protected]
  ├─┬ [email protected]
  │ └── [email protected]
  ├── [email protected]
  ├── [email protected]
  ├── [email protected]
  ├── [email protected]
  ├─┬ [email protected]
  │ └─┬ [email protected]
  │   ├── [email protected]
  │   └── [email protected]
  ├─┬ [email protected]
  │ ├── [email protected]
  │ └── [email protected]
  ├── [email protected]
  ├─┬ [email protected]
  │ ├─┬ [email protected]
  │ │ ├── [email protected]
  │ │ └─┬ [email protected]
  │ │   └── [email protected]
  │ ├─┬ [email protected]
  │ │ └── [email protected]
  │ ├─┬ [email protected]
  │ │ ├── [email protected]
  │ │ └── [email protected]
  │ ├── [email protected]
  │ └── [email protected]
  ├─┬ [email protected]
  │ └─┬ [email protected]
  │   ├─┬ [email protected]
  │   │ ├─┬ [email protected]
  │   │ │ ├── [email protected]
  │   │ │ └── [email protected]
  │   │ └── [email protected]
  │   └── [email protected]
  └── [email protected]

随机的播放卡顿

System: 3.11.0-15-generic #23-Ubuntu x86_64
Node.js: 0.10.15
douban.fm: 0.1.1

系统是在虚拟机里的。
刚开始播放 5 ~ 10 秒左右正常,然后会开始卡顿,卡顿几秒后,又会好,然后播放到一半又会卡。
网速应该不是问题,相同的情况下,用网页版正常。

Ubuntu 13.04下安装失败

提示信息如下:
npm http GET https://registry.npmjs.org/douban.fm

npm ERR! Error: failed to fetch from registry: douban.fm
npm ERR! at /usr/share/npm/lib/utils/npm-registry-client/get.js:139:12
npm ERR! at cb (/usr/share/npm/lib/utils/npm-registry-client/request.js:31:9)
npm ERR! at Request._callback (/usr/share/npm/lib/utils/npm-registry-client/request.js:136:18)
npm ERR! at Request.callback (/usr/lib/nodejs/request/main.js:119:22)
npm ERR! at Request. (/usr/lib/nodejs/request/main.js:212:58)
npm ERR! at Request.emit (events.js:88:20)
npm ERR! at ClientRequest. (/usr/lib/nodejs/request/main.js:412:12)
npm ERR! at ClientRequest.g (events.js:156:14)
npm ERR! at ClientRequest.emit (events.js:67:17)
npm ERR! at HTTPParser.parserOnIncomingClient as onIncoming
npm ERR! You may report this log at:
npm ERR! http://bugs.debian.org/npm
npm ERR! or use
npm ERR! reportbug --attach /home/coiby/Downloads/douban.fm/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.8.0-35-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "douban.fm"
npm ERR! cwd /home/coiby/Downloads/douban.fm
npm ERR! node -v v0.6.19
npm ERR! npm -v 1.1.4
npm ERR! message failed to fetch from registry: douban.fm
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/coiby/Downloads/douban.fm/npm-debug.log
npm not ok

Fedora下安装不成功

已安装alsa 但仍然无法

make: Leaving directory `/usr/local/lib/node_modules/douban.fm/node_modules/player/node_modules/speaker/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Linux 3.12.6-300.fc20.x86_64
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/douban.fm/node_modules/player/node_modules/speaker
gyp ERR! node -v v0.10.24

执行douban.fm 界面乱码

当执行 douban.fm 的时候,看到界面的中文是乱码的(附图)

环境为:
mac mavenricks ,npm install douban.fm
mac air mid 2012 。

2014-01-14 21 20 31

另外,我很稀罕这个cmdline 。。。

无法暂停或者停止电台的播放

无法暂停(建议使用空格键);
无法停止(按Control + C都无法退出);
无法换台,在其他频道上回车后,正在播放的频道未停止。

这个可以改进一下

001
这个真的不错,只是在歌曲播放时候的界面,可以稍微改进一下,会更完美。

arch 下安装不成功。。

错误信息

make: Entering directory /usr/lib/node_modules/douban.fm/node_modules/player/node_modules/speaker/build' CC(target) Release/obj.target/output/deps/mpg123/src/output/alsa.o ../deps/mpg123/src/output/alsa.c:19:28: fatal error: alsa/asoundlib.h: No such file or directory #include <alsa/asoundlib.h> ^ compilation terminated. make: *** [Release/obj.target/output/deps/mpg123/src/output/alsa.o] Error 1 make: Leaving directory/usr/lib/node_modules/douban.fm/node_modules/player/node_modules/speaker/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Linux 3.10.2-1-ARCH
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/lib/node_modules/douban.fm/node_modules/player/node_modules/speaker
gyp ERR! node -v v0.10.17
gyp ERR! node-gyp -v v0.10.9
gyp ERR! not ok
gyp ERR! build error
gyp ERR! stack Error: You must run node-gyp configure first!
gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:44:20
gyp ERR! stack at fs.js:207:20
gyp ERR! stack at OpenReq.Req.done (/usr/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:135:5)
gyp ERR! stack at OpenReq.done (/usr/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:64:22)
gyp ERR! stack at Object.oncomplete (fs.js:107:15)
gyp ERR! System Linux 3.10.2-1-ARCH
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/lib/node_modules/douban.fm/node_modules/player/node_modules/lame
gyp ERR! node -v v0.10.17
gyp ERR! node-gyp -v v0.10.9
gyp ERR! not ok
npm ERR! error rolling back Error: ENOTEMPTY, rmdir '/usr/lib/node_modules/douban.fm/node_modules/player/node_modules/lame/build'
npm ERR! error rolling back [email protected] { [Error: ENOTEMPTY, rmdir '/usr/lib/node_modules/douban.fm/node_modules/player/node_modules/lame/build']
npm ERR! error rolling back errno: 53,
npm ERR! error rolling back code: 'ENOTEMPTY',
npm ERR! error rolling back path: '/usr/lib/node_modules/douban.fm/node_modules/player/node_modules/lame/build' }
npm ERR! weird error 1
npm ERR! not ok code 0

豆瓣电台命令行版 0.1.1 发布

  • 支持红心兆赫和PRO用户高码率播放
  • 优化设置账户的方式
  • 添加了帮助菜单 $ douban.fm help
  • 解决了之前遇到的一些切换频道时重复播放的问题
  • 添加了播放停止提示符
  • 快捷键分享到新浪微博 [S]

这个是测试的什么

~/Applications/douban.fm$ npm test

[email protected] test /home/ceepunk/Applications/douban.fm
./node_modules/mocha/bin/mocha ./test/test.js

module.js:340
throw err;
^
Error: Cannot find module './index'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/home/ceepunk/Applications/douban.fm/test/test.js:2:12)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at /home/ceepunk/Applications/douban.fm/node_modules/mocha/lib/mocha.js:172:27
at Array.forEach (native)
at Mocha.loadFiles (/home/ceepunk/Applications/douban.fm/node_modules/mocha/lib/mocha.js:169:14)
at Mocha.run (/home/ceepunk/Applications/douban.fm/node_modules/mocha/lib/mocha.js:356:31)
at Object. (/home/ceepunk/Applications/douban.fm/node_modules/mocha/bin/_mocha:359:16)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:902:3
npm ERR! Test failed. See above for more details.
npm ERR! not ok code 0

git 更新安装了红心兆赫非常帮
一开始~/douban.fm下有个love文件夹 一直空空的
还以为加了心 就自动丢进这个love里了

更新之后不自动生成这个love了

安装出错

ubuntu 12.04

gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/douban.fm/node_modules/player/node_modules/lame/.node-gyp"
gyp WARN EACCES user "root" does not have permission to access the dev dir "/usr/local/lib/node_modules/douban.fm/node_modules/player/node_modules/lame/.node-gyp/0.10.24"

os x 10.9 安装失败

CC(target) Release/obj.target/output/deps/mpg123/src/output/coreaudio.o
  LIBTOOL-STATIC Release/liboutput.a
  CXX(target) Release/obj.target/binding/src/binding.o
../src/binding.cc:1:20: fatal error: string.h: No such file or directory
 #include <string.h>
                    ^
compilation terminated.
make: *** [Release/obj.target/binding/src/binding.o] Error 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.