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

修复网易云导入歌单大于1000首失败问题,更改音乐详情页背景图片 #352

Merged
merged 9 commits into from
Sep 12, 2020
20 changes: 20 additions & 0 deletions css/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,27 @@ svg {
stroke: var(--now-playing-close-icon-color);
}

.page .bg {
opacity: 0.5;
height: 100%;
text-align: center;
line-height: 100%;
float: left;
width: 100%;
background-repeat: no-repeat;
background-position: center;
background-size: cover;
-webkit-filter: blur(15px);
-moz-filter: blur(15px);
-o-filter: blur(15px);
-ms-filter: blur(15px);
filter: blur(15px);
}

.page .playsong-detail {
position:absolute;
left: 10px;
right: 10px;
max-width: 770px;
margin: 0 auto;
display: flex;
Expand Down
4 changes: 2 additions & 2 deletions css/iparanoid.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
--text-subtitle-color: #666666;
--text-disable-color: #999999;

--lyric-default-color: #666666;
--lyric-default-color: #333333;

--link-default-color: #999999;
--link-highlight-color: #111111;
Expand All @@ -34,7 +34,7 @@

--window-control-border-color: #dddddd;

--important-color: #ff4444;
--important-color: #fff;

--button-background-color: #eeeeee;
--button-border-color: #bebebe;
Expand Down
2 changes: 1 addition & 1 deletion css/origin.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
--text-subtitle-color: #666666;
--text-disable-color: #999999;

--lyric-default-color: #666666;
--lyric-default-color: #bbbbbb;

--link-default-color: #999999;
--link-highlight-color: #ffffff;
Expand Down
23 changes: 17 additions & 6 deletions js/provider/netease.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,14 @@ function build_netease() {
return callback(null, tracks);
});
}
function split_array(myarray, size) {
var count = Math.ceil(myarray.length / size);
var result = [];
for (var i = 0; i < count; i++) {
result.push(myarray.slice(i * size, (i + 1) * size));
}
return result;
}

function ne_get_playlist(url, hm, se) {
// special thanks for @Binaryify
Expand Down Expand Up @@ -269,13 +277,16 @@ function build_netease() {
title: res_data.playlist.name,
source_url: `http://music.163.com/#/playlist?id=${list_id}`,
};
var max_allow_size = 1000;
var trackIdsArray = split_array(res_data.playlist.trackIds, max_allow_size);

function ng_parse_playlist_tracks_wrapper(trackIds, callback){
return ng_parse_playlist_tracks(trackIds, hm, se, callback);
}

// request all tracks to fetch song info
ng_parse_playlist_tracks(res_data.playlist.trackIds, hm, se,
(err, tracks) => fn({
tracks,
info,
}));
async.concat(trackIdsArray, ng_parse_playlist_tracks_wrapper, function(err, tracks){
fn({tracks, info});
});

// request every tracks to fetch song info
// async_process_list(res_data.playlist.trackIds, ng_render_playlist_result_item, [hm, se],
Expand Down
16 changes: 9 additions & 7 deletions listen1.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!DOCTYPE html>
<html lang="en" ng-app="listenone">

<head>
Expand Down Expand Up @@ -421,20 +421,22 @@ <h2>{{ playlist_title }}</h2>
</div>
<!-- now playing window-->
<div class="songdetail-wrapper" ng-class="{slidedown: window_type!=='track'}">
<div class="close" ng-class="isMac? 'mac':'' "ng-click="popWindow()"><svg class="icon"><use xlink:href="images/feather-sprite.svg#chevron-down"></use></svg></div>
<div class="bg" style="background-image: url({{ currentPlaying.img_url }});"></div>
<div class="close" ng-class="isMac? 'mac':'' " ng-click="popWindow()"><svg class="icon"><use xlink:href="images/feather-sprite.svg#chevron-down"></use></svg></div>

<div ng-if="!isChrome && !isMac" class="window-control">
<svg class="icon" window-control="window_min"><use xlink:href="images/feather-sprite.svg#minimize-2"></use></svg>
<svg class="icon" window-control="window_max"><use xlink:href="images/feather-sprite.svg#maximize" ></use></svg>
<svg class="icon" window-control="window_close"><use xlink:href="images/feather-sprite.svg#x"></use></svg>
<svg class="icon" window-control="window_min"><use xlink:href="images/feather-sprite.svg#minimize-2"></use></svg>
<svg class="icon" window-control="window_max"><use xlink:href="images/feather-sprite.svg#maximize"></use></svg>
<svg class="icon" window-control="window_close"><use xlink:href="images/feather-sprite.svg#x"></use></svg>
</div>

<div class="playsong-detail">
<div class="detail-head">
<div class="detail-head-cover"><img ng-src="{{ currentPlaying.img_url }}" err-src="https://y.gtimg.cn/mediastyle/global/img/album_300.png"/></div>
<div class="detail-head-cover"><img ng-src="{{ currentPlaying.img_url }}" err-src="https://y.gtimg.cn/mediastyle/global/img/album_300.png" /></div>
<div class="detail-head-title">
<!--<a title="加入收藏" class="clone" ng-click="showDialog(0, currentPlaying)">收藏</a>
<a open-url="currentPlaying.source_url" title="原始链接" class="link">原始链接</a>--></div>
<a open-url="currentPlaying.source_url" title="原始链接" class="link">原始链接</a>-->
</div>
</div>
<div class="detail-songinfo">
<h2>{{ currentPlaying.title }}</h2>
Expand Down