prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  plugins.btv: No playable streams found
  ### Checklist
  
  - [X] This is a plugin issue and not a different kind of issue
  - [X] [I have read the contribution guidelines](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink)
  - [X] [I have checked the list of open and recently closed plugin issues](https://github.com/streamlink/streamlink/issues?q=is%3Aissue+label%3A%22plugin+issue%22)
  - [X] [I have checked the commit log of the master branch](https://github.com/streamlink/streamlink/commits/master)
  
  ### Streamlink version
  
  Latest stable release
  
  ### Description
  
  The plugin is not functional. I am attaching a log.
  
  ### Debug log
  
  ```text
  streamlink --loglevel debug "https://btvplus.bg/live/" best
  [cli][debug] OS:         Linux-5.15.0-50-generic-x86_64-with-glibc2.29
  [cli][debug] Python:     3.8.10
  [cli][debug] Streamlink: 5.0.1
  [cli][debug] Dependencies:
  [cli][debug]  isodate: 0.6.0
  [cli][debug]  lxml: 4.6.4
  [cli][debug]  pycountry: 19.8.18
  [cli][debug]  pycryptodome: 3.9.9
  [cli][debug]  PySocks: 1.7.1
  [cli][debug]  requests: 2.26.0
  [cli][debug]  websocket-client: 1.2.1
  [cli][debug] Arguments:
  [cli][debug]  url=https://btvplus.bg/live/
  [cli][debug]  stream=['best']
  [cli][debug]  --loglevel=debug
  [cli][info] Found matching plugin btv for URL https://btvplus.bg/live/
  [utils.l10n][debug] Language code: bg_BG
  error: No playable streams found on this URL: https://btvplus.bg/live/
  ```
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `src/streamlink/plugins/btv.py`
  Content:
  ```
  1 """
  2 $description A privately owned Bulgarian live TV channel.
  3 $url btvplus.bg
  4 $type live
  5 $region Bulgaria
  6 """
  7 
  8 import logging
  9 import re
  10 
  11 from streamlink.plugin import Plugin, pluginmatcher
  12 from streamlink.plugin.api import validate
  13 from streamlink.stream.hls import HLSStream
  14 
  15 log = logging.getLogger(__name__)
  16 
  17 
  18 @pluginmatcher(re.compile(
  19     r"https?://(?:www\.)?btvplus\.bg/live/?"
  20 ))
  21 class BTV(Plugin):
  22     URL_API = "https://btvplus.bg/lbin/v3/btvplus/player_config.php"
  23 
  24     def _get_streams(self):
  25         media_id = self.session.http.get(self.url, schema=validate.Schema(
  26             re.compile(r"media_id=(\d+)"),
  27             validate.any(None, validate.get(1)),
  28         ))
  29         if media_id is None:
  30             return
  31 
  32         stream_url = self.session.http.get(
  33             self.URL_API,
  34             params={
  35                 "media_id": media_id,
  36             },
  37             schema=validate.Schema(
  38                 validate.any(
  39                     validate.all(
  40                         validate.regex(re.compile(r"geo_blocked_stream")),
  41                         validate.get(0),
  42                     ),
  43                     validate.all(
  44                         validate.parse_json(),
  45                         {
  46                             "status": "ok",
  47                             "config": str,
  48                         },
  49                         validate.get("config"),
  50                         re.compile(r"src: \"(http.*?)\""),
  51                         validate.none_or_all(
  52                             validate.get(1),
  53                             validate.url(),
  54                         ),
  55                     ),
  56                 ),
  57             ),
  58         )
  59         if not stream_url:
  60             return
  61 
  62         if stream_url == "geo_blocked_stream":
  63             log.error("The content is not available in your region")
  64             return
  65 
  66         return HLSStream.parse_variant_playlist(self.session, stream_url)
  67 
  68 
  69 __plugin__ = BTV
  70
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/src/streamlink/plugins/btv.py b/src/streamlink/plugins/btv.py
  --- a/src/streamlink/plugins/btv.py
  +++ b/src/streamlink/plugins/btv.py
  @@ -44,14 +44,11 @@
                           validate.parse_json(),
                           {
                               "status": "ok",
  -                            "config": str,
  +                            "info": {
  +                                "file": validate.url(path=validate.endswith(".m3u8")),
  +                            },
                           },
  -                        validate.get("config"),
  -                        re.compile(r"src: \"(http.*?)\""),
  -                        validate.none_or_all(
  -                            validate.get(1),
  -                            validate.url(),
  -                        ),
  +                        validate.get(("info", "file")),
                       ),
                   ),
               ),
  @@ -63,7 +60,7 @@
               log.error("The content is not available in your region")
               return
   
  -        return HLSStream.parse_variant_playlist(self.session, stream_url)
  +        return {"live": HLSStream(self.session, stream_url)}
   
   
   __plugin__ = BTV
  
verification_info: {"golden_diff": "diff --git a/src/streamlink/plugins/btv.py b/src/streamlink/plugins/btv.py\n--- a/src/streamlink/plugins/btv.py\n+++ b/src/streamlink/plugins/btv.py\n@@ -44,14 +44,11 @@\n                         validate.parse_json(),\n                         {\n                             \"status\": \"ok\",\n-                            \"config\": str,\n+                            \"info\": {\n+                                \"file\": validate.url(path=validate.endswith(\".m3u8\")),\n+                            },\n                         },\n-                        validate.get(\"config\"),\n-                        re.compile(r\"src: \\\"(http.*?)\\\"\"),\n-                        validate.none_or_all(\n-                            validate.get(1),\n-                            validate.url(),\n-                        ),\n+                        validate.get((\"info\", \"file\")),\n                     ),\n                 ),\n             ),\n@@ -63,7 +60,7 @@\n             log.error(\"The content is not available in your region\")\n             return\n \n-        return HLSStream.parse_variant_playlist(self.session, stream_url)\n+        return {\"live\": HLSStream(self.session, stream_url)}\n \n \n __plugin__ = BTV\n", "issue": "plugins.btv: No playable streams found\n### Checklist\n\n- [X] This is a plugin issue and not a different kind of issue\n- [X] [I have read the contribution guidelines](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink)\n- [X] [I have checked the list of open and recently closed plugin issues](https://github.com/streamlink/streamlink/issues?q=is%3Aissue+label%3A%22plugin+issue%22)\n- [X] [I have checked the commit log of the master branch](https://github.com/streamlink/streamlink/commits/master)\n\n### Streamlink version\n\nLatest stable release\n\n### Description\n\nThe plugin is not functional. I am attaching a log.\n\n### Debug log\n\n```text\nstreamlink --loglevel debug \"https://btvplus.bg/live/\" best\r\n[cli][debug] OS:         Linux-5.15.0-50-generic-x86_64-with-glibc2.29\r\n[cli][debug] Python:     3.8.10\r\n[cli][debug] Streamlink: 5.0.1\r\n[cli][debug] Dependencies:\r\n[cli][debug]  isodate: 0.6.0\r\n[cli][debug]  lxml: 4.6.4\r\n[cli][debug]  pycountry: 19.8.18\r\n[cli][debug]  pycryptodome: 3.9.9\r\n[cli][debug]  PySocks: 1.7.1\r\n[cli][debug]  requests: 2.26.0\r\n[cli][debug]  websocket-client: 1.2.1\r\n[cli][debug] Arguments:\r\n[cli][debug]  url=https://btvplus.bg/live/\r\n[cli][debug]  stream=['best']\r\n[cli][debug]  --loglevel=debug\r\n[cli][info] Found matching plugin btv for URL https://btvplus.bg/live/\r\n[utils.l10n][debug] Language code: bg_BG\r\nerror: No playable streams found on this URL: https://btvplus.bg/live/\n```\n\n", "before_files": [{"content": "\"\"\"\n$description A privately owned Bulgarian live TV channel.\n$url btvplus.bg\n$type live\n$region Bulgaria\n\"\"\"\n\nimport logging\nimport re\n\nfrom streamlink.plugin import Plugin, pluginmatcher\nfrom streamlink.plugin.api import validate\nfrom streamlink.stream.hls import HLSStream\n\nlog = logging.getLogger(__name__)\n\n\n@pluginmatcher(re.compile(\n    r\"https?://(?:www\\.)?btvplus\\.bg/live/?\"\n))\nclass BTV(Plugin):\n    URL_API = \"https://btvplus.bg/lbin/v3/btvplus/player_config.php\"\n\n    def _get_streams(self):\n        media_id = self.session.http.get(self.url, schema=validate.Schema(\n            re.compile(r\"media_id=(\\d+)\"),\n            validate.any(None, validate.get(1)),\n        ))\n        if media_id is None:\n            return\n\n        stream_url = self.session.http.get(\n            self.URL_API,\n            params={\n                \"media_id\": media_id,\n            },\n            schema=validate.Schema(\n                validate.any(\n                    validate.all(\n                        validate.regex(re.compile(r\"geo_blocked_stream\")),\n                        validate.get(0),\n                    ),\n                    validate.all(\n                        validate.parse_json(),\n                        {\n                            \"status\": \"ok\",\n                            \"config\": str,\n                        },\n                        validate.get(\"config\"),\n                        re.compile(r\"src: \\\"(http.*?)\\\"\"),\n                        validate.none_or_all(\n                            validate.get(1),\n                            validate.url(),\n                        ),\n                    ),\n                ),\n            ),\n        )\n        if not stream_url:\n            return\n\n        if stream_url == \"geo_blocked_stream\":\n            log.error(\"The content is not available in your region\")\n            return\n\n        return HLSStream.parse_variant_playlist(self.session, stream_url)\n\n\n__plugin__ = BTV\n", "path": "src/streamlink/plugins/btv.py"}], "after_files": [{"content": "\"\"\"\n$description A privately owned Bulgarian live TV channel.\n$url btvplus.bg\n$type live\n$region Bulgaria\n\"\"\"\n\nimport logging\nimport re\n\nfrom streamlink.plugin import Plugin, pluginmatcher\nfrom streamlink.plugin.api import validate\nfrom streamlink.stream.hls import HLSStream\n\nlog = logging.getLogger(__name__)\n\n\n@pluginmatcher(re.compile(\n    r\"https?://(?:www\\.)?btvplus\\.bg/live/?\"\n))\nclass BTV(Plugin):\n    URL_API = \"https://btvplus.bg/lbin/v3/btvplus/player_config.php\"\n\n    def _get_streams(self):\n        media_id = self.session.http.get(self.url, schema=validate.Schema(\n            re.compile(r\"media_id=(\\d+)\"),\n            validate.any(None, validate.get(1)),\n        ))\n        if media_id is None:\n            return\n\n        stream_url = self.session.http.get(\n            self.URL_API,\n            params={\n                \"media_id\": media_id,\n            },\n            schema=validate.Schema(\n                validate.any(\n                    validate.all(\n                        validate.regex(re.compile(r\"geo_blocked_stream\")),\n                        validate.get(0),\n                    ),\n                    validate.all(\n                        validate.parse_json(),\n                        {\n                            \"status\": \"ok\",\n                            \"info\": {\n                                \"file\": validate.url(path=validate.endswith(\".m3u8\")),\n                            },\n                        },\n                        validate.get((\"info\", \"file\")),\n                    ),\n                ),\n            ),\n        )\n        if not stream_url:\n            return\n\n        if stream_url == \"geo_blocked_stream\":\n            log.error(\"The content is not available in your region\")\n            return\n\n        return {\"live\": HLSStream(self.session, stream_url)}\n\n\n__plugin__ = BTV\n", "path": "src/streamlink/plugins/btv.py"}]}