Skip to content

Commit

Permalink
v1.4.12.41 beta 2
Browse files Browse the repository at this point in the history
  • Loading branch information
sebdelsol committed Mar 15, 2024
1 parent ef7bbc5 commit ec4acaa
Show file tree
Hide file tree
Showing 20 changed files with 91 additions and 53 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,20 @@ _On **old systems** you might need to install [**vc redist**](https://learn.micr

# Settings
Hover your mouse over the ***Sfvip All*** logo:
<kbd><img src="resources/readme/logo_arrow.png"></kbd>
<kbd><img src="resources/readme/arrow.png"></kbd>

To open the settings:
<kbd><img src="resources/readme/settings.png"></kbd>

Logo color & pulse meaning:
# Logo
Color & pulse | Meaning
:--- | :---
<kbd><img src="resources/readme/logo_green.png" width="25"></kbd> <sub>Green slow pulse | <sub>Everything is fine
<kbd><img src="resources/readme/logo_red.png" width="25"></kbd> <sub>Red quick pulse | <sub>_Sfvip All_ needs your attention

# Logs
The logs go **in pairs**: one for each process (***main*** & ***mitmproxy***).
The logs go **in pairs**, one for each process (***main*** & ***mitmproxy***).
You'll find them in the app folder:

<kbd><img src="resources/readme/logs.png"></kbd>

# Build
Expand Down
7 changes: 3 additions & 4 deletions resources/README_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,20 @@ _On **old systems** you might need to install [**vc redist**](https://learn.micr

# Settings
Hover your mouse over the ***{name}*** logo:
<kbd><img src="resources/readme/logo_arrow.png"></kbd>
<kbd><img src="resources/readme/arrow.png"></kbd>

To open the settings:
<kbd><img src="resources/readme/settings.png"></kbd>

Logo color & pulse meaning:
# Logo
Color & pulse | Meaning
:--- | :---
<kbd><img src="resources/readme/logo_green.png" width="25"></kbd> <sub>Green slow pulse | <sub>Everything is fine
<kbd><img src="resources/readme/logo_red.png" width="25"></kbd> <sub>Red quick pulse | <sub>_{name}_ needs your attention

# Logs
The logs go **in pairs**: one for each process (***main*** & ***mitmproxy***).
The logs go **in pairs**, one for each process (***main*** & ***mitmproxy***).
You'll find them in the app folder:

<kbd><img src="resources/readme/logs.png"></kbd>

# Build
Expand Down
Binary file added resources/readme/arrow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed resources/readme/logo_arrow.png
Binary file not shown.
Binary file modified resources/readme/settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 18 additions & 13 deletions src/sfvip/ui/infos.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class _InfoTheme:
bg_interact = "#1F1F1F"
bg_headers = "#242424"
bg_rows = "#2A2A2A"
separator = "#303030"
separator = "#353535"
border = Border(
bg="#808080",
size=1,
Expand Down Expand Up @@ -253,7 +253,7 @@ def _get_epg_prefer_label() -> Style:


def _epg_url_tooltip() -> Style:
return _InfoStyle.app(LOC.EPGUrlTip).grey.no_truncate
return _InfoStyle.app(LOC.EPGUrlTip % ("xml", "xml.gz")).grey.no_truncate


def _epg_libmpv_tooltip() -> Style:
Expand All @@ -265,6 +265,14 @@ def _epg_prefer_tooltip() -> Style:
return _InfoStyle.tooltip(f"{LOC.EPGPrefer}:{msg}")


def _proxy_tooltip(app_info: AppInfo) -> Style:
return _InfoStyle.app(LOC.ProxyTip % app_info.name).grey.no_truncate


def _user_proxy_tooltip() -> Style:
return _InfoStyle.app(LOC.UserProxyTip).grey.no_truncate


def _player_changelog_tooltip() -> Style:
return _InfoStyle.tooltip()

Expand Down Expand Up @@ -326,6 +334,9 @@ def __init__(self, app_info: AppInfo) -> None:
self.separator = tk.Frame(self._frame, bg=_InfoTheme.separator)
self._proxies.set_headers(_get_infos_headers(app_info.name))
self._proxies_button.bind("<Button-1>", self.show_proxies)
# tooltips
set_tooltip(_proxy_tooltip(app_info), self._proxies.headers[2])
set_tooltip(_user_proxy_tooltip(), self._proxies.headers[4])

def show_proxies(self, _) -> None:
proxies_shown = self.config.App.show_proxies = not self.config.App.show_proxies
Expand Down Expand Up @@ -409,19 +420,17 @@ def __init__(self, app_info: AppInfo) -> None:
self._app_update = CheckBox(
frame, bg=_InfoTheme.bg_rows, **_InfoTheme.checkbox, **_get_auto_update().to_tk
)
separator2 = tk.Frame(frame, bg=_InfoTheme.separator)
self._player_version = tk.Label(frame, bg=_InfoTheme.bg_rows, **_get_player_version().to_tk)
self._player_update = CheckBox(
frame, bg=_InfoTheme.bg_rows, **_InfoTheme.checkbox, **_get_auto_update().to_tk
)
self._player_button = Button(frame, **_InfoTheme.button) # type: ignore
separator3 = tk.Frame(frame, bg=_InfoTheme.separator)
self._libmpv_version = tk.Label(frame, bg=_InfoTheme.bg_rows, **_get_libmpv_version().to_tk)
self._libmpv_update = CheckBox(
frame, bg=_InfoTheme.bg_rows, **_InfoTheme.checkbox, **_get_auto_update().to_tk
)
self._libmpv_button = Button(frame, **_InfoTheme.button) # type: ignore
separator4 = tk.Frame(frame, bg=_InfoTheme.separator)
separator2 = tk.Frame(frame, bg=_InfoTheme.separator)
epg_frame = tk.Frame(frame, bg=_InfoTheme.bg_rows)
epg_label = tk.Label(epg_frame, bg=_InfoTheme.bg_rows, **_epg().to_tk)
self._epg_url = tk.Entry(
Expand Down Expand Up @@ -460,7 +469,7 @@ def __init__(self, app_info: AppInfo) -> None:
self._epg_prefer_check = CheckBox(
epg_prefer_frame, bg=_InfoTheme.bg_rows, **_InfoTheme.checkbox, **_get_epg_prefer_update().to_tk
)
separator5 = tk.Frame(frame, bg=_InfoTheme.separator)
separator3 = tk.Frame(frame, bg=_InfoTheme.separator)
# layout
pad = _InfoTheme.pad
button_pad = _InfoTheme.button_pad
Expand All @@ -475,21 +484,17 @@ def __init__(self, app_info: AppInfo) -> None:
self._app_button.grid(row=row, column=2, padx=button_pad, pady=button_pad, sticky=tk.EW)
self._app_button.grid_remove()
row += 1
separator2.grid(row=row, columnspan=3, sticky=tk.EW)
row += 1
self._player_version.grid(row=row, column=0, padx=pad, pady=pad, sticky=tk.W)
self._player_version.grid(row=row, column=0, padx=pad, pady=0, sticky=tk.W)
self._player_update.grid(row=row, column=1, padx=pad, sticky=tk.EW)
self._player_button.grid(row=row, column=2, padx=button_pad, pady=button_pad, sticky=tk.EW)
self._player_button.grid_remove()
row += 1
separator3.grid(row=row, columnspan=3, sticky=tk.EW)
row += 1
self._libmpv_version.grid(row=row, column=0, padx=pad, pady=pad, sticky=tk.W)
self._libmpv_update.grid(row=row, column=1, padx=pad, sticky=tk.EW)
self._libmpv_button.grid(row=row, column=2, padx=button_pad, pady=button_pad, sticky=tk.EW)
self._libmpv_button.grid_remove()
row += 1
separator4.grid(row=row, columnspan=3, sticky=tk.EW)
separator2.grid(row=row, columnspan=3, sticky=tk.EW)
row += 1
epg_frame.grid(row=row, columnspan=3, padx=pad, pady=pad, sticky=tk.NSEW)
epg_label.pack(side=tk.LEFT)
Expand All @@ -506,7 +511,7 @@ def __init__(self, app_info: AppInfo) -> None:
epg_prefer_label.pack(side=tk.LEFT)
self._epg_prefer_check.pack(side=tk.LEFT)
row += 1
separator5.grid(row=row, columnspan=3, sticky=tk.EW)
separator3.grid(row=row, columnspan=3, sticky=tk.EW)
row += 1
super()._layout(row=row)
frame.columnconfigure(2, weight=1)
Expand Down
10 changes: 8 additions & 2 deletions src/sfvip/ui/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ class ListView(tk.Frame):
Note: set_headers should be called before set_rows
"""

# pylint: disable=too-many-arguments
# pylint: disable=too-many-arguments, too-many-instance-attributes
def __init__(
self,
master: tk.BaseWidget,
Expand Down Expand Up @@ -200,6 +200,7 @@ def __init__(
self._bg_separator = bg_separator
self._pad = pad
self._widths = []
self._headers = []

@staticmethod
def _clear(what: tk.BaseWidget) -> None:
Expand All @@ -215,8 +216,13 @@ def set_headers(self, headers: Collection[Style]) -> None:
label = tk.Label(self._frame_headers, bg=self._bg_headers, **text.to_tk)
label.grid(row=0, column=column, ipadx=pad, ipady=pad, sticky=tk.NSEW)
self._widths[column] = max(label.winfo_reqwidth() + pad * 2, self._widths[column])
self._headers.append(label)
self.set_column_widths()

@property
def headers(self) -> list[tk.Label]:
return self._headers

def set_rows(self, rows: Sequence[Collection[Style]]) -> None:
self._clear(self._frame_rows)
pad = self._pad
Expand All @@ -225,7 +231,7 @@ def set_rows(self, rows: Sequence[Collection[Style]]) -> None:
assert len(row_content) == n_column
for column, text in enumerate(row_content):
label = tk.Label(self._frame_rows, bg=self._bg_rows, **text.to_tk)
label.grid(row=row * 2, column=column, ipadx=pad, ipady=pad, sticky=tk.NSEW)
label.grid(row=row * 2, column=column, ipadx=pad, ipady=0, sticky=tk.NSEW)
self._widths[column] = max(label.winfo_reqwidth() + pad * 2, self._widths[column])
# row separator
if row != len(rows) - 1:
Expand Down
6 changes: 4 additions & 2 deletions translations/bulgarian.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
"No": "Не",
"EPGPreferYes": "Да: Първо търсите в EPG на IPTV доставчика. Използвайте външния EPG само когато той не успее.",
"EPGPreferNo": "Не: Търсете първо във външния EPG. Използвайте EPG на доставчика на IPTV само когато той не успее.",
"EPGUrlTip": "Въведете URL адреса на външния EPG, който трябва да завършва с \"xml\" или \"xml.gz\".",
"LibmpvTip": "Libmpv декодира и визуализира аудио и видео. активирайте актуализирането, за да получите последната версия, оптимизирана за вашия компютър."
"EPGUrlTip": "Въведете URL адреса на външния EPG, който трябва да завършва с \"%s\" или \"%s\".",
"LibmpvTip": "Libmpv декодира и визуализира аудио и видео. Активирайте актуализациите, за да получите последната версия, оптимизирана за вашия компютър.",
"ProxyTip": "%s използва локален прокси сървър за прихващане на всички заявки към доставчика на IPTV и инжектиране на категориите 'all' и външния EPG",
"UserProxyTip": "Действително потребителско прокси, ако съществува такова"
}
6 changes: 4 additions & 2 deletions translations/english.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
"No": "No",
"EPGPreferYes": "Yes: Search the IPTV provider EPG first. Use the external EPG only when it fails.",
"EPGPreferNo": "No: Search the external EPG first. Use the IPTV provider EPG only when it fails.",
"EPGUrlTip": "Enter the URL of the external EPG, it should end up with 'xml' or 'xml.gz'",
"LibmpvTip": "Libmpv decodes & renders audio and video.Enable the update to get the last version optimized for your computer."
"EPGUrlTip": "Enter the URL of the external EPG, it should end up with '%s' or '%s'",
"LibmpvTip": "Libmpv decodes & renders audio and video. Enable the updates to get the last version optimized for your computer.",
"ProxyTip": "%s uses a local proxy to intercept all requests to the IPTV provider and inject the 'all' categories and the external EPG",
"UserProxyTip": "Actual user proxy if it exists"
}
10 changes: 6 additions & 4 deletions translations/french.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@
"EPGPrefer": "Chercher d'abord chez le fournisseur IPTV",
"Yes": "Oui",
"No": "Non",
"EPGPreferYes": "Oui : Cherchez d'abord dans l'EPG du fournisseur de télévision par internet. N'utilisez l'EPG externe qu'en cas d'échec.",
"EPGPreferNo": "Non : rechercher d'abord l'EPG externe. Utiliser l'EPG du fournisseur IPTV uniquement en cas d'échec.",
"EPGUrlTip": "Entrez l'URL de l'EPG externe, qui devrait se terminer par 'xml' ou 'xml.gz'.",
"LibmpvTip": "Libmpv décode et rend l'audio et la vidéo. Activez la mise à jour pour obtenir la dernière version optimisée pour votre ordinateur."
"EPGPreferYes": "Oui : Recherchez d'abord dans l'EPG du fournisseur de télévision par internet. N'utilisez l'EPG externe qu'en cas d'échec.",
"EPGPreferNo": "Non : rechercher l'EPG externe en premier. Utiliser l'EPG du fournisseur IPTV uniquement en cas d'échec.",
"EPGUrlTip": "Entrez l'URL de l'EPG externe, qui devrait se terminer par '%s' ou '%s'.",
"LibmpvTip": "Libmpv décode et rend l'audio et la vidéo. Activez les mises à jour pour obtenir la dernière version optimisée pour votre ordinateur.",
"ProxyTip": "%s utilise un proxy local pour intercepter toutes les requêtes adressées au fournisseur IPTV et injecter les catégories 'all' et l'EPG externe.",
"UserProxyTip": "Proxy de l'utilisateur actuel s'il existe"
}
6 changes: 4 additions & 2 deletions translations/german.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
"No": "Nein",
"EPGPreferYes": "Ja: Suchen Sie zuerst im EPG des IPTV-Anbieters. Verwenden Sie den externen EPG nur, wenn er nicht funktioniert.",
"EPGPreferNo": "Nein: Zuerst im externen EPG suchen. Verwenden Sie den EPG des IPTV-Anbieters nur, wenn er nicht funktioniert.",
"EPGUrlTip": "Geben Sie die URL des externen EPGs ein, sie sollte mit 'xml' oder 'xml.gz' enden.",
"LibmpvTip": "Libmpv dekodiert und rendert Audio und Video. Aktivieren Sie das Update, um die letzte für Ihren Computer optimierte Version zu erhalten."
"EPGUrlTip": "Geben Sie die URL des externen EPGs ein, sie sollte mit '%s' oder '%s' enden.",
"LibmpvTip": "Libmpv dekodiert und rendert Audio und Video. Aktivieren Sie die Updates, um die letzte für Ihren Computer optimierte Version zu erhalten.",
"ProxyTip": "%s verwendet einen lokalen Proxy, um alle Anfragen an den IPTV-Anbieter abzufangen und die 'all'-Kategorien und den externen EPG zu injizieren",
"UserProxyTip": "Tatsächlicher Benutzer-Proxy, wenn er existiert"
}
6 changes: 4 additions & 2 deletions translations/greek.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
"No": "Όχι",
"EPGPreferYes": "Ναι: Αναζητήστε πρώτα το EPG του παρόχου IPTV. Χρησιμοποιείτε το εξωτερικό EPG μόνο όταν αυτό αποτυγχάνει.",
"EPGPreferNo": "Όχι: Αναζητήστε πρώτα το εξωτερικό EPG. Χρησιμοποιήστε το EPG του παρόχου IPTV μόνο όταν αυτό αποτύχει.",
"EPGUrlTip": "Εισάγετε τη διεύθυνση URL του εξωτερικού EPG, θα πρέπει να καταλήγει σε 'xml' ή 'xml.gz'.",
"LibmpvTip": "Το Libmpv αποκωδικοποιεί & αποδίδει ήχο και βίντεο. ενεργοποιήστε την ενημέρωση για να λάβετε την τελευταία έκδοση βελτιστοποιημένη για τον υπολογιστή σας."
"EPGUrlTip": "Εισάγετε τη διεύθυνση URL του εξωτερικού EPG, θα πρέπει να καταλήγει σε '%s' ή '%s'.",
"LibmpvTip": "Το Libmpv αποκωδικοποιεί και αποδίδει ήχο και βίντεο. Ενεργοποιήστε τις ενημερώσεις για να λάβετε την τελευταία έκδοση βελτιστοποιημένη για τον υπολογιστή σας.",
"ProxyTip": "Το %s χρησιμοποιεί έναν τοπικό μεσάζοντα για να υποκλέψει όλα τα αιτήματα προς τον πάροχο IPTV και να εισάγει τις κατηγορίες 'all' και το εξωτερικό EPG",
"UserProxyTip": "Πραγματικός μεσολάβησης χρήστη, εάν υπάρχει"
}
8 changes: 5 additions & 3 deletions translations/italian.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@
"EPGPrefer": "Cercare prima il provider IPTV",
"Yes": "Si",
"No": "No",
"EPGPreferYes": "Sì: cercate prima l'EPG del provider IPTV. Utilizzare l'EPG esterno solo in caso di errore.",
"EPGPreferYes": "Sì: cerca prima l'EPG del provider IPTV. Utilizzare l'EPG esterno solo in caso di errore.",
"EPGPreferNo": "No: Cerca prima l'EPG esterno. Utilizzare l'EPG del provider IPTV solo in caso di errore.",
"EPGUrlTip": "Inserite l'URL dell'EPG esterno, che dovrebbe finire con 'xml' o 'xml.gz'.",
"LibmpvTip": "Libmpv decodifica e rende audio e video. Attivare l'aggiornamento per ottenere l'ultima versione ottimizzata per il proprio computer."
"EPGUrlTip": "Immettere l'URL dell'EPG esterno, che dovrebbe finire con '%s' o '%s'.",
"LibmpvTip": "Libmpv decodifica e rende audio e video. Attivare gli aggiornamenti per ottenere l'ultima versione ottimizzata per il proprio computer.",
"ProxyTip": "%s utilizza un proxy locale per intercettare tutte le richieste al provider IPTV e iniettare le categorie 'all' e l'EPG esterno.",
"UserProxyTip": "Proxy utente effettivo, se esiste"
}
11 changes: 8 additions & 3 deletions translations/loc/texts.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,16 @@ class Texts:
No: str = "No"
EPGPreferYes: str = "Yes: Search the IPTV provider EPG first. Use the external EPG only when it fails."
EPGPreferNo: str = "No: Search the external EPG first. Use the IPTV provider EPG only when it fails."
EPGUrlTip: str = "Enter the URL of the external EPG, it should end up with 'xml' or 'xml.gz'"
EPGUrlTip: str = "Enter the URL of the external EPG, it should end up with '%s' or '%s'"
LibmpvTip: str = (
"Libmpv decodes & renders audio and video."
"Enable the update to get the last version optimized for your computer."
"Libmpv decodes & renders audio and video. "
"Enable the updates to get the last version optimized for your computer."
)
ProxyTip: str = (
"%s uses a local proxy to intercept all requests to the IPTV provider "
"and inject the 'all' categories and the external EPG"
)
UserProxyTip: str = "Actual user proxy if it exists"

def as_dict(self) -> dict[str, str]:
return dataclasses.asdict(self)
6 changes: 4 additions & 2 deletions translations/polish.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
"No": "Nie",
"EPGPreferYes": "Tak: Najpierw należy przeszukać EPG dostawcy IPTV. Używaj zewnętrznego EPG tylko wtedy, gdy zawiedzie.",
"EPGPreferNo": "Nie: Najpierw należy przeszukać zewnętrzne EPG. Użyj EPG dostawcy IPTV tylko w przypadku niepowodzenia.",
"EPGUrlTip": "Wprowadź adres URL zewnętrznego EPG, powinien on kończyć się na \"xml\" lub \"xml.gz\".",
"LibmpvTip": "Libmpv dekoduje i renderuje audio i wideo. Włącz aktualizację, aby uzyskać ostatnią wersję zoptymalizowaną dla twojego komputera."
"EPGUrlTip": "Wprowadź adres URL zewnętrznego EPG, powinien on kończyć się na \"%s\" lub \"%s\".",
"LibmpvTip": "Libmpv dekoduje i renderuje audio i wideo. Włącz aktualizacje, aby uzyskać ostatnią wersję zoptymalizowaną dla twojego komputera.",
"ProxyTip": "%s używa lokalnego proxy do przechwytywania wszystkich żądań do dostawcy IPTV i wstrzykiwania kategorii \"all\" i zewnętrznego EPG.",
"UserProxyTip": "Rzeczywiste proxy użytkownika, jeśli istnieje"
}
Loading

0 comments on commit ec4acaa

Please sign in to comment.