From 69c2f401c626302d7c1a8013da900fc9505dd747 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Sat, 18 Mar 2023 21:15:11 +0000 Subject: [PATCH] feat: add badges --- README.md | 2 ++ docs/README.md | 2 ++ docs/en/README.md | 2 ++ lib/v2/bilibili/bangumi.js | 2 +- lib/v2/telegram/channel.js | 2 +- 5 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 731c4545db..8a56612f7f 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,8 @@ [![docker publish](https://img.shields.io/github/actions/workflow/status/DIYgod/RSSHub/docker-release.yml?branch=master&label=docker%20publish&logo=docker&style=flat-square)](https://hub.docker.com/r/diygod/rsshub) [![test](https://img.shields.io/github/actions/workflow/status/DIYgod/RSSHub/test.yml?branch=master&label=test&logo=github&style=flat-square)](https://github.com/DIYgod/RSSHub/actions/workflows/test.yml?query=event%3Apush+branch%3Amaster) [![Test coverage](https://img.shields.io/codecov/c/github/DIYgod/RSSHub.svg?style=flat-square&logo=codecov)](https://app.codecov.io/gh/DIYgod/RSSHub/branch/master) +[![CodeFactor](https://www.codefactor.io/repository/github/diygod/rsshub/badge)](https://www.codefactor.io/repository/github/diygod/rsshub) +[![DeepScan grade](https://deepscan.io/api/teams/6244/projects/8135/branches/92448/badge/grade.svg)](https://deepscan.io/dashboard#view=project&tid=6244&pid=8135&bid=92448) ## Introduction diff --git a/docs/README.md b/docs/README.md index 0ae61ff32e..5b8f839519 100644 --- a/docs/README.md +++ b/docs/README.md @@ -16,6 +16,8 @@ sidebarDepth: 0 [![docker publish](https://img.shields.io/github/actions/workflow/status/DIYgod/RSSHub/docker-release.yml?branch=master\&label=docker%20publish\&logo=docker\&style=flat-square)](https://hub.docker.com/r/diygod/rsshub) [![test](https://img.shields.io/github/actions/workflow/status/DIYgod/RSSHub/test.yml?branch=master\&label=test\&logo=github\&style=flat-square)](https://github.com/DIYgod/RSSHub/actions/workflows/test.yml?query=event%3Apush+branch%3Amaster) [![Test coverage](https://img.shields.io/codecov/c/github/DIYgod/RSSHub.svg?style=flat-square\&logo=codecov)](https://app.codecov.io/gh/DIYgod/RSSHub/branch/master) +[![CodeFactor](https://www.codefactor.io/repository/github/diygod/rsshub/badge)](https://www.codefactor.io/repository/github/diygod/rsshub) +[![DeepScan grade](https://deepscan.io/api/teams/6244/projects/8135/branches/92448/badge/grade.svg)](https://deepscan.io/dashboard#view=project\&tid=6244\&pid=8135\&bid=92448) RSSHub 是一个开源、简单易用、易于扩展的 RSS 生成器,可以给任何奇奇怪怪的内容生成 RSS 订阅源。RSSHub 借助于开源社区的力量快速发展中,目前已适配数百家网站的上千项内容 diff --git a/docs/en/README.md b/docs/en/README.md index b6d33d0160..8ff4f7383e 100644 --- a/docs/en/README.md +++ b/docs/en/README.md @@ -16,6 +16,8 @@ sidebarDepth: 0 [![docker publish](https://img.shields.io/github/actions/workflow/status/DIYgod/RSSHub/docker-release.yml?branch=master&label=docker%20publish&logo=docker&style=flat-square)](https://hub.docker.com/r/diygod/rsshub) [![test](https://img.shields.io/github/actions/workflow/status/DIYgod/RSSHub/test.yml?branch=master&label=test&logo=github&style=flat-square)](https://github.com/DIYgod/RSSHub/actions/workflows/test.yml?query=event%3Apush+branch%3Amaster) [![Test coverage](https://img.shields.io/codecov/c/github/DIYgod/RSSHub.svg?style=flat-square&logo=codecov)](https://app.codecov.io/gh/DIYgod/RSSHub/branch/master) +[![CodeFactor](https://www.codefactor.io/repository/github/diygod/rsshub/badge)](https://www.codefactor.io/repository/github/diygod/rsshub) +[![DeepScan grade](https://deepscan.io/api/teams/6244/projects/8135/branches/92448/badge/grade.svg)](https://deepscan.io/dashboard#view=project&tid=6244&pid=8135&bid=92448) RSSHub is an open source, easy to use, and extensible RSS feed aggregator, it's capable of generating RSS feeds from pretty much everything. diff --git a/lib/v2/bilibili/bangumi.js b/lib/v2/bilibili/bangumi.js index 7ac2b560e1..60f97ad037 100644 --- a/lib/v2/bilibili/bangumi.js +++ b/lib/v2/bilibili/bangumi.js @@ -11,7 +11,7 @@ module.exports = async (ctx) => { url: `https://www.bilibili.com/bangumi/media/md${mediaid}`, }); mediaData = JSON.parse(response.data.match(/window\.__INITIAL_STATE__=([\s\S]+);\(function\(\)/)[1]) || {}; - seasonid = mediaData?.mediaInfo.season_id; + seasonid = mediaData.mediaInfo.season_id; } const { data } = await got.get(`https://api.bilibili.com/pgc/web/season/section?season_id=${seasonid}`); diff --git a/lib/v2/telegram/channel.js b/lib/v2/telegram/channel.js index d60f413491..3c6a7b73b0 100644 --- a/lib/v2/telegram/channel.js +++ b/lib/v2/telegram/channel.js @@ -523,7 +523,7 @@ module.exports = async (ctx) => { let mediaTag = ''; if (showMediaTagInTitle) { msgTypes.forEach((type) => { - if (type !== REPLY || (type === REPLY && showReplyTo) || (type === FORWARDED && showFwdFrom) || (type === VIA_BOT && showViaBot)) { + if (type !== REPLY || type !== FORWARDED || type !== VIA_BOT || (type === REPLY && showReplyTo) || (type === FORWARDED && showFwdFrom) || (type === VIA_BOT && showViaBot)) { mediaTag += showMediaTagAsEmoji ? mediaTagDict[type][1] : mediaTagDict[type][0]; } });