Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: 新增专辑封面图 #2

Merged
merged 6 commits into from
Aug 27, 2022
Merged

Feat: 新增专辑封面图 #2

merged 6 commits into from
Aug 27, 2022

Conversation

turkyden
Copy link
Contributor

@turkyden turkyden commented Aug 21, 2022

Hi, 感谢博主分享,这次我的贡献主要是专辑【封面】

在对应专辑目录下,新增 cover.jpg 封面图

+ xxx/cover.jpg

@GoldSubmarine @Killy412 大家帮忙看一下哈

https://github.com/nj-lizhi/song/pull/2/files

@Nayacco Nayacco self-requested a review August 27, 2022 05:40
@turkyden
Copy link
Contributor Author

终于看到你的回复了,那我们格式都统一为 .png 咋样,然后规格要 128 x 128px 咯?

@Nayacco
Copy link
Contributor

Nayacco commented Aug 27, 2022

可以的

@turkyden
Copy link
Contributor Author

好的,我来处理一下

index.js Outdated
@@ -12,7 +12,7 @@ glob("./audio/**/*.{mp3,wav,flac}", {}, function (er, files) {
name: arr[3].replace(/\.(mp3|flac|wav)$/g, ''),
artist: "专辑-"+arr[2],
url: 'https://cdn.jsdelivr.net/gh/nj-lizhi/song@master' + item.slice(1),
cover: 'https://cdn.jsdelivr.net/gh/nj-lizhi/song@master/audio/cover.png',
cover: 'https://cdn.jsdelivr.net/gh/nj-lizhi/song@master/audio/' + arr[2] + 'cover.jpg',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

哈喽,我发现有些图片是jpg,有些是png,可否统一一下?不然这个地方不能统一替换成 cover.jpg

另外 audio/list.js 需要重新生成,不然 cover.jpg 不能被 web 页面获取到

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

看到了,看到了!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GoldSubmarine 再麻烦 review 一下呢?

封面格式统一成 .png 尺寸 500 x 500 px

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

audio/list.js 好像没有重新生成诶,你需要在本地执行一下 node index.js

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK,我在云端 run 了,重新生成了 list.js

@turkyden turkyden requested a review from Nayacco August 27, 2022 06:45
@Nayacco Nayacco merged commit 3cf24c7 into nj-lizhi:main Aug 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants