Skip to content

fix: douban movie allow empty/set default score 0#2458

Merged
DIYgod merged 6 commits into
DIYgod:masterfrom
kt286:patch-2
Jun 22, 2019
Merged

fix: douban movie allow empty/set default score 0#2458
DIYgod merged 6 commits into
DIYgod:masterfrom
kt286:patch-2

Conversation

@kt286

@kt286 kt286 commented Jun 21, 2019

Copy link
Copy Markdown
Contributor

fix #2457

Comment thread lib/routes/douban/playing.js Outdated

module.exports = async (ctx) => {
const score = parseFloat(ctx.params.score, 10);
const score = parseFloat(ctx.params.score) ? parseFloat(ctx.params.score) : 0;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

这有什么意义...

而且应该写 parseFloat(ctx.params.score) || 0

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

文档里有条路由不写分数返回全部。不加那句的话出不来

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

懂了,那应该写成 parseFloat(ctx.params.score) || 0

不然 parseFloat 要多执行一次

Comment thread lib/routes/douban/playing.js Outdated

module.exports = async (ctx) => {
const score = parseFloat(ctx.params.score, 10);
const score = parseFloat(ctx.params.score) : 0;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

语法错误

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

手机改的。。。

Comment thread lib/routes/douban/playing.js Outdated
.map((i) => {
const item = $(i);
const itemScore = parseFloat(item.attr('data-score'), 10);
const itemScore = parseFloat(item.attr('data-score')) ? 10;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

语法错误

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

要是再错就等我回家改吧

@DIYgod DIYgod merged commit c48ad0b into DIYgod:master Jun 22, 2019
@DIYgod

DIYgod commented Jun 22, 2019

Copy link
Copy Markdown
Owner

Merged, thanks!

iplusx added a commit to iplusx/RSSHub that referenced this pull request Jun 22, 2019
* master: (153 commits)
  chore(deps): update dependency puppeteer to v1.18.0 (DIYgod#2454)
  fix: douban movie allow empty/set default score 0 (DIYgod#2458)
  feat: add 8btc (DIYgod#2462)
  feat: nautilus (topics) (DIYgod#2459)
  chore(deps): update dependency nock to v11.0.0-beta.20 (DIYgod#2453)
  chore(deps): update dependency query-string to v6.8.1 (DIYgod#2451)
  feat: 笔趣阁全文 (DIYgod#2450)
  feat: replace iTunes link (DIYgod#2448)
  fix: better debugging experience with cluster (DIYgod#2447)
  fix: wrong path judgement
  feat: wrong path error
  feat: debug info for hot route and path
  chore(deps): update dependency form-data to v2.4.0 (DIYgod#2444)
  fix: DIYgod#2442 (DIYgod#2443)
  feat: use cluster
  fix: undefined git hash in docker
  docs: add crawlerBadge for earthquake, close DIYgod#2436
  fix: bilibili live allow empty (DIYgod#2438)
  feat: add new route flyertea (DIYgod#2431)
  fix: B站非默认收藏夹失效 (DIYgod#2433)
  ...
iplusx added a commit to iplusx/RSSHub that referenced this pull request Jun 22, 2019
* master: (200 commits)
  chore(deps): update dependency puppeteer to v1.18.0 (DIYgod#2454)
  fix: douban movie allow empty/set default score 0 (DIYgod#2458)
  feat: add 8btc (DIYgod#2462)
  feat: nautilus (topics) (DIYgod#2459)
  chore(deps): update dependency nock to v11.0.0-beta.20 (DIYgod#2453)
  chore(deps): update dependency query-string to v6.8.1 (DIYgod#2451)
  feat: 笔趣阁全文 (DIYgod#2450)
  feat: replace iTunes link (DIYgod#2448)
  fix: better debugging experience with cluster (DIYgod#2447)
  fix: wrong path judgement
  feat: wrong path error
  feat: debug info for hot route and path
  chore(deps): update dependency form-data to v2.4.0 (DIYgod#2444)
  fix: DIYgod#2442 (DIYgod#2443)
  feat: use cluster
  fix: undefined git hash in docker
  docs: add crawlerBadge for earthquake, close DIYgod#2436
  fix: bilibili live allow empty (DIYgod#2438)
  feat: add new route flyertea (DIYgod#2431)
  fix: B站非默认收藏夹失效 (DIYgod#2433)
  ...
@kt286 kt286 deleted the patch-2 branch June 27, 2019 05:44
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.

正在上映的电影RSS失效

2 participants