Skip to main content

A sexy command line interface musicbox for mac and linux

Project description

NetEase-MusicBox-Not-Only-For-Mac

感谢为 MusicBox 的开发付出过努力的每一个人

本仓库为https://github.com/darknessomi/musicbox.git的fork版本.

高品质网易云音乐命令行版本,简洁优雅,丝般顺滑,基于Python编写,不支持python2.7。需要3.5以上

Software License versions platform platform

NetEase-MusicBox-GIF

功能特性

  1. 320kbps的高品质音乐
  2. 歌曲,艺术家,专辑检索
  3. 网易22个歌曲排行榜
  4. 网易新碟推荐
  5. 网易精选歌单
  6. 网易主播电台
  7. 私人歌单,每日推荐
  8. 随心打碟
  9. 本地收藏,随时加❤
  10. 播放进度及播放模式显示
  11. 现在播放及桌面歌词显示
  12. 歌曲评论显示
  13. 一键进入歌曲专辑
  14. 定时退出
  15. Vimer式快捷键让操作丝般顺滑
  16. 可使用数字快捷键
  17. 可使用自定义全局快捷键

键盘快捷键

Key Effect
j,下键,触摸板 Down 下移
k,上键,触摸板 Up 上移
h,左键 Back 后退
l,右键 Forword 前进
num + j QuickJump 快速向后跳转n首
num + k QuickUp 快速向前跳转n首
num + [ Quick Prev song 快速前n首
num + ] Quick Next Song 快速后n首
[[[[[... constant key [ 连按[
]]]]]... constant key ] 连按]
num + ] Quick Next Song 快速后n首
num Index for song 跳到第n首
u Prev page 上一页
d Next page 下一页
f Search 快速搜索
[ Prev song 上一曲
] Next song 下一曲
= Volume + 音量增加
- Volume - 音量减少
Space Play/Pause 播放/暂停
? Shuffle 手气不错
m Menu 主菜单
p Present/History 当前/历史播放列表
i Music Info 当前音乐信息
⇧+p Playing Mode 播放模式切换
a Add 添加曲目到打碟
⇧+a Enter album 进入专辑
g To the first 跳至首项
⇧+g To the end 跳至尾项
z DJ list 打碟列表
s Star 添加到收藏
c Collection 收藏列表
r Remove 删除当前条目
⇧+j Move Down 向下移动当前项目
⇧+k Move Up 向上移动当前项目
⇧+c Cache 缓存歌曲到本地
, Like 喜爱
; Trash FM 删除 FM
. Next FM 下一首 FM
/ More FM 更多 FM
q Quit 退出
t Timing Exit 定时退出
w Quit&Clear 退出并清除用户信息

安装

必选依赖

  1. mpg123 用于播放歌曲,安装方法参见下面的说明

可选依赖

  1. aria2 用于缓存歌曲
  2. libnotify-bin 用于支持消息提示(Linux平台)
  3. pyqt python-dbus dbus qt 用于支持桌面歌词 (Mac 用户需要 brew install qt --with-dbus 获取支持 DBus 的 Qt)

Git clone安装master分支(*nix系统)

$ git clone https://github.com/wangjianyuan10/musicbox.git && cd musicbox
$ python(3) setup.py install

macOS安装

$ brew install mpg123
$ pip(3) install macmusicbox

ubuntu安装

$ apt-get install mpg123
$ pip(3) install macmusicbox

配置和错误处理

配置文件地址: ~/.netease-musicbox/config.json 可配置缓存,快捷键,消息,桌面歌词。 由于歌曲 API 只接受中国大陆地区访问,非中国大陆地区用户请自行设置代理(可用polipo将socks5代理转换成http代理):

export http_proxy=http://IP:PORT
export https_proxy=http://IP:PORT
curl -L ip.cn

显示IP属于中国大陆地区即可。

已测试的系统兼容列表

OS Version
macOS 10.14
ubuntu 16.04
Lubuntu 16.06

错误处理

当某些歌曲不能播放时,总时长为 00:01 时,请检查是否为版权问题导致。

如遇到在特定终端下不能播放问题,首先检查此终端下mpg123能否正常使用,其次检查其他终端下musicbox能否正常使用,报告issue的时候请告知以上使用情况以及出问题终端的报错信息。

同时,您可以通过tail -f ~/.netease-musicbox/musicbox.log自行查看日志。 mpg123 最新的版本可能会报找不到声音硬件的错误,测试了1.25.6版本可以正常使用。

已知问题及解决方案

  • #374 i3wm下播放杂音或快进问题,此问题常见于Arch Linux。尝试更改mpg123配置。
  • #405 32位Python下cookie时间戳超出了32位整数最大值。尝试使用64位版本的Python或者拷贝cookie文件到对应位置。
  • #347 暂停时间超过一定长度(数分钟)之后mpg123停止输出,导致切换到下一首歌。此问题是mpg123的bug,暂时无解决方案。
  • #791 版权问题,master分支已经修复

使用

$ musicbox

Enjoy it !

更多>>

MIT License

Copyright (c) 2018 omi mailto:4399.omi@gmail.com

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

macmusicbox-0.2.5.5.2.tar.gz (39.0 kB view details)

Uploaded Source

Built Distributions

macmusicbox-0.2.5.5.2-py3.7.egg (101.3 kB view details)

Uploaded Egg

macmusicbox-0.2.5.5.2-py3-none-any.whl (99.1 kB view details)

Uploaded Python 3

File details

Details for the file macmusicbox-0.2.5.5.2.tar.gz.

File metadata

  • Download URL: macmusicbox-0.2.5.5.2.tar.gz
  • Upload date:
  • Size: 39.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for macmusicbox-0.2.5.5.2.tar.gz
Algorithm Hash digest
SHA256 65471ce9399ae2c32ac570363de9b9d02c33932bf0ef34986810a4f3144cba2f
MD5 814750654a92b1f44508cb5e9b3086c9
BLAKE2b-256 a89589c661f6ae9d9caa9cac65e943aa285b8e88645fbde76330c078c8ac4cce

See more details on using hashes here.

File details

Details for the file macmusicbox-0.2.5.5.2-py3.7.egg.

File metadata

  • Download URL: macmusicbox-0.2.5.5.2-py3.7.egg
  • Upload date:
  • Size: 101.3 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for macmusicbox-0.2.5.5.2-py3.7.egg
Algorithm Hash digest
SHA256 7207995565efc4051a12775404030ca8723504678909d06c4915061624573394
MD5 845f49103f8c5f4b7af9e853c1b6729d
BLAKE2b-256 1d5425c1382712a4e6884bdba817ecb4c02bedf79726fc57e183b092ff05e72c

See more details on using hashes here.

File details

Details for the file macmusicbox-0.2.5.5.2-py3-none-any.whl.

File metadata

  • Download URL: macmusicbox-0.2.5.5.2-py3-none-any.whl
  • Upload date:
  • Size: 99.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for macmusicbox-0.2.5.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 61d16e11d73e38985f7b8fcf8bcce1a6e901ac8f832ddbc90efc0c6c6b0479ed
MD5 b2af75dd39e178949de4f06207c66e9f
BLAKE2b-256 080f72b1a6f71e56f2757b3cd406ace185af7dba5937b55681e16cc5877c2514

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page