Skip to content

Commit

Permalink
Fix: recpt1 と互換性のある物理チャンネル指定フォーマットで保存する際、DVB チューナーを除外
Browse files Browse the repository at this point in the history
recpt1 は V4L2 DVB 非対応のため (recdvb もあるにはあるが品質が低い)
  • Loading branch information
tsukumijima committed Oct 9, 2023
1 parent 4a5eacf commit 404836a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions isdb_scanner/formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,9 @@ def get_tuner_command(device_path: Path) -> str:
# Mirakurun のチューナー設定ファイル用のデータ構造に変換
mirakurun_tuners: list[MirakurunTuner] = []
for isdbt_tuner in self._isdbt_tuners:
# recpt1 は DVB チューナーに非対応なのでスキップ
if self._recpt1_compatible is True and isdbt_tuner.device_type == 'DVB':
continue
tuner: MirakurunTuner = {
'name': isdbt_tuner.name,
'types': ['GR'],
Expand All @@ -425,6 +428,9 @@ def get_tuner_command(device_path: Path) -> str:
tuner['isDisabled'] = False
mirakurun_tuners.append(tuner)
for isdbs_tuner in self._isdbs_tuners:
# recpt1 は DVB チューナーに非対応なのでスキップ
if self._recpt1_compatible is True and isdbs_tuner.device_type == 'DVB':
continue
tuner: MirakurunTuner = {
'name': isdbs_tuner.name,
'types': ['BS', 'CS'],
Expand All @@ -437,6 +443,9 @@ def get_tuner_command(device_path: Path) -> str:
tuner['isDisabled'] = False
mirakurun_tuners.append(tuner)
for multi_tuner in self._multi_tuners:
# recpt1 は DVB チューナーに非対応なのでスキップ
if self._recpt1_compatible is True and multi_tuner.device_type == 'DVB':
continue
tuner: MirakurunTuner = {
'name': multi_tuner.name,
'types': ['GR', 'BS', 'CS'],
Expand Down Expand Up @@ -592,6 +601,9 @@ def get_tuner_command(device_path: Path) -> str:

# mirakc のチューナー設定ファイル用のデータ構造に変換
for isdbt_tuner in self._isdbt_tuners:
# recpt1 は DVB チューナーに非対応なのでスキップ
if self._recpt1_compatible is True and isdbt_tuner.device_type == 'DVB':
continue
tuner: MirakcTuner = {
'name': isdbt_tuner.name,
'types': ['GR'],
Expand All @@ -600,6 +612,9 @@ def get_tuner_command(device_path: Path) -> str:
}
cast(list[MirakcTuner], mirakc_config['tuners']).append(tuner)
for isdbs_tuner in self._isdbs_tuners:
# recpt1 は DVB チューナーに非対応なのでスキップ
if self._recpt1_compatible is True and isdbs_tuner.device_type == 'DVB':
continue
tuner: MirakcTuner = {
'name': isdbs_tuner.name,
'types': ['BS', 'CS'],
Expand All @@ -608,6 +623,9 @@ def get_tuner_command(device_path: Path) -> str:
}
cast(list[MirakcTuner], mirakc_config['tuners']).append(tuner)
for multi_tuner in self._multi_tuners:
# recpt1 は DVB チューナーに非対応なのでスキップ
if self._recpt1_compatible is True and multi_tuner.device_type == 'DVB':
continue
tuner: MirakcTuner = {
'name': multi_tuner.name,
'types': ['GR', 'BS', 'CS'],
Expand Down

0 comments on commit 404836a

Please sign in to comment.