Git Product home page Git Product logo

hzexe.qqmusic's Introduction

Hzexe.QQMusic

解析QQ音乐的库,支持无损品质解析和下载

Telegram Chat license

Package Branch Visual Studio 2017 Linux .Net Core 多平台Native库
NuGet NuGet Release master Build status Build Status Build status

功能

  • 按歌名搜索
  • 下载指定歌曲的指定品质文件
  • 下载歌词

演示截图

截图

安装

Package manager:

Install-Package QQMusicLib

.NET CLI:

dotnet add package QQMusicLib

使用示例


https://github.com/hzexe/Hzexe.QQMusic/tree/master/Example

从源码编译

  1. 获取源码
git clone https://github.com/hzexe/Hzexe.QQMusic.git

Or

svn checkout https://github.com/hzexe/Hzexe.QQMusic.git
  1. 修改以满足你需求的目标运行库 项目配置成支持多种.NET运行时,如果编译环境缺少相关SDK,导致编译部分失败或完全失败.错误号MSB3644,提示大致是:

    /home/android/dotnet/sdk/2.2.101/Microsoft.Common.CurrentVersion.targets(1179,5): error MSB3644: The reference assemblies for framework NETFramework,Version=v4.5" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. [/home/android/Hzexe.QQMusic/Example/WindowsFormsApp/WindowsFormsApp.csproj]

:使用文本编辑工具打开QQMusic.hzexe.com.csproj,修改TargetFrameworks 比如在非Windows下修改成

<TargetFrameworks>netstandard1.6;netstandard2.0</TargetFrameworks>

比如Windows下修改成

<TargetFrameworks>net45</TargetFrameworks>

  1. 编译工具执行编译

    1. Visual Studio 2017 打开解决方案直接编译成Release或在开发人员命令提示符下运行msbuild /p:Configuration=Release
    2. .NET Core(2.1或以上版本,已知在Linux Arm64下需要3.0或以上版本coreclr_issues_19578
            dotnet build -f netstandard1.6 QQMusic.hzexe.com
3.Native库编译
  .net core下执行:<br />
            dotnet publish /p:NativeLib=Shared -r win-x64 -c release QQMusic_Native_Library
  其中参数值NativeLib可以为Static 为静态库<br />
  其中-r参数是你要的目标运行时,win-x64 linux-x64  osx-x64 android等,更多见[RID Catalog](https://docs.microsoft.com/en-us/dotnet/core/rid-catalog)。<br />
  win-x64有个使用native库的[vc示例](https://github.com/hzexe/Hzexe.QQMusic/tree/master/Example/Windows_x64) <br />
  可能是CoreRT还没有Release的原因,分别在ubuntu和windows下尝试交叉编译失败。

其它

限技术交流,不对使用本库后果负责

hzexe.qqmusic's People

Contributors

hzexe avatar

Stargazers

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

Watchers

 avatar

hzexe.qqmusic's Issues

已存在的字符串封装传送问题

在托管和非托管之间的字符串封装传送过程中,.net只支持unicode(16 bit)和ANSI,再加上c/c++中宽字符在跨平台时的种种问题,总之,有点复杂
当前的库是使用unicode封装传送字符串,然而在c/c++中wchar_t在不同平台长度不同,虽然在gcc可以通过-fshort-wchar把wchar_t视为16位,然而,它会污染其它的代码或库;
当前尝试使用

#ifdef WIN32
#define t_wchar_t wchar_t
#else
#define t_wchar_t short
#endif`

来解决,但带来的问题是非windows下输出t_wchar_t时需要做转换

放弃ANSI编码的原因是这玩意在不同语种之间不兼容,特别是一些歌手和歌名是各种语言拼写的,遇到这类与计算机语言不同的歌名或歌手必定乱码

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.