@@ -442,13 +442,16 @@ def format(self) -> str:
442442 str: フォーマットされた文字列
443443 """
444444
445- def get_tuner_command (device_path : Path ) -> str :
445+ def get_tuner_command (tuner : ISDBTuner ) -> str :
446446 if self ._recpt1_compatible is True :
447- return f'recpt1 --device { device_path } <channel> - -'
447+ return f'recpt1 --device { tuner . device_path } <channel> - -'
448448 else :
449449 # <satellite> は mirakc における {{{extra_args}}} の代わりとして使っている
450- # TSID 選局に対応しているチューナーでは、BS のみ <satellite> が --tsid (BS チャンネルの TSID) に置換される
451- return f'recisdb tune --device { device_path } --channel <channel> <satellite> -'
450+ # TSID 選局に対応しているチューナーでは、BS のみ <satellite> を --tsid (BS チャンネルの TSID) に置換する
451+ if tuner .isTSIDSelectionSupported () is True :
452+ return f'recisdb tune --device { tuner .device_path } --channel <channel> <satellite> -'
453+ else :
454+ return f'recisdb tune --device { tuner .device_path } --channel <channel> -'
452455
453456 # Mirakurun のチューナー設定ファイル用のデータ構造に変換
454457 mirakurun_tuners : list [MirakurunTuner ] = []
@@ -459,7 +462,7 @@ def get_tuner_command(device_path: Path) -> str:
459462 tuner : MirakurunTuner = {
460463 'name' : isdbt_tuner .name ,
461464 'types' : ['GR' ],
462- 'command' : get_tuner_command (isdbt_tuner . device_path ),
465+ 'command' : get_tuner_command (isdbt_tuner ),
463466 }
464467 if self ._recpt1_compatible is True :
465468 # recpt1 にも B25 デコード機能はあるが、安定性に難があるらしいので arib-b25-stream-test を使用する
@@ -474,7 +477,7 @@ def get_tuner_command(device_path: Path) -> str:
474477 tuner : MirakurunTuner = {
475478 'name' : isdbs_tuner .name ,
476479 'types' : ['BS' , 'CS' ],
477- 'command' : get_tuner_command (isdbs_tuner . device_path ),
480+ 'command' : get_tuner_command (isdbs_tuner ),
478481 }
479482 if self ._recpt1_compatible is True :
480483 # recpt1 にも B25 デコード機能はあるが、安定性に難があるらしいので arib-b25-stream-test を使用する
@@ -489,7 +492,7 @@ def get_tuner_command(device_path: Path) -> str:
489492 tuner : MirakurunTuner = {
490493 'name' : multi_tuner .name ,
491494 'types' : ['GR' , 'BS' , 'CS' ],
492- 'command' : get_tuner_command (multi_tuner . device_path ),
495+ 'command' : get_tuner_command (multi_tuner ),
493496 }
494497 if self ._recpt1_compatible is True :
495498 # recpt1 にも B25 デコード機能はあるが、安定性に難があるらしいので arib-b25-stream-test を使用する
@@ -655,12 +658,15 @@ def format(self) -> str:
655658 }
656659 cast (list [MirakcChannel ], mirakc_config ['channels' ]).append (channel )
657660
658- def get_tuner_command (device_path : Path ) -> str :
661+ def get_tuner_command (tuner : ISDBTuner ) -> str :
659662 if self ._recpt1_compatible is True :
660- return f'recpt1 --device { device_path } ' + '{{{channel}}} - -'
663+ return f'recpt1 --device { tuner . device_path } ' + '{{{channel}}} - -'
661664 else :
662- # TSID 選局に対応しているチューナーでは、BS のみ <satellite> が --tsid (BS チャンネルの TSID) に置換される
663- return f'recisdb tune --device { device_path } --channel ' + '{{{channel}}} {{{extra_args}}} -'
665+ # TSID 選局に対応しているチューナーでは、BS のみ <satellite> を --tsid (BS チャンネルの TSID) に置換する
666+ if tuner .isTSIDSelectionSupported () is True :
667+ return f'recisdb tune --device { tuner .device_path } --channel ' + '{{{channel}}} {{{extra_args}}} -'
668+ else :
669+ return f'recisdb tune --device { tuner .device_path } --channel ' + '{{{channel}}} -'
664670
665671 # mirakc のチューナー設定ファイル用のデータ構造に変換
666672 for isdbt_tuner in self ._isdbt_tuners :
@@ -670,7 +676,7 @@ def get_tuner_command(device_path: Path) -> str:
670676 tuner : MirakcTuner = {
671677 'name' : isdbt_tuner .name ,
672678 'types' : ['GR' ],
673- 'command' : get_tuner_command (isdbt_tuner . device_path ),
679+ 'command' : get_tuner_command (isdbt_tuner ),
674680 'disabled' : False ,
675681 }
676682 cast (list [MirakcTuner ], mirakc_config ['tuners' ]).append (tuner )
@@ -681,7 +687,7 @@ def get_tuner_command(device_path: Path) -> str:
681687 tuner : MirakcTuner = {
682688 'name' : isdbs_tuner .name ,
683689 'types' : ['BS' , 'CS' ],
684- 'command' : get_tuner_command (isdbs_tuner . device_path ),
690+ 'command' : get_tuner_command (isdbs_tuner ),
685691 'disabled' : False ,
686692 }
687693 cast (list [MirakcTuner ], mirakc_config ['tuners' ]).append (tuner )
@@ -692,7 +698,7 @@ def get_tuner_command(device_path: Path) -> str:
692698 tuner : MirakcTuner = {
693699 'name' : multi_tuner .name ,
694700 'types' : ['GR' , 'BS' , 'CS' ],
695- 'command' : get_tuner_command (multi_tuner . device_path ),
701+ 'command' : get_tuner_command (multi_tuner ),
696702 'disabled' : False ,
697703 }
698704 cast (list [MirakcTuner ], mirakc_config ['tuners' ]).append (tuner )
0 commit comments