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

チャンネルスキャンが既存のエンドポイント/オプションで動作しなくなっている。 #82

Closed
hiradimir opened this issue Dec 27, 2020 · 2 comments
Labels

Comments

@hiradimir
Copy link

Environment

Issue

チャンネルスキャンが既存のエンドポイント/オプションで動作しなくなっていました。

$ sudo curl -X PUT "http://localhost:40772/api/config/channels/scan"
channel scanning... (type: "GR")

-> total 0 channels (of Takeover is 0) found and 46 channels stored.

channel scan has completed and saved successfully.
**RESTART REQUIRED** to apply changes.

#79 の PR が契機と思われます。

挙動としてはminCh/maxChを指定すると動作するため、

$ sudo curl -X PUT "http://localhost:40772/api/config/channels/scan?type=GR"
channel scanning... (type: "GR")

-> total 0 channels (of Takeover is 0) found and 46 channels stored.

channel scan has completed and saved successfully.
**RESTART REQUIRED** to apply changes.
$ sudo curl -X PUT "http://localhost:40772/api/config/channels/scan?type=GR&minCh=13&maxCh=67"
channel scanning... (type: "GR")

channel: "13" ...
-> 3 services found.
-> {"name":"NHKEテレ","type":"GR","channel":"13"}

channel: "14" ...

以下で判定が想定通りで無いように見えました。

case common.ChannelTypes.GR:
option.startCh = option.startCh === undefined ? 13 : option.startCh;
option.endCh = option.endCh === undefined ? 62 : option.endCh;


以下は推測です。

API定義上のデフォルト値も消えている。

{
in: "query",
name: "minCh",
type: "integer",
description: "Specifies the minimum number of channel numbers to scan."
},
{
in: "query",
name: "maxCh",
type: "integer",
description: "Specifies the maximum number of channel numbers to scan."
},

fw? middleware? に何を使っているのか把握出来ていないのですが、
GRとかのデフォルト値が扱われているところをみると、
type: "integer" で、 0 に丸められる挙動になってしまっているのでは無いでしょうか。

@kanreisa kanreisa added the bug label Dec 27, 2020
kanreisa added a commit that referenced this issue Dec 27, 2020
- Fix a incorrect default parameters #82
- Fix a timing of request timeout
@kanreisa
Copy link
Member

kanreisa commented Dec 27, 2020

ご報告ありがとうございます。バグです。
@3.4.1 で修正 (c7466ff) したのでご確認いただけますでしょうか?

@hiradimir
Copy link
Author

@kanreisa
対応ありがとうございます。
@3.4.1 にて解消されていることが確認できました。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants