(self, stream_url, user_agent)
| 125 | return False |
| 126 | |
| 127 | def build_command(self, stream_url, user_agent): |
| 128 | |
| 129 | if self.is_proxy(): |
| 130 | return [] |
| 131 | |
| 132 | replacements = { |
| 133 | "{streamUrl}": stream_url, |
| 134 | "{userAgent}": user_agent, |
| 135 | } |
| 136 | |
| 137 | # Split the command and iterate through each part to apply replacements |
| 138 | cmd = [self.command] + [ |
| 139 | self._replace_in_part(part, replacements) |
| 140 | for part in shlex_split(self.parameters) # use shlex to handle quoted strings |
| 141 | ] |
| 142 | |
| 143 | return cmd |
| 144 | |
| 145 | def _replace_in_part(self, part, replacements): |
| 146 | # Iterate through the replacements and replace each part of the string |
no test coverage detected