====== Plex Media Server ======
===== Installation sur Debian =====
Pour une Debian basée sur ''systemd'', le paquet ''.deb'' pour Ubuntu disponible via le site officiel, à l’adresse [[https://www.plex.tv/media-server-downloads/#plex-media-server]] marchera très bien.
\\
\\
Pour une Debian basée sur ''sysvinit'', vous pouvez prendre le paquet custom via [[https://drive.google.com/drive/folders/1T0_iDHHbZ124GsYkFiVtNsPAzIMOPval]].
===== Docker =====
Voir : [[https://hub.docker.com/r/linuxserver/plex/]]
==== Première connexion à un serveur distant ====
Plex de base n'autorise que des connexions par le réseau local. Pour le configurer pour la première fois, il faudra peut-être forcer et se faire relayer :
ssh my-user@plex-server -L 8080:localhost:32400
Il suffit ensuite d'ouvrir la page locale ''http://localhost:8888/web''.
=== Via PuTTY ===
* Aller dans le menu ''Connection > SSH > Tunnels'',
* Dans "Source port" rentrer : ''8080'',
* Dans ''Destination'' rentrer : ''localhost:32400''
* Valider en appuyant sur ''Add''.
===== Forward Apache et Nginx =====
Pour Apache, on aura une configuration du style :
ServerName plex.domain.tld
Order deny,allow
Allow from all
ProxyRequests Off
ProxyPreserveHost On
ProxyPass / http://plex-server:32400/
ProxyPassReverse / http://plex-server:32400/
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/web
RewriteCond %{HTTP:X-Plex-Device} ^$
RewriteRule ^/$ /web/$1 [R,L]
Et pour Nginx :
server {
listen 443 ssl;
listen [::]:443 ssl;
ssl_certificate /etc/letsencrypt/live/plex.domain.tld/cert.pem;
ssl_certificate_key /etc/letsencrypt/live/plex.domain.tld/privkey.pem;
index index.html;
access_log /var/log/nginx/plex.domain.tld.access.log;
error_log /var/log/nginx/plex.domain.tld.error.log;
large_client_header_buffers 4 8k;
location / {
proxy_set_header X-Forwarded-By $server_addr:$server_port;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_buffering off;
proxy_pass http://plex-server:32400;
}
===== Sélections d'addons =====
Voir la page dédiée aux addons Plex : [[applications:plex:addons|Addons Plex]]
===== Gestion des animes avec Plex =====
Un guide complet est disponible [[https://damir.tech/plex-anime-setup/|ici]], basé sur le [[https://www.reddit.com/r/PleX/comments/2yk49z/guide_plex_and_anime_a_guide_to_combining_movies/|post original sur Reddit]].
\\
\\
Pour le suivi d'épisodes (''scrobbling'') :
* [[https://github.com/trakt/Plex-Trakt-Scrobbler|Plex Trakt Scrobbler]] pour actualiser Trakt.tv par Plex,
* Pour bridget le suivi des épisodes entre Trakt.tv et MAL : [[https://txm.huere.net/import/]],
* L'inverse, mais hors-service pour l'instant à cause de l'API MAL indisponible : [[https://txm.huere.net/]].
Plus d'informations sur le [[https://www.reddit.com/r/PleX/search?q=anime&restrict_sr=on|Reddit dédié à Plex]].
===== Forums dédiés à la Shield =====
Voir : [[https://forums.plex.tv/categories/nvidia-shield]]
===== Bridges InfluxDB =====
* [[https://github.com/barrycarey/Plex-Data-Collector-For-InfluxDB|Collects data about your Plex server and sends it to InfluxDB]]
* [[https://github.com/mvantassel/plexpy2influx|Pipe select PlexPy metrics to InfluxDB so it can be graphed in Grafana]]
* [[https://github.com/Drewster727/tautulli-influxdb-export|Export Tautulli (formerly PlexPy) stats to InfluxDB]]
* [[https://github.com/calvinx408/plexpyInflux|Query data from plexPy and store in InfluxDB for use with Grafana]]
===== DVR =====
Périphériques compatibles : [[https://support.plex.tv/articles/225877427-supported-dvr-tuners-and-antennas/]]
===== Jouer avec l'API de Plex =====
Voir : [[https://support.plex.tv/articles/201638786-plex-media-server-url-commands/]] pour débuter.
\\
\\
Récupérer token API : [[https://support.plex.tv/articles/204059436-finding-an-authentication-token-x-plex-token/]]