### Dynamic Configuration by Hostname Source: https://github.com/dongaba/tverrec/wiki/高度な設定 Example of adjusting download concurrency based on the computer name. ```PowerShell if ( [String][System.Net.Dns]::GetHostName().ToLower() -eq 'mainpc' ) { $script:parallelDownloadFileNum = 10 } else { $script:parallelDownloadFileNum = 5 } ``` -------------------------------- ### Dynamic Configuration by OS Source: https://github.com/dongaba/tverrec/wiki/高度な設定 Example of switching configuration variables based on the host operating system. ```PowerShell switch ($true) { $IsWindows { $script:saveBaseDir = 'V:' ; break } $isLinux { $script:saveBaseDir = '/mnt/Video' ; break } $isMacOs { $script:saveBaseDir = '/Volumes/Video' ; break } } ``` -------------------------------- ### Platform User Creation Response Example Source: https://github.com/dongaba/tverrec/wiki/トークン取得API JSON structure returned upon successful creation of a platform user. ```json { "api_version": "v2", "code": 0, "message": "", "type": "hash", "result": { "platform_uid": "8d11206e6d37479896779213a4ab8c0d9709", "platform_ad_uuid": "3dee14ea-605d-4688-a666-67adf316b02f", "platform_token": "9ctqx215rh89jt3ygli3qskgeqlp4gk1r23161es", "browser_id": "tf38ohym3h00qncpyyhby4zlanhsowpmfeeo", "device_type": "pc", "agreement_version": "" } } ``` -------------------------------- ### API Response JSON Example Source: https://github.com/dongaba/tverrec/wiki/タレント出演番組取得API Example of the JSON structure returned by the API, containing a list of episode objects. ```json { "api_version": "", "code": 0, "message": "", "type": "hash", "result": { "contents": [ { "type": "episode", "content": { "id": "ep073gt7rx", "version": 5, "title": "ワークマン知られざる闘いテント4900円…開発の裏側へ【傑作選】", "endAt": 1673017199, "broadcastDateLabel": "3月4日(金)放送分", "isNHKContent": false, "isSubtitle": false, "ribbonID": 0, "seriesTitle": "ガイアの夜明け", "isAvailable": true, "broadcasterName": "テレビ東京", "productionProviderName": "テレビ東京" }, "isLater": false, "favoriteCount": 201914, "endAt": 1673017199 }, { "type": "episode", "content": { "id": "ep0yc6uwcl", "version": 5, "title": "豪華芸能人が初詣スポット&冬の人気観光地へ【妻夫木聡・松下奈緒編】", "endAt": 1673776740, "broadcastDateLabel": "1月2日(月)放送分", "isNHKContent": false, "isSubtitle": false, "ribbonID": 0, "seriesTitle": "バナナマンのせっかくグルメ!!", "isAvailable": true, "broadcasterName": "TBS", "productionProviderName": "TBS" }, "isLater": false, "favoriteCount": 215751, "endAt": 1673776740 }, { "type": "episode", "content": { "id": "ep1q09wz3i", "version": 8, "title": "第1話 ビシビシいくわよ、覚悟しなさい!女性教師vs草食系男子", "endAt": 1673179140, "broadcastDateLabel": "2009年放送", "isNHKContent": false, "isSubtitle": false, "ribbonID": 0, "seriesTitle": "おひとりさま", "isAvailable": true, "broadcasterName": "TBS", "productionProviderName": "TBS" }, "isLater": false, "favoriteCount": 7574, "endAt": 1673179140 }, { "type": "episode", "content": { "id": "ep1rebtxqr", "version": 2, "title": "常識を破る異色のスーパー 昭和スタイル?肉がなぜ格安?", "endAt": 1673013239, "broadcastDateLabel": "12月16日(金)放送分", "isNHKContent": false, "isSubtitle": false, "ribbonID": 0, "seriesTitle": "ガイアの夜明け", "isAvailable": true, "broadcasterName": "テレビ東京", "productionProviderName": "テレビ東京" }, "isLater": false, "favoriteCount": 201914, "endAt": 1673013239 }, { "type": "episode", "content": { "id": "ep5mc9za3k", "version": 6, "title": "最終話 感動の最終回のはずが…究極の格差恋愛の行方は?", "endAt": 1673179140, "broadcastDateLabel": "2009年放送", "isNHKContent": false, "isSubtitle": false, "ribbonID": 0, "seriesTitle": "おひとりさま", "isAvailable": true, "broadcasterName": "TBS", "productionProviderName": "TBS" }, "isLater": false, "favoriteCount": 7574, "endAt": 1673179140 }, { "type": "episode", "content": { "id": "ep73w2xk6k", "version": 7, "title": "スシローvs超一流寿司職人 【サイドメニュー】", "endAt": 1673690340, "broadcastDateLabel": "1月1日(日)放送分", "isNHKContent": false, "isSubtitle": false, "ribbonID": 0, "seriesTitle": "ジョブチューン ~アノ職業のヒミツぶっちゃけます!", "isAvailable": true, "broadcasterName": "TBS", "productionProviderName": "TBS" }, "isLater": false, "favoriteCount": 114257, "endAt": 1673690340 }, { "type": "episode", "content": { "id": "ep7954enjn", "version": 3, "title": "10分で届く“超速”宅配スーパーの秘密【傑作選】", "endAt": 1673621999, "broadcastDateLabel": "2月25日(金)放送分", "isNHKContent": false, "isSubtitle": false, "ribbonID": 0, "seriesTitle": "ガイアの夜明け", "isAvailable": true, "broadcasterName": "テレビ東京", "productionProviderName": "テレビ東京" }, "isLater": false, "favoriteCount": 201914, "endAt": 1673621999 }, { "type": "episode", "content": { "id": "ep8pok2930", "version": 7, "title": "第2話 この島で医者よりも大切なもの…それは", "endAt": 1673179140, "broadcastDateLabel": "2009年放送", "isNHKContent": false, "isSubtitle": false, "ribbonID": 0, "seriesTitle": "本日も晴れ。異状なし", "isAvailable": true, "broadcasterName": "TBS", "productionProviderName": "TBS" }, "isLater": false, "favoriteCount": 2517, "endAt": 1673179140 } ] } } ``` -------------------------------- ### Dynamic Configuration for ffmpeg Source: https://github.com/dongaba/tverrec/wiki/高度な設定 Example of setting hardware acceleration options for ffmpeg based on OS and hardware. ```PowerShell if ($IsWindows) { if ((Get-WmiObject Win32_VideoController).Name.ToLower() -like '*intel*' ) { $script:ffmpegDecodeOption = '-hwaccel qsv -c:v h264_qsv' } elseif ((Get-WmiObject Win32_VideoController).Name.ToLower() -like '*nvidia*' ) { $script:ffmpegDecodeOption = '-hwaccel cuda -hwaccel_output_format cuda' } } elseif ($isLinux) { if ([System.Net.Dns]::GetHostName() -eq 'pi4') { '-c:v h264_v4l2m2m -num_output_buffers 32 -num_capture_buffers 32' } else { '' } } elseif ($isMacOs) { '-hwaccel videotoolbox' } else { '' } ``` -------------------------------- ### Execute Automated Bulk Download on Windows Source: https://github.com/dongaba/tverrec/wiki/CUI版の使い方 Starts the continuous automated download process for Windows environments. ```batch win/start_tverrec.cmd ``` -------------------------------- ### Run TVerRec with Docker Compose Source: https://context7.com/dongaba/tverrec/llms.txt Commands to start the container in detached mode and follow the logs. ```bash docker-compose up -d docker-compose logs -f ``` -------------------------------- ### Mapping Additional Folders in Windows Sandbox Source: https://github.com/dongaba/tverrec/wiki/Windowsサンドボックス Example of modifying the MappedFolders section to share an additional directory from the host PC. ```xml ..\..\ C:\Users\WDAGUtilityAccount\Desktop\TVerRec D:\download C:\Users\WDAGUtilityAccount\Desktop\download ``` -------------------------------- ### GET /components Source: https://github.com/dongaba/tverrec/wiki/ホーム画面取得API Retrieves a list of components such as billboards, live content, special features, series, and episodes. ```APIDOC ## GET /components ### Description Retrieves a collection of media components including live broadcasts, special feature lists, series, and individual episodes. ### Response #### Success Response (200) - **api_version** (string) - API version identifier - **code** (integer) - Response status code - **message** (string) - Response message - **type** (string) - Data type identifier - **result** (object) - The main result object containing components #### Response Example { "api_version": "", "code": 0, "message": "", "type": "hasharray", "result": { "components": [ { "componentID": "", "type": "billboard", "label": "Billboard", "contents": [] } ] } } ``` -------------------------------- ### GET /service/api/v1/callSeasonEpisodes/{シーズンID} Source: https://github.com/dongaba/tverrec/wiki/シーズンからエピソード取得API Retrieves program episodes for a given season ID. The season ID can be an 8-character ID starting with 's' or a 10-character ID starting with 'ss'. ```APIDOC ## GET /service/api/v1/callSeasonEpisodes/{シーズンID} ### Description Retrieves program episodes for a given season ID. The season ID can be an 8-character ID starting with 's' or a 10-character ID starting with 'ss'. ### Method GET ### Endpoint `https://platform-api.tver.jp/service/api/v1/callSeasonEpisodes/{シーズンID}` ### Headers - **x-tver-platform-type** (string) - Required - Value: "web" ### Parameters #### Path Parameters - **{シーズンID}** (string) - Required - An 8-character season ID starting with 's' or a 10-character season ID starting with 'ss'. #### Query Parameters - **platform_uid** (string) - Required - UID obtained from the token acquisition API. - **platform_token** (string) - Required - Token obtained from the token acquisition API. ### Request Example ```powershell $headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]" $headers.Add("x-tver-platform-type", " web") $response = Invoke-RestMethod 'https://platform-api.tver.jp/service/api/v1/callSeasonEpisodes/s0000035?platform_uid=ab41d3b879c0464d82b50f08f4001bb5d51a&platform_token=n0ts0n8ybf0vlouyp3ld8q0mk67jgfzvt811tp0t' -Method 'GET' -Headers $headers $response | ConvertTo-Json ``` ### Response #### Success Response (200) - **api_version** (string) - API version. - **code** (integer) - Response code. - **message** (string) - Response message. - **type** (string) - Response type. - **result** (object) - Contains the list of episodes. - **contents** (array) - List of episodes. - **type** (string) - Type of content (e.g., "episode", "live"). - **content** (object) - Details of the episode or live broadcast. - **id** (string) - Unique identifier for the content. - **version** (integer) - Content version. - **title** (string) - Title of the episode or program. - **endAt** (integer) - Timestamp when the content ends. - **broadcastDateLabel** (string) - Label indicating the broadcast date. - **isNHKContent** (boolean) - Indicates if it's NHK content. - **isSubtitle** (boolean) - Indicates if subtitles are available. - **ribbonID** (integer) - Ribbon identifier. - **seriesTitle** (string) - Title of the series. - **isAvailable** (boolean) - Indicates if the content is available. - **broadcasterName** (string) - Name of the broadcaster. - **productionProviderName** (string) - Name of the production provider. - **startAt** (integer) - Timestamp when the live broadcast starts. - **liveType** (integer) - Type of live broadcast. - **dvr** (object) - DVR information for live content. - **isDVR** (boolean) - Indicates if DVR is available. - **startAt** (integer) - DVR start time. - **endAt** (integer) - DVR end time. - **onairStartAt** (integer) - Timestamp when the content is on air. - **onairEndAt** (integer) - Timestamp when the content ends on air. - **isDVRNow** (boolean) - Indicates if DVR is currently active. - **isLater** (boolean) - Indicates if the content is available later. - **favoriteCount** (integer) - Number of favorite counts. #### Response Example ```json { "api_version": "", "code": 0, "message": "", "type": "hash", "result": { "contents": [ { "type": "episode", "content": { "id": "ep7954enjn", "version": 3, "title": "10分で届く\u201c超速\u201d宅配スーパーの秘密\u3010\u5099\u4f5c\u9078\u3011", "endAt": 1673621999, "broadcastDateLabel": "2月25日(金)放送分", "isNHKContent": false, "isSubtitle": false, "ribbonID": 0, "seriesTitle": "ガイアの夜明け", "isAvailable": true, "broadcasterName": "テレビ東京", "productionProviderName": "テレビ東京" }, "isLater": false, "favoriteCount": 201914, "endAt": 1673621999 }, { "type": "episode", "content": { "id": "ep1rebtxqr", "version": 2, "title": "常識を破る異色のスーパー\u3000昭和スタイル?肉がなぜ格安?", "endAt": 1673013239, "broadcastDateLabel": "12月16日(金)放送分", "isNHKContent": false, "isSubtitle": false, "ribbonID": 0, "seriesTitle": "ガイアの夜明け", "isAvailable": true, "broadcasterName": "テレビ東京", "productionProviderName": "テレビ東京" }, "isLater": false, "favoriteCount": 201914, "endAt": 1673013239 }, { "type": "episode", "content": { "id": "ep073gt7rx", "version": 5, "title": "ワークマン知られざる闘いテント4900円…開発の裏側へ\u3010\u5099\u4f5c\u9078\u3011", "endAt": 1673017199, "broadcastDateLabel": "3月4日(金)放送分", "isNHKContent": false, "isSubtitle": false, "ribbonID": 0, "seriesTitle": "ガイアの夜明け", "isAvailable": true, "broadcasterName": "テレビ東京", "productionProviderName": "テレビ東京" }, "isLater": false, "favoriteCount": 201914, "endAt": 1673017199 }, { "type": "live", "content": { "id": "le23xnn7ta", "version": 3, "title": "ガイアの夜明け【回転寿司サバイバル!~脱100円と新たな挑戦~】", "startAt": 1673010000, "endAt": 1673013240, "liveType": 1, "dvr": { "isDVR": false, "startAt": 0, "endAt": 0 }, "isNHKContent": false, "onairStartAt": 1673010000, "onairEndAt": 1673013240, "seriesTitle": "ガイアの夜明け", "isDVRNow": false }, "favoriteCount": 201914 } ] } } ``` ``` -------------------------------- ### GET /service/api/v1/callTalent/{talentId} Source: https://github.com/dongaba/tverrec/wiki/タレント情報取得API Retrieves information for a specific talent identified by a 7-character ID starting with 't'. ```APIDOC ## GET /service/api/v1/callTalent/{talentId} ### Description Retrieves talent information using a specific talent ID. ### Method GET ### Endpoint https://platform-api.tver.jp/service/api/v1/callTalent/{talentId} ### Parameters #### Path Parameters - **talentId** (string) - Required - The 7-character talent ID starting with 't'. #### Query Parameters - **platform_uid** (string) - Required - UID obtained from the token acquisition API. - **toplatform_token** (string) - Required - Token obtained from the token acquisition API. ### Headers - **x-tver-platform-type**: web ### Response #### Success Response (200) - **api_version** (string) - API version string. - **code** (integer) - Status code. - **message** (string) - Response message. - **type** (string) - Data type. - **result** (object) - Talent details including id, version, name, and thumbnail status. #### Response Example { "api_version": "", "code": 0, "message": "", "type": "hash", "result": { "type": "talent", "content": { "id": "t00fe57", "version": 21, "name": "松下 奈緒", "existsThumbnail": true }, "isFavorite": false } } ``` -------------------------------- ### GET /service/api/v1/callSeries/{seriesID} Source: https://github.com/dongaba/tverrec/wiki/シリーズ情報取得API Retrieves information for a specific program series using a series ID starting with 'sr'. ```APIDOC ## GET /service/api/v1/callSeries/{seriesID} ### Description Retrieves detailed information about a program series using its unique series ID. ### Method GET ### Endpoint https://platform-api.tver.jp/service/api/v1/callSeries/{seriesID} ### Parameters #### Path Parameters - **seriesID** (string) - Required - The 10-character series ID starting with 'sr'. #### Query Parameters - **platform_uid** (string) - Required - UID obtained from the token acquisition API. - **platform_token** (string) - Required - Token obtained from the token acquisition API. ### Headers - **x-tver-platform-type** (string) - Required - Must be set to 'web'. ### Request Example GET https://platform-api.tver.jp/service/api/v1/callSeries/sr7x3ce7ak?platform_uid=ab41d3b879c0464d82b50f08f4001bb5d51a&platform_token=n0ts0n8ybf0vlouyp3ld8q0mk67jgfzvt811tp0t ### Response #### Success Response (200) - **api_version** (string) - API version string. - **code** (integer) - Status code. - **message** (string) - Response message. - **result** (object) - The series data object containing content details, favorite status, and count. #### Response Example { "api_version": "", "code": 0, "message": "", "type": "hash", "result": { "type": "series", "content": { "id": "sr7x3ce7ak", "version": 3, "title": "ガイアの夜明け", "isNHKContent": false }, "isFavorite": false, "favoriteCount": 201912 } } ``` -------------------------------- ### Configure and Execute yt-dlp Downloads Source: https://context7.com/dongaba/tverrec/llms.txt Sets up download parameters and manages the execution process for yt-dlp, including non-TVer sources. ```powershell # 内部関数 Invoke-Ytdl の動作 # 基本引数の構成 $ytdlBaseArgs = @( '--format "(bv*+ba/b)"' # 最高画質+最高音質 '--concurrent-fragments 10' # 並列フラグメント数 '--merge-output-format mp4' # MP4形式で出力 '--embed-thumbnail' # サムネイル埋め込み '--embed-chapters' # チャプター埋め込み '--embed-metadata' # メタデータ埋め込み '--sub-langs all' # 全言語の字幕 '--convert-subs srt' # SRT形式に変換 '--embed-subs' # 字幕埋め込み ) # ダウンロード帯域制限 $script:rateLimit = 50 # Mbps単位、0で制限なし # タイムアウト設定 $script:ytdlTimeoutSec = 3600 # 秒単位、0で無制限 # TVer以外のサイトからのダウンロード Invoke-NonTverYtdl -URL 'https://www.youtube.com/watch?v=xxxxx' # ダウンロードプロセスの待機 Wait-DownloadCompletion # すべてのダウンロードが完了するまで待機 Wait-YtdlProcess -parallelDownloadFileNum 5 # 指定数以下になるまで待機 ``` -------------------------------- ### Window Display Settings Source: https://github.com/dongaba/tverrec/wiki/高度な設定 Configure how the youtube-dl and ffmpeg download windows are displayed. ```APIDOC ## Window Display Settings ### Description Determine how the windows for youtube-dl and ffmpeg are displayed during the download process. ### Variables - **$script:windowShowStyle** (string) - Controls the window display style. Accepts `Normal`, `Maximized`, `Minimized` (default), or `Hidden`. `Normal` is not recommended due to excessive window creation. ``` -------------------------------- ### Get Special Content with PowerShell Source: https://github.com/dongaba/tverrec/wiki/特集取得API Use this PowerShell script to make a GET request to the TVer special content API. Ensure the 'x-tver-platform-type' header is set to 'web'. The response is converted to JSON. ```powershell $headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]" $headers.Add("x-tver-platform-type", " web") $response = Invoke-RestMethod 'https://service-api.tver.jp/api/v1/callSpecial' -Method 'GET' -Headers $headers $response | ConvertTo-Json ``` -------------------------------- ### Get Episode Information using PowerShell Source: https://github.com/dongaba/tverrec/wiki/番組説明 Use this PowerShell script to make a GET request to the episode information endpoint. Ensure you have the correct episode ID. The response is converted to JSON for easier parsing. ```powershell $response = Invoke-RestMethod 'https://statics.tver.jp/content/episode/ep1rebtxqr.json' -Method 'GET' -Headers $headers $response | ConvertTo-Json ``` -------------------------------- ### Execute Manual Bulk Download Steps on Windows Source: https://github.com/dongaba/tverrec/wiki/CUI版の使い方 Individual scripts for manual control over the download, cleanup, validation, and movement pipeline. ```batch win/a.download_bulk.cmd ``` ```batch win/b.delete_trash.cmd ``` ```batch win/c.validate_video.cmd ``` ```batch win/d.move_video.cmd ``` -------------------------------- ### Configure Download Base Directory Source: https://github.com/dongaba/tverrec/wiki/基本的な設定 Sets the destination directory for verified video files. Must be an absolute path. ```PowerShell $script:downloadBaseDir = 'C:\Users\yamada-taro\Video' ``` ```PowerShell $script:downloadBaseDir = '/mnt/Work' ``` ```PowerShell $script:downloadBaseDir = '/Volumes/Work' ``` -------------------------------- ### Get Series Information using PowerShell Source: https://github.com/dongaba/tverrec/wiki/シリーズ情報取得API Use this PowerShell script to make a GET request to the TVer API endpoint for series information. Ensure you have the correct series ID, platform UID, and platform token. ```powershell $headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]" $headers.Add("x-tver-platform-type", " web") $response = Invoke-RestMethod 'https://platform-api.tver.jp/service/api/v1/callSeries/sr7x3ce7ak?platform_uid=ab41d3b879c0464d82b50f08f4001bb5d51a&platform_token=n0ts0n8ybf0vlouyp3ld8q0mk67jgfzvt811tp0t' -Method 'GET' -Headers $headers $response | ConvertTo-Json ``` -------------------------------- ### Get Talent Episode Information using PowerShell Source: https://github.com/dongaba/tverrec/wiki/タレント出演番組取得API This PowerShell script demonstrates how to call the TVer Platform API to get talent information for a specific episode. Ensure you have the correct talent ID, platform UID, and platform token. ```powershell $headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]" $headers.Add("x-tver-platform-type", " web") $response = Invoke-RestMethod 'https://platform-api.tver.jp/service/api/v1/callTalentEpisode/t00fe57?platform_uid=ab41d3b879c0464d82b50f08f4001bb5d51a&platform_token=n0ts0n8ybf0vlouyp3ld8q0mk67jgfzvt811tp0t' -Method 'GET' -Headers $headers $response | ConvertTo-Json ``` -------------------------------- ### Bulk Download Execution and Configuration Source: https://context7.com/dongaba/tverrec/llms.txt Execute bulk downloads using keyword files or GUI mode. The keyword configuration supports genres, series IDs, talent IDs, and favorites. ```powershell # 一括ダウンロードスクリプトの実行 .\download_bulk.ps1 # GUIモードで実行 .\download_bulk.ps1 gui # キーワードファイル (keyword.conf) の設定例 # ジャンルタグで指定 drama variety anime # シリーズIDで指定 sr7x3ce7ak # タレントIDで指定 ta12345abc # 特定のシーズンIDで指定 s0000035 # マイページのお気に入り mypage://favorites ``` -------------------------------- ### GET /service/api/v1/callHome Source: https://github.com/dongaba/tverrec/wiki/ホーム画面取得API Retrieves the content displayed on the TVer homepage. ```APIDOC ## GET /service/api/v1/callHome ### Description This endpoint allows you to retrieve all content displayed on the TVer homepage. ### Method GET ### Endpoint `https://platform-api.tver.jp/service/api/v1/callHome` ### Headers - **x-tver-platform-type** (string) - Required - Value should be `web`. ### Query Parameters - **platform_uid** (string) - Required - The UID obtained from the Token Acquisition API. - **platform_token** (string) - Required - The token obtained from the Token Acquisition API. ### Request Example ```powershell $headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]" $headers.Add("x-tver-platform-type", " web") $response = Invoke-RestMethod 'https://platform-api.tver.jp/service/api/v1/callHome?platform_uid=ab41d3b879c0464d82b50f08f4001bb5d51a&platform_token=n0ts0n8ybf0vlouyp3ld8q0mk67jgfzvt811tp0t' -Method 'GET' -Headers $headers $response | ConvertTo-Json ``` ### Response #### Success Response (200) - **content** (object) - The main content of the homepage. - **metadata** (object) - Metadata related to the content. #### Response Example ```json { "content": { "sections": [ { "title": "Featured Programs", "items": [ { "title": "Program Title 1", "thumbnail_url": "http://example.com/thumbnail1.jpg" } ] } ] }, "metadata": { "timestamp": "2023-10-27T10:00:00Z" } } ``` ``` -------------------------------- ### System Configuration Source: https://context7.com/dongaba/tverrec/llms.txt Define global settings for download paths, parallel processing, and file naming conventions. ```powershell # 基本設定 # ダウンロード先のフルパス $script:downloadBaseDir = 'C:\Users\username\Downloads\TVer' # 作業ディレクトリ(SSD推奨) $script:downloadWorkDir = 'C:\Temp' # 保存先ディレクトリ(複数指定可能) $script:saveBaseDir = 'D:\TVLibrary;E:\Archive' # 並列ダウンロード設定 $script:parallelDownloadFileNum = 5 # 同時ダウンロード番組数 $script:parallelDownloadNumPerFile = 10 # 番組あたりの並列ダウンロード数 # マイページ用トークン(匿名利用時) $script:myPlatformUID = 'your_platform_uid' $script:myPlatformToken = 'your_platform_token' # マイページ用memberSID(ユーザ登録利用時) $script:myMemberSID = 'your_member_sid' # ファイル名オプション $script:sortVideoBySeries = $true # シリーズ別ディレクトリ作成 $script:sortVideoByMedia = $false # 放送局別ディレクトリ作成 $script:addSeriesName = $true # ファイル名にシリーズ名追加 $script:addSeasonName = $true # ファイル名にシーズン名追加 $script:addBroadcastDate = $true # ファイル名に放送日追加 $script:embedSubtitle = $true # 字幕の埋め込み $script:embedMetatag = $true # メタタグの埋め込み # スケジュール設定(曜日・時間帯で処理を停止) $script:scheduleStop = $true $script:stopSchedule = @{ 'Mon' = @(0, 1, 2, 3, 4, 5) # 月曜0-5時は停止 'Tue' = @() 'Wed' = @() 'Thu' = @() 'Fri' = @() 'Sat' = @() 'Sun' = @() } ``` -------------------------------- ### GET /service/api/v1/callKeywordSearch Source: https://context7.com/dongaba/tverrec/llms.txt Searches for TVer content based on a provided keyword. ```APIDOC ## GET /service/api/v1/callKeywordSearch ### Description Searches for TVer programs using a keyword string. ### Method GET ### Endpoint https://platform-api.tver.jp/service/api/v1/callKeywordSearch ### Parameters #### Query Parameters - **platform_uid** (string) - Required - User platform UID. - **platform_token** (string) - Required - User platform token. - **keyword** (string) - Required - The search term (URL encoded). ### Response #### Success Response (200) - **result** (object) - Contains a list of contents and the result count. #### Response Example { "result": { "contents": [ { "type": "episode", "content": { "id": "epjwpxlupw", "title": "ガイアの夜明けを見てみよう!" } } ], "resultCount": 11 } } ``` -------------------------------- ### GET /api/v1/callEpisodeRanking Source: https://github.com/dongaba/tverrec/wiki/総合ランキング取得API Retrieves the current TVer episode ranking data. ```APIDOC ## GET https://service-api.tver.jp/api/v1/callEpisodeRanking ### Description Retrieves the content displayed on the TVer ranking page (https://tver.jp/ranking). Returns 30 items. ### Method GET ### Endpoint https://service-api.tver.jp/api/v1/callEpisodeRanking ### Headers - **x-tver-platform-type** (string) - Required - Must be set to "web" ### Request Example ```powershell $headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]" $headers.Add("x-tver-platform-type", "web") $response = Invoke-RestMethod 'https://service-api.tver.jp/api/v1/callEpisodeRanking' -Method 'GET' -Headers $headers $response | ConvertTo-Json ``` ``` -------------------------------- ### Enable Hardware Acceleration with ffmpeg (Intel) Source: https://github.com/dongaba/tverrec/wiki/高度な設定 Set `$script:ffmpegDecodeOption` to `'-hwaccel qsv -c:v h264_qsv'` to enable hardware acceleration using Intel Quick Sync Video during integrity checks. This setting is ignored if `$script:forceSoftwareDecodeFlag` is `$true`. ```powershell $script:ffmpegDecodeOption = "-hwaccel qsv -c:v h264_qsv" ``` -------------------------------- ### GET /api/v1/callSpecial Source: https://github.com/dongaba/tverrec/wiki/特集取得API Retrieves all content displayed on the https://tver.jp/specials page. ```APIDOC ## GET /api/v1/callSpecial ### Description This endpoint allows you to retrieve all content displayed on the TVer specials page (https://tver.jp/specials). ### Method GET ### Endpoint https://service-api.tver.jp/api/v1/callSpecial ### Headers - **x-tver-platform-type** (string) - Required - Value should be "web" ### Parameters No specific parameters are required for this request. ### Request Example ```powershell $headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]" $headers.Add("x-tver-platform-type", " web") $response = Invoke-RestMethod 'https://service-api.tver.jp/api/v1/callSpecial' -Method 'GET' -Headers $headers $response | ConvertTo-Json ``` ### Response #### Success Response (200) The response will contain the full content of the specials page. #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### Containerize with Docker Source: https://context7.com/dongaba/tverrec/llms.txt Configuration files for building and running the application in a Docker container. ```dockerfile FROM mcr.microsoft.com/powershell:latest # 必要なツールのインストール RUN apt-get update && apt-get install -y ffmpeg # TVerRecのクローン RUN git clone https://github.com/dongaba/TVerRec.git /app WORKDIR /app # 設定ファイルのコピー COPY user_setting.ps1 /app/conf/ # 実行 CMD ["pwsh", "-File", "./src/download_bulk.ps1"] ``` ```yaml version: '3' services: tverrec: build: . volumes: - ./downloads:/app/downloads - ./db:/app/db - ./conf/user_setting.ps1:/app/conf/user_setting.ps1 environment: - TZ=Asia/Tokyo restart: unless-stopped ``` ```bash # Dockerでの実行 docker build -t tverrec . docker run -v $(pwd)/downloads:/app/downloads tverrec ``` -------------------------------- ### GET /service/api/v1/callEpisode/{episodeId} Source: https://context7.com/dongaba/tverrec/llms.txt Retrieves detailed information about a specific TVer episode. ```APIDOC ## GET /service/api/v1/callEpisode/{episodeId} ### Description Retrieves detailed information about a specific TVer episode using its unique ID. ### Method GET ### Endpoint https://platform-api.tver.jp/service/api/v1/callEpisode/{episodeId} ### Parameters #### Path Parameters - **episodeId** (string) - Required - The unique identifier of the episode. #### Query Parameters - **platform_uid** (string) - Required - User platform UID. - **platform_token** (string) - Required - User platform token. ### Response #### Success Response (200) - **result** (object) - Contains episode, series, and season content details. #### Response Example { "result": { "episode": { "content": { "id": "ep1rebtxqr", "title": "常識を破る異色のスーパー", "broadcastDateLabel": "12月16日(金)放送分", "seriesTitle": "ガイアの夜明け", "broadcasterName": "テレビ東京", "endAt": 1673013239 } } } } ``` -------------------------------- ### GET /special-content Source: https://github.com/dongaba/tverrec/wiki/特集取得API Retrieves a list of special content features available on the platform. ```APIDOC ## GET /special-content ### Description Retrieves a list of special content features, such as seasonal collections, movie promotions, and thematic programming. ### Response #### Success Response (200) - **api_version** (string) - API version identifier - **code** (integer) - Status code - **message** (string) - Response message - **type** (string) - Data type (e.g., "hash") - **result** (object) - Contains the list of contents - **contents** (array) - List of special content items - **type** (string) - Content type - **content** (object) - Details of the special feature - **id** (string) - Unique identifier for the feature - **version** (integer) - Version number - **title** (string) - Display title of the feature - **allowOrder** (array) - Available sorting options - **key** (string) - Sort key - **name** (string) - Display name of the sort option #### Response Example { "api_version": "", "code": 0, "message": "", "type": "hash", "result": { "contents": [ { "type": "specialMain", "content": { "id": "tv-crossing22", "version": 9, "title": "テレビ5系列横断!TVer独占祭り", "allowOrder": [ { "key": "newer", "name": "新着順" } ] } } ] } } ``` -------------------------------- ### Configure Window Display Style Source: https://github.com/dongaba/tverrec/wiki/高度な設定 Set `$script:windowShowStyle` to one of 'Normal', 'Maximized', 'Minimized', or 'Hidden' to control how youtube-dl and ffmpeg windows are displayed. The default is 'Minimized'. 'Normal' is not recommended due to excessive windows. ```powershell $script:windowShowStyle = "Minimized" ``` ```powershell $script:windowShowStyle = "Normal" ``` ```powershell $script:windowShowStyle = "Hidden" ``` -------------------------------- ### Execute Individual Download on Windows Source: https://github.com/dongaba/tverrec/wiki/CUI版の使い方 Downloads specific programs by providing their URLs. ```batch win/z.download_single.cmd ```