Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
from cryptography.fernet import Fernet
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC
import yaml

# Before load_dotenv()
if not os.path.exists('.env') and os.path.exists('empty.env'):
Expand All @@ -59,8 +60,13 @@ def is_running_in_docker():
# Check for Docker environment variables
return any(var in os.environ for var in ['DOCKER_CONTAINER', 'KUBERNETES_SERVICE_HOST'])

def load_locale(lang="en"):
path = os.path.join("locales", f"{lang}.yaml")
with open(path, encoding="utf-8") as f:
return yaml.safe_load(f)

# Application configuration
APP_PORT = 10000
APP_PORT = 10010

def get_app_url():
"""Determine the correct URL to open in browser"""
Expand Down Expand Up @@ -656,7 +662,13 @@ def create_abs_user(username, password, user_type="user", permissions=None):
def onboarding():
if not session.get("authenticated"):
return redirect(url_for("login"))

lang = request.args.get("lang") or session.get("lang", "en")
session["lang"] = lang

# 2. Carica il file YAML della lingua scelta
t = load_locale(lang)

submitted = False
library_notes = load_library_notes()
selected_ids = os.getenv("LIBRARY_IDS", "").split(",") if os.getenv("LIBRARY_IDS") else []
Expand Down Expand Up @@ -813,7 +825,9 @@ def onboarding():
poster_imdb_ids=poster_imdb_ids,
default_library=default_library_name,
has_music_library=has_music_library,
services=services
services=services,
t=t,
lang=lang
)

@app.route("/audiobookshelf", methods=["GET", "POST"])
Expand Down
99 changes: 99 additions & 0 deletions locales/en.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
onboarding:
title: Welcome to Plex!
intro_pre_link: Plex Media Server (or just
intro_link_text: Plex
intro_post_link: ) lets me share my collection of movies and shows with you, just like Netflix, but you don't have to pay. You can watch on your TV, computer, phone, or tablet!
lib_random: 🎲 Random All
lib_pre_link: Random selection of posters from each library. Go
lib_link_text: here
lib_post_link: for the full list.
zoom: Click to enlarge (Zoom on mobile)
quick_access:
title: Quick Access
plex: Media
audiobookshelf: Books
tautulli: Stats
overseerr: Request
section_1:
title: "1. Get Access"
text_1: "To get started, enter your email below and select what you want access to. Let me know when you're done, and you'll recieve an email or invite link."
text_2: "Note: Please don't share the account you create with others. If you know someone who you think would enjoy having access, let me know. In most cases I'll be happy to add them with their own account."
email_placeholder: Enter email for Plex
audio_cat: If you picked any audio category, check out Plex's audio app for phones and tablets, Plexamp. You can find a link in "Logging In" below.
submit_button: Submit
disclaimer: ⚠️ Content Disclaimer
disclaimer_text: Some content in this media library may not be suitable for all ages. The server owner is not responsible for the content available through this service. Users are responsible for their own viewing choices and should exercise appropriate discretion.
request_submitted: Thanks! Your request has been submitted.
section_2:
title: "2. Logging In"
text_1: Once you get the invite, go ahead and make a Plex account, and download the app on your device.
comp_device_link: Here
post_link: is a link to a list of compatible devices with download links.
pre_web_link: You can also access it via web browser on desktop at
web_link: app.plex.tv
post_web_link: to try it out, but I'd prefer if you use the standalone Windows or Mac app
section_3:
title: "3. First Time Setup"
text_1: While Plex is generally easy to use, there are some important settings to change the first time you use it.
text_2: First is the removal of Live TV content provided by Plex. This content has ads and clutters the home page on some devices.
text_3: To change this setting, use the web or desktop app versions of Plex.
text_4: Go to "Online Media Sources"
text_5: Disable Live TV, Movies & Shows, and Other Streaming Availability. The others can stay as-is.
text_6: You can poke around in the account settings and change things in the other tabs too.
pre_guide_link: Next is to increase streaming quality. Check out
guide_link: this
post_guide_link: handy guide for getting the best quality stream.
text_7: "If you don't want to read all that, here's the general flow (must be done on every device):"
text_8: Open Plex settings
text_9: Find Video or Quality settings
text_10: Disable any Automatic adjustments
text_11: Change streaming quality to Maximum
text_12: Enable Direct Play/Direct Stream
text_13: "Note: If you're a nerd and want the best possible Plex experience on your TV, I reccomend one of these:"
text_14: "Nvidia Shield Pro (2019) – plays nearly everything flawlessly, best overall."
text_15: "Apple TV 4K (3rd Gen) – nearly as good, faster UI, only lacks full TRUEHD passthrough."
text_16: "FireTV Cube (3rd Gen) – smooth UI, but has DTS playback issues."
text_17: Not required unless you notice problems on your current TV device or want the best playback quality.
section_4:
title: "4. Pinning/Favoriting Libraries"
desktop_title: Desktop
desktop_text_1: Once those settings have been changed, click the home button in the top left (on desktop) and you'll be taken to the page where all the magic happens.
desktop_text_2: Click "More" at the bottom.
desktop_text_3: Unpin Playlists, Live TV, Movies & Shows, and Rentals. Make sure my sections at the top are pinned.
mobile_title: "Mobile/Tablet"
mobile_text_1: Press and hold "Libraries", go to the all libraries menu, and favorite everything there.
mobile_text_2: And you're all set! Browse through my libraries, check out my movie collections (separate tab in Movies library), or put on a comfort show and go to sleep. If you ever want a show or movie that I don't have, see "Requests" below.
section_5:
title: 5. Requests
watchlist_title: Plex Watchlist Requests
watchlist_text_1: Through some technomancy, requesting movies and shows you want is pretty easy.
watchlist_text_2: We have to be "friends" on Plex (different than adding you to my server) for this feature to work so tell me to do that first before you request anything.
watchlist_text_3: "Note: This feature does not work for new movies currently in theaters. Anything older or already on streaming services should be available."
watchlist_text_4: Go to the search bar or search menu
watchlist_text_5: Enable "More Ways to Watch" if not already enabled
watchlist_text_6: Search for the media you want
watchlist_text_7: Click the "Add to watchlist" icon
watchlist_text_8: Desktop Example
watchlist_text_9: Movies should show up in less than 30 minutes. Shows can take longer. The first season will show up to start, and others as you watch. If it's a show that's airing now and you want a more recent season, let me know.
watchlist_text_10: Be nice to my hard drives, don't request too much!
notifications_title: Notifications
notifications_text_1: If I added you as a friend, you can receive notifications on phones and tablets when your Watchlisted media is available. For shows, this only applies when it is added for the first time.
notifications_text_2: For per-episode notifications about currently airing shows, ask me about my Discord.
notifications_text_3: Make sure notifications are enabled for Plex on your phone (Settings app)
notifications_text_4: Go to settings in Plex > Notifications
notifications_text_5: Turn off anything you'd like in Plex News, Friends, Discover, Live TV
notifications_text_6: Scroll down to Personal Media > New Content Added to Library
notifications_text_7: Set the toggles to how they look below (all off except for top one)
overseerr_title: Overseerr Requests
overseerr_text_1: "You can request movies and shows directly using Overseerr. Click the link below to open the request page:"
overseerr_link: Open Overseerr
overseerr_text_2: Requests made here will be sent to the admin for approval and processing.
section_issue:
title: Issue
issue_overseerr_enabled_num: "6"
issue_overseerr_disabled_num: "5"
issue_text_1: If you have issues playing a specific piece of media, or it has bad subs, you can report it through Plex or just tell me.
section_end:
title: The End
end_overseerr_enabled_num: "7"
end_overseerr_disabled_num: "6"
99 changes: 99 additions & 0 deletions locales/it.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
onboarding:
title: Benvenuto su Plex!
intro_pre_link: Plex Media Server (o solo
intro_link_text: Plex
intro_post_link: ) mi permette di condividere con voi la mia collezione di film e serie tv, proprio come netflix ma gratuitamente. Puoi guardalo sulla TV, sul computer, sul telefono o sul tablet!
lib_random: 🎲 Casuale
lib_pre_link: Selezione casuale di poster da ogni libreria. Vai
lib_link_text: qua
lib_post_link: per la lista completa.
zoom: Premi l'immagine per ingrandire (Zoom con il telefono)
quick_access:
title: Accesso rapido
plex: Media
audiobookshelf: Libri
tautulli: Statistiche
overseerr: Richieste
section_1:
title: "1. Ottieni l'Accesso"
text_1: "Per iniziare, inserisci la tua mail qui sotto e seleziona le librerie a cui desidere accedere. Fammi sapere quando hai finito e riceverai un'e-mail o un link di invito."
text_2: "Nota: Si prega di non condividere il proprio account con altri. Se conosci qualcuno che pensi avrebbe piacere ad avere accesso, fammelo sapere. Nella maggior parte dei casi sarei felice di aggiungerli con il loro account."
email_placeholder: Inserisci una mail per Plex
audio_cat: Se hai selezionato una categoria audio, dai un'occhiata a Plexamp, l'app musicale di Plex per smartphone e tablet. Trovi il link nella sezione "Accesso" qui sotto.
submit_button: Invia
disclaimer: ⚠️ Avvertenza sui contenuti
disclaimer_text: Alcuni contenuti presenti in questa libreria multimediale potrebbero non essere adatti a tutte le età. Il proprietario del server non è responsabile per i contenuti accessibili tramite questo servizio. Gli utenti sono responsabili delle proprie scelte di visione e dovrebbero usare la dovuta discrezione.
request_submitted: Grazie! La tua richiesta è stata inviata.
section_2:
title: "2. Accedere"
text_1: Una volta ricevuto l'invito, vai avanti e crea un account Plex e scarica l'applicazione sui tuoi device.
comp_device_link: Questo
post_link: è un link a una lista dei dispositivi compatibili con i link per il download dell'applicazione.
pre_web_link: Puoi anche accedere tramite browser web al link
web_link: app.plex.tv
post_web_link: Per provarlo, ma preferirei se usassi l'applicazione.
section_3:
title: "3. Configurazione iniziale"
text_1: Plex generalmente è facile da usare, ma ci sono alcune importanti impostazioni da modificare la prima volta che lo usi.
text_2: Per prima cosa la rimozione dei contenuti Live TV forniti da Plex. Questo contenuto contiene pubblicità e ingombra la home page su alcuni dispositivi.
text_3: Per modificare questa impostazione, usa l'app web o desktop di Plex.
text_4: Vai su "Risorse multimediali online" ("Online Media Sources")
text_5: Disattiva "Live TV", "Movies & Shows", e "Mostra Disponibilità dagli altri servizi di Streaming nelle pagine dei dettagli". Il resto può rimanere così com'è.
text_6: Puoi curiosare nelle impostazioni dell'account e applicare modifiche anche nelle altre schede.
pre_guide_link: il prossimo passo è aumentare la qualità dello streaming. Dai un'occhiata a
guide_link: questa
post_guide_link: utile guida per ottenere la miglior qualità dello streaming.
text_7: "Se non vuoi leggere l'intera guida, ecco una procedura generale da seguire (deve essere fatta per ogni dispositivo):"
text_8: Apri le impostazioni di Plex
text_9: Trova le impostazioni Video/Qualità (Video/Quality settings)
text_10: Disattiva tutte le regolazioni automatiche
text_11: Modifica la qualità dello streaming a Massimo (Maximum)
text_12: Abilità Riproduzione Dirette e Streaming Diretto (Direct Play/Direct Stream)
text_13: "Nota: Se sei un nerd e vuoi la migliore esperienza Plex possibile sulla tua TV, ti consiglio uno di questi dispositivi:"
text_14: "Nvidia Shield Pro (2019) – riproduce quasi tutto senza problemi, la migliore in assoluto."
text_15: "Apple TV 4K (3ª generazione) – quasi altrettanto valida, interfaccia veloce, manca solo il passthrough completo del TRUEHD."
text_16: "FireTV Cube (3ª generazione) – interfaccia fluida, ma ha problemi con la riproduzione dei DTS."
text_17: Non è necessario cambiarlo, a meno che non noti problemi sul dispositivo TV attuale o desideri la massima qualità di riproduzione.
section_4:
title: "4. Pinnare le Librerie"
desktop_title: Desktop
desktop_text_1: Una volta modificate queste impostazioni, clicca sul pulsante Home in alto a sinistra (su desktop) e verrai portato alla pagina dove avviene tutta la magia.
desktop_text_2: Clicca su "Altro" ("More") in fondo.
desktop_text_3: Sblocca (Unpin) "Playlists", "Live TV", "Movies & Shows", and "Rentals". Controlla che le mie librerie in altro a sinistra siano fissate in alto.
mobile_title: "Mobile/Tablet"
mobile_text_1: Tieni premuto su "Elenco Librerie" ("Libraries"), premi su "Vedi tutte le librerie" ("See all libraries") e poi clicca sul cuore per ogni libreria così da metterla nei preferiti.
mobile_text_2: E il gioco è fatto! Esplora le mie librerie, dai un’occhiata alle collezioni di film (scheda separata nella libreria Film), oppure metti su una serie rilassante e vai a dormire. Se vuoi vedere una serie o un film che non ho, guarda la sezione “Richieste” qui sotto.
section_5:
title: 5. Richieste
watchlist_title: Richieste tramite Watchlist di Plex
watchlist_text_1: Tramite un pizzico di tecnomanzia, richiedere film e serie è piuttosto semplice.
watchlist_text_2: Dobbiamo essere "amici" su Plex (è diverso dall’essere aggiunti al mio server) affinché questa funzione funzioni, quindi dimmelo prima di fare richieste.
watchlist_text_3: "Nota: questa funzione non funziona per i film attualmente al cinema. Qualsiasi contenuto più vecchio o già disponibile in streaming dovrebbe funzionare."
watchlist_text_4: Vai nella barra o nel menu di ricerca
watchlist_text_5: Abilita “Altri modi per guardare” se non è già attivo
watchlist_text_6: Cerca il contenuto che desideri
watchlist_text_7: Clicca sull’icona “Aggiungi alla lista da Guardare”
watchlist_text_8: Esempio su desktop
watchlist_text_9: I film dovrebbero comparire in meno di 30 minuti. Le serie possono richiedere più tempo. Verrà aggiunta la prima stagione per iniziare, e le successive mentre guardi. Se si tratta di una serie attualmente in onda e vuoi una stagione più recente, fammelo sapere.
watchlist_text_10: Sii gentile con i miei hard disk, non fare troppe richieste!
notifications_title: Notifiche
notifications_text_1: Se ti ho aggiunto come amico, puoi ricevere notifiche su telefono o tablet quando un contenuto richiesto tramite Watchlist è disponibile. Per le serie, questo vale solo al primo inserimento.
notifications_text_2: Per notifiche episodio-per-episodio sulle serie in corso, chiedimi del mio Discord.
notifications_text_3: Assicurati che le notifiche siano attivate per Plex sul tuo telefono (tramite l’app Impostazioni)
notifications_text_4: "Vai su Impostazioni in Plex > Notifiche"
notifications_text_5: Disattiva tutto ciò che vuoi in Plex News, Amici, Discover, Live TV
notifications_text_6: "Scorri fino a Media Personali > Nuovi contenuti aggiunti alla libreria"
notifications_text_7: Imposta gli interruttori come nell’immagine sotto (tutti disattivati tranne il primo in alto)
overseerr_title: Richieste tramite Overseerr
overseerr_text_1: "Puoi richiedere film e serie direttamente tramite Overseerr. Clicca sul link qui sotto per aprire la pagina delle richieste:"
overseerr_link: "Apri Overseerr"
overseerr_text_2: Le richieste fatte qui verranno inviate all’amministratore per l’approvazione e l’elaborazione.
section_issue:
title: Problemi
issue_overseerr_enabled_num: "6"
issue_overseerr_disabled_num: "5"
issue_text_1: Se hai problemi con la riproduzione di un contenuto specifico o i sottotitoli sono errati, puoi segnalarlo tramite Plex oppure semplicemente farmelo sapere.
section_end:
title: Conclusione
end_overseerr_enabled_num: "7"
end_overseerr_disabled_num: "6"
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ python-dotenv>=0.19
psutil>=5.8
Pillow>=9.0
plexapi>=4.15
cryptography>=3.4
cryptography>=3.4
PyYAML
Loading