GithubHelp home page GithubHelp logo

hyskyder / musicbox Goto Github PK

View Code? Open in Web Editor NEW

This project forked from darknessomi/musicbox

0.0 1.0 0.0 1.91 MB

网易云音乐命令行版本 musicbox (0.2.5.4~hy)

License: MIT License

Python 100.00%

musicbox's Introduction

MusicBox ~ hy Edition

网易云音乐命令行版本,适合小窗,简洁优雅,丝般顺滑,基于Python编写。

platform

小窗口:

图片:小窗口截图

图片:大窗口截图

更新日志

0.2.5.4-hy-2: 每30秒检查是否锁屏黑屏,黑屏则暂停播放(适用于部分基于dbus的Linux系统); terminal标题栏显示当前歌曲(不完全工作).

0.2.5.4-hy: 合并 darknessomi/musicbox 0.2.5.4 中的一些代码: 1.缓存文件路径修改至 ~/.netseae-musicbox/nemcache.sqlite. 2.修复切换歌单时可能出现的切歌失败问题. 3.修复搜索歌曲出错. 4.修复“搜索->网易精选集“. 5.修复20分钟后URL失效问题。

0.2.5.3-hy: 1. 通过mpg123的stdin播放音频,此模式下可以看歌曲的下载进度条. 2. 菜单缩进减少,更适合小窗,修复窗口resize问题,进度条长度自适应。

0.2.5.3 : 原版 darknessomi/musicbox

已测试:

* Ubuntu 16.04 LTS
* mpg123 1.22.4
* python 3.5.2

安装与运行

1. 安装mpg123: (sudo) apt-get install mpg123
2. clone this to /path/to/musicbox
3. python3 -m /path/to/musicbox/NEMbox

以下是原README

NetEase-MusicBox

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

高品质网易云音乐命令行版本,简洁优雅,丝般顺滑,基于Python编写。

Software License versions platform platform

NetEase-MusicBox

功能特性

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

键盘快捷键

J Down 下移
K Up 上移
H Back 后退
L Forword 前进
U Prev page 上一页
D Next page 下一页
F Search 快速搜索
[ Prev song 上一曲
] Next song 下一曲
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
Q Quit 退出
T Timing Exit 定时退出
W Quit&Clear 退出并清除用户信息

PyPi安装(推荐)

$ pip(3) install NetEase-MusicBox

Git clone最新版

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

macOS安装

$ pip(3) install NetEase-MusicBox
$ brew install mpg123

Linux安装

Fedora

首先添加FZUG源,然后sudo dnf install musicbox(通过此方法安装可能仍然需要pip install NetEase-MusicBox更新到最新版)。

Ubuntu/Debian

$ (sudo) pip install NetEase-MusicBox

$ (sudo) apt-get install mpg123

Arch Linux

$ pacaur -S netease-musicbox-git # or $ yaourt musicbox

Centos/Red Hat

$ (sudo) pip(3) install NetEase-MusicBox
$ (sudo) wget http://mirror.centos.org/centos/7/os/x86_64/Packages/mpg123-1.25.6-1.el7.x86_64.rpm
$ (sudo) yum install mpg123-1.25.6-1.el7.x86_64.rpm

依赖

必选

  1. mpg123 用于播放歌曲

可选

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

配置文件

配置文件地址: ~/.netease-musicbox/config.json 可配置缓存,快捷键,消息,桌面歌词。 由于歌曲 API 只接受**大陆地区访问,港澳台及海外用户请自行设置代理:

export http_proxy=http://ip:port
curl ip.cn

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

已测试的系统兼容列表

macOS 10.13 / 10.12 / 10.11
Ubuntu 14.04
Kali 1.1.0 / 2.0 / Rolling
CentOS 7
openSUSE 13.2
Fedora 22
Arch Rolling

错误处理

当某些歌曲不能播放时,总时长为 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,暂时无解决方案。

使用

$ musicbox

Enjoy it !

更新日志

2018-11-28 版本 0.2.5.4 修复多处错误

2018-06-21 版本 0.2.5.3 修复多处播放错误

2018-06-07 版本 0.2.5.1 修复配置文件错误

2018-06-05 版本 0.2.5.0 全部迁移到新版api,大量错误修复

2018-05-21 版本 0.2.4.3 更新依赖,错误修复

2017-11-28 版本 0.2.4.2 更新获取歌曲列表的api

2017-06-03 版本 0.2.4.1 修正mpg123状态异常导致的cpu占用,增加歌词双行显示功能

2017-03-17 版本 0.2.4.0 修复通知可能造成的崩溃

2017-03-03 版本 0.2.3.9 邮箱用户登录修复

2017-03-02 版本 0.2.3.8 登录接口修复

2016-11-24 版本 0.2.3.7 新增背景色设置

2016-11-07 版本 0.2.3.6 已知错误修复

2016-10-16 版本 0.2.3.5 新增进入歌曲专辑功能

2016-10-13 版本 0.2.3.4 新增查看歌曲评论

2016-09-26 版本 0.2.3.3 keybinder 错误修复

2016-09-15 版本 0.2.3.2 已知错误修复

2016-09-12 版本 0.2.3.1 已知错误修复

2016-09-11 版本 0.2.3.0 Python 2 和 3 支持

2016-05-09 版本 0.2.2.10 修复最后一行歌名过长的问题

2016-05-08 版本 0.2.2.9 缓存问题修复

2016-05-07 版本 0.2.2.8 解决通知在Gnome桌面持续驻留(#303)的问题

更多>>

The MIT License (MIT)

CopyRight (c) 2015 omi <[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.

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.