Skip to content

NETcaster: fix Python 3.14 import error and add a Full HD skin - #1106

Open
audi06 wants to merge 2 commits into
OpenPLi:python3from
audi06:netcaster-py314-fhd
Open

audi06 wants to merge 2 commits into
OpenPLi:python3from
audi06:netcaster-py314-fhd

Conversation

@audi06

@audi06 audi06 commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

NETcaster no longer opens on images with Python 3.14. On top of that, its browser screen is not usable on Full HD skins. Seen on a Dreambox TWO (OpenPLi develop, Python 3.14, PLi-FullNightHD).

1. NETcaster: replace FancyURLopener removed in Python 3.14

File ".../NETcaster/interface/shoutcast.py", line 55, in <module>
    from urllib.request import FancyURLopener
ImportError: cannot import name 'FancyURLopener' from 'urllib.request'
  • use urlopen() with a 10 s timeout, so an unreachable server cannot block the GUI indefinitely
  • open the pickle cache files in binary mode; pickle needs bytes on Python 3, so the genre/station cache never worked

Note: the SHOUTcast XML endpoint (www.shoutcast.com/sbin/newxml.phtml) no longer answers. After this change the SHOUTcast interface falls back to its built-in genre list instead of crashing, and Favorites work normally.

2. NETcaster: add a Full HD skin and stop clipping list rows

The screen was a fixed 560x440 window at 80,73. On 1920x1080 skins it sat small in the top-left corner. The list was 360px high with 50px rows, so the eighth row was cut off at the bottom.

  • add a 1200x820 Full HD layout (75px rows, 30/26px fonts, scaled buttons), chosen when the desktop is at least 1920 wide
  • center both layouts; the HD list is now 350px (7 full rows)

urllib.request.FancyURLopener was deprecated since Python 3.3 and is gone
in Python 3.14, so NETcaster no longer opens at all:

  File ".../NETcaster/interface/shoutcast.py", line 55, in <module>
    from urllib.request import FancyURLopener
  ImportError: cannot import name 'FancyURLopener' from 'urllib.request'

Use urlopen() with a timeout instead, so an unreachable server cannot block
the GUI indefinitely. Also open the pickle cache files in binary mode;
pickle needs bytes on Python 3, so the genre/station cache never worked.

Seen on a Dreambox TWO (OpenPLi develop, Python 3.14).

Based on python3 e575a97.
The browser screen was a fixed 560x440 window at 80,73. On a 1920x1080
skin it sat small in the top-left corner, and because the list was 360px
high with 50px rows, the eighth row was cut off at the bottom.

- add a 1200x820 Full HD layout (75px rows, 30/26px fonts, scaled
  buttons), chosen when the desktop is at least 1920 wide
- center both layouts and make the HD list 350px (7 full rows)
- widen the HD row text to the list width and fix valign="left" on the
  metadata label

Seen on a Dreambox TWO with PLi-FullNightHD.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant