Repository: streamlink/streamlink
Pull request #2937 (2020-04-26 10:04:24)

plugins.viasat: remove play.nova.bg domain
closes https://github.com/streamlink/streamlink/issues/2900

codecov[bot]: # [Codecov](https://codecov.io/gh/streamlink/streamlink/pull/2937?src=pr&el=h1) Report
> Merging [#2937](https://codecov.io/gh/streamlink/streamlink/pull/2937?src=pr&el=desc) into [master](https://codecov.io/gh/streamlink/streamlink/commit/af86d38af3441db5e73bafa53065cb01d6b4d6f7&el=desc) will **decrease** coverage by `0.00%`.
> The diff coverage is `n/a`.


```diff
@@            Coverage Diff             @@
##           master    #2937      +/-   ##
==========================================
- Coverage   52.61%   52.60%   -0.01%     
==========================================
  Files         250      250              
  Lines       15720    15720              
==========================================
- Hits         8271     8270       -1     
- Misses       7449     7450       +1     
```


Patch:
diff --git a/NOTICE b/NOTICE
index 67fbc3eb..3db1b188 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,27 +1,5 @@
 Streamlink includes some bundled python libraries to ease installation.
 
-pbs License
-===========
-Copyright (C) 2011-2012 by Andrew Moffat
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-
 flashmedia License
 ==================
 Copyright (c) 2012-2013, Christopher Rosell
diff --git a/build.cmd b/build.cmd
deleted file mode 100644
index 243dc9a1..00000000
--- a/build.cmd
+++ /dev/null
@@ -1,21 +0,0 @@
-@echo off
-:: To build extensions for 64 bit Python 3, we need to configure environment
-:: variables to use the MSVC 2010 C++ compilers from GRMSDKX_EN_DVD.iso of:
-:: MS Windows SDK for Windows 7 and .NET Framework 4
-::
-:: More details at:
-:: https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows
-
-IF "%DISTUTILS_USE_SDK%"=="1" (
-    ECHO Configuring environment to build with MSVC on a 64bit architecture
-    ECHO Using Windows SDK 7.1
-    "C:\Program Files\Microsoft SDKs\Windows\v7.1\Setup\WindowsSdkVer.exe" -q -version:v7.1
-    CALL "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 /release
-    SET MSSdk=1
-    REM Need the following to allow tox to see the SDK compiler
-    SET TOX_TESTENV_PASSENV=DISTUTILS_USE_SDK MSSdk INCLUDE LIB
-) ELSE (
-    ECHO Using default MSVC build environment
-)
-
-CALL %*
diff --git a/docs/install.rst b/docs/install.rst
index 6c125b2b..6f1c7782 100644
--- a/docs/install.rst
+++ b/docs/install.rst
@@ -339,11 +339,6 @@ With these two environment variables it is possible to use `pycrypto`_ instead o
 Windows binaries
 ----------------
 
-.. important::
-
-    Windows XP is not supported. |br|
-    Windows Vista requires at least SP2 to be installed.
-
 .. rst-class:: table-custom-layout
 
 ==================================== ====================================
diff --git a/docs/plugin_matrix.rst b/docs/plugin_matrix.rst
index aec788ef..a088fca0 100644
--- a/docs/plugin_matrix.rst
+++ b/docs/plugin_matrix.rst
@@ -256,7 +256,6 @@ vaughnlive              - vaughnlive.tv      Yes   --
                         - instagib.tv
                         - vapers.tv
 viasat                  - juicyplay.dk       Yes   Yes   Streams may be geo-restricted.
-                        - play.nova.bg
                         - skaties.lv
                         - tv3.dk
                         - tv3.ee
diff --git a/src/streamlink/plugins/showroom.py b/src/streamlink/plugins/showroom.py
index f42af77c..3785e5ad 100644
--- a/src/streamlink/plugins/showroom.py
+++ b/src/streamlink/plugins/showroom.py
@@ -168,8 +168,13 @@ class Showroom(Plugin):
             if stream_info["type"] == "rtmp":
                 yield self._get_rtmp_stream(stream_info)
             elif stream_info["type"] == "hls":
-                for s in ShowroomHLSStream.parse_variant_playlist(self.session, stream_info["url"]).items():
-                    yield s
+                streams = ShowroomHLSStream.parse_variant_playlist(self.session, stream_info["url"])
+                if not streams:
+                    quality = _rtmp_quality_lookup.get(stream_info["label"], "other")
+                    yield quality, ShowroomHLSStream(self.session, stream_info["url"])
+                else:
+                    for s in streams.items():
+                        yield s
 
 
 __plugin__ = Showroom
diff --git a/src/streamlink/plugins/viasat.py b/src/streamlink/plugins/viasat.py
index 0cf87929..d3683a27 100644
--- a/src/streamlink/plugins/viasat.py
+++ b/src/streamlink/plugins/viasat.py
@@ -36,8 +36,6 @@ class Viasat(Plugin):
         (?:
             juicyplay\.dk
             |
-            play\.nova\.bg
-            |
             (?:tvplay\.)?
                 skaties\.lv
             |


Test patch:
diff --git a/tests/plugins/test_viasat.py b/tests/plugins/test_viasat.py
index 244fa234..05e77a48 100644
--- a/tests/plugins/test_viasat.py
+++ b/tests/plugins/test_viasat.py
@@ -9,7 +9,6 @@ class TestPluginViasat(unittest.TestCase):
             "http://www.juicyplay.dk/story/se-robinson-benjamins-store-forandring",
             "http://www.tv3.dk/paradise-hotel/paradise-hotel-2018-her-er-deltagerne",
             "http://www.tv3.dk/paradise-hotel/paradise-hotel-2018-her-er-deltagerne",
-            "https://play.nova.bg/programi/kh-faktor/902681?autostart=true",
             "https://play.tv3.lt/programos/eurocup/903167?autostart=true",
             "https://play.tv3.lt/programos/pamilti-vel/903174?autostart=true",
             "https://skaties.lv/sports/futbols/video-liverpool-izbraukuma-rada-klasi-pret-bournemouth/",
@@ -31,11 +30,13 @@ class TestPluginViasat(unittest.TestCase):
             "https://www.viafree.se/program/underhallning/det-stora-experimentet/sasong-1/avsnitt-19",
         ]
         for url in should_match:
-            self.assertTrue(Viasat.can_handle_url(url))
+            self.assertTrue(Viasat.can_handle_url(url), url)
 
+    def test_can_handle_url_negative(self):
         should_not_match = [
             "http://www.tv3play.no",
             "http://www.tv6play.se",
+            "https://play.nova.bg/programi/kh-faktor/902681?autostart=true",
         ]
         for url in should_not_match:
-            self.assertFalse(Viasat.can_handle_url(url))
+            self.assertFalse(Viasat.can_handle_url(url), url)