Skip to content

Commit

Permalink
seedingList UI
Browse files Browse the repository at this point in the history
  • Loading branch information
enigmazack authored and Rhilip committed Aug 14, 2021
1 parent 7eb2c0f commit 5c9ebdb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions resource/sites/hdroute.org/getSearchResult.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
let link = `${site.url}details.php?id=${id}`;

let data = {
id,
title: row.find(".title_chs").text(),
subTitle: row.find(".title_eng").text(),
link,
Expand Down
1 change: 1 addition & 0 deletions src/interface/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ export interface SearchResultItemCategory {
* 搜索返回结果
*/
export interface SearchResultItem {
id?: string;
site: Site;
title: string;
titleHTML?: string;
Expand Down
12 changes: 12 additions & 0 deletions src/options/views/search/SearchTorrent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,18 @@ export default Vue.extend({
}
}

if (!item.progress && !item.status) {
// 对比用户信息的seedingList修改做种状态信息
if (item.site && item.site.user && item.site.user.seedingList) {
let seedingList = item.site.user.seedingList;
let seeding = seedingList.some(id => item.id && item.id == id);
if (seeding) {
item.progress = 100;
item.status = 2;
}
}
}

if (dayjs(item.time).isValid()) {
let val: number | string = item.time + "";
// 标准时间戳需要 * 1000
Expand Down

0 comments on commit 5c9ebdb

Please sign in to comment.