Skip to content

Commit

Permalink
予約ファイル等のTSIDを移動するツールの補助バッチを追加
Browse files Browse the repository at this point in the history
  • Loading branch information
xtne6f committed Apr 20, 2018
1 parent 59842c3 commit b589bbd
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
14 changes: 13 additions & 1 deletion ini/Tools/tsidmove/tsidmove.cpp
@@ -1,4 +1,4 @@
// tsidmove: EDCBの予約、EPG自動予約、プログラム自動予約に含まれるTransportStreamIDの情報を変更する (2018-04-19)
// tsidmove: EDCBの予約、EPG自動予約、プログラム自動予約に含まれるTransportStreamIDの情報を変更する (2018-04-20)
// ※予約ファイル等にこのフォークと非互換の項目追加等されたフォークでは使いまわし不可能
#include "stdafx.h"
#include "../../../Common/CommonDef.h"
Expand Down Expand Up @@ -58,6 +58,18 @@ int wmain(int argc, wchar_t **argv)
return 1;
}

for (auto itr = chText5.GetMap().cbegin(); itr != chText5.GetMap().end(); itr++) {
for (auto jtr = itr; ++jtr != chText5.GetMap().end(); ) {
if (itr->second.originalNetworkID == jtr->second.originalNetworkID &&
itr->second.serviceID == jtr->second.serviceID) {
_putws(L"Warning: ChSet5.txtにTSID以外のIDが等しいサービスがあります。古い情報が残っていませんか?");
itr = chText5.GetMap().end();
itr--;
break;
}
}
}

HANDLE hMutex = CreateMutex(nullptr, FALSE, EPG_TIMER_BON_SRV_MUTEX);
if (hMutex) {
if (GetLastError() == ERROR_ALREADY_EXISTS) {
Expand Down
21 changes: 21 additions & 0 deletions ini/Tools/tsidmove_helper.bat
@@ -0,0 +1,21 @@
@echo 予約ファイルに含まれるTransportStreamIDの情報を変更します。
@echo ChSet4.txtやChSet5.txtはあらかじめチャンネルスキャンなどで更新してください。
@echo はじめに非破壊テストを行います。
@pause
"%~dp0tsidmove.exe" --dry-run
@if errorlevel 1 goto label1

@echo.
@echo テストは正常終了しました。実際に変更を行います。
@echo 必要なら予約ファイルをバックアップしてください。
@pause
"%~dp0tsidmove.exe" --run
@if errorlevel 1 goto label1
@goto label9

:label1
@echo.
@echo エラーが発生しました。終了します。

:label9
@pause

0 comments on commit b589bbd

Please sign in to comment.