File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -366,7 +366,7 @@ def format(self) -> str:
366366 ## 実際に発行されるチューナーコマンドは --channel BS23_2 --tsid 18803 のようになる
367367 ## (--tsid 指定時は物理チャンネル表記に含まれる相対 TS 番号は無視され、常に物理 BS-23ch 内で送出中の TSID が 18803 の TS が選局される)
368368 ## 地上波や CS にはスロットや相対 TS 番号の概念がないため、TSID を指定する必要はない
369- extra_args = f'--tsid { ts_info .transport_stream_id } '
369+ extra_args = f' --tsid { ts_info .transport_stream_id } ' # 意図的に先頭と末尾に半角スペースを入れている
370370 else :
371371 # Mirakurun のプレースホルダーは単なる文字列置換で実装されているが、"satellite" が空だと条件分岐が成立せず
372372 # チューナーコマンド内の <satellite> が置換されずに残ってしまうため、意図的に空文字列ではなく半角スペースを入れている
@@ -453,7 +453,12 @@ def get_tuner_command(tuner: ISDBTuner) -> str:
453453 # TSID 選局に対応している ISDB-S 対応チューナー・ISDB-T/ISDB-S 両対応チューナーでは、
454454 # BS でのみ <satellite> が --tsid (BS チャンネルの TSID) に置換される
455455 if tuner .isTSIDSelectionSupported () is True and tuner .type in ['ISDB-S' , 'ISDB-T/ISDB-S' ]:
456- return f'recisdb tune --device { tuner .device_path } --channel <channel> <satellite> -'
456+ # Mirakurun のプレースホルダーは単なる文字列置換で実装されているが、"satellite" が空だと条件分岐が成立せず
457+ # チューナーコマンド内の <satellite> が置換されずに残ってしまうため、地上波や CS の場合は空文字列ではなく半角スペースを入れている
458+ # しかし生成されたチューナーコマンドに複数の連続するスペースが含まれるとコマンド実行に失敗するため、
459+ # "<channel>", "<satellite>", "-" (標準出力を表す) の間には敢えて半角スペースを入れないようにしている
460+ # ref: https://github.com/tsukumijima/ISDBScanner/issues/9
461+ return f'recisdb tune --device { tuner .device_path } --channel <channel><satellite>-'
457462 else :
458463 return f'recisdb tune --device { tuner .device_path } --channel <channel> -'
459464
You can’t perform that action at this time.
0 commit comments