Debloat any Android or Google TV over Wi-Fi and get an Apple TV-style home.
Python adbadblockandroid-tvandroid-tv-launcherapple-tvbloatware-removalclaude-codedebloatfire-tvgoogle-tvlauncherprivacysmart-tvsony-braviatclvibe-codingxiaomi
tools: pick endpoint port ahead of TV_PORT in tv.py
yadavnikhil03692c74f2a86d
diff --git a/tests/test_tv_target.py b/tests/test_tv_target.pyindex f1389428b..b9bf74b76 100644--- a/tests/test_tv_target.py+++ b/tests/test_tv_target.py@@ -60,9 +60,14 @@ class TvTargetTest(unittest.TestCase):self.assertEqual(tv.HOST, "192.0.2.1")self.assertEqual(tv.PORT, 39482)- def test_tv_port_env_overrides_endpoint_port(self):+ def test_endpoint_port_overrides_tv_port_env(self):tv = load_tv({"TV_HOST": "192.0.2.1:39482", "TV_PORT": "15555"})self.assertEqual(tv.HOST, "192.0.2.1")+ self.assertEqual(tv.PORT, 39482)++ def test_tv_port_env_used_when_endpoint_has_no_port(self):+ tv = load_tv({"TV_HOST": "192.0.2.1", "TV_PORT": "15555"})+ self.assertEqual(tv.HOST, "192.0.2.1")self.assertEqual(tv.PORT, 15555)def test_ipv6_bracketed_endpoint(self):diff --git a/tools/tv.py b/tools/tv.pyindex 10af800ff..a23f388dc 100644--- a/tools/tv.py+++ b/tools/tv.py@@ -49,7 +49,7 @@ if not _raw_host:sys.exit("Set TV_HOST to your TV's IP address, e.g. TV_HOST=192.168.1.50 tools/tv.py --probe\n""(find it under Settings → Network, or look for the TV in `arp -a`)")HOST, _endpoint_port = split_host_port(_raw_host)-_port_str = os.environ.get("TV_PORT") or _endpoint_port or "5555"+_port_str = _endpoint_port or os.environ.get("TV_PORT") or "5555"try:PORT = int(_port_str)if not (1 <= PORT <= 65535):