\r\n"; Preference::update('myplex_username', -1, $myplex_username, true, true); Preference::update('myplex_authtoken', -1, $myplex_authtoken, true, true); Preference::update('plex_public_port', -1, $plex_public_port, true, true); AmpConfig::set('plex_public_port', $plex_public_port, true); $plex_public_address = Plex_Api::getPublicIp(); Preference::update('plex_public_address', -1, $plex_public_address, true, true); $ret = Plex_Api::registerMyPlex($myplex_authtoken); if ($ret['status'] == '201') { Plex_Api::publishDeviceConnection($myplex_authtoken); $myplex_published = true; echo T_('Server registration completed.') . "
\r\n"; } else { $myplex_published = false; echo "

" . T_('Cannot register the server on myPlex.') . "

"; } Preference::update('myplex_published', -1, $myplex_published, true, true); } else { $myplex_authtoken = ''; $myplex_published = false; echo "

" . T_('Cannot authenticate on myPlex.') . "

"; } } break; case 'unauth_myplex': Plex_Api::unregisterMyPlex($myplex_authtoken); $myplex_username = ''; $myplex_authtoken = ''; $myplex_published = false; Preference::update('myplex_username', -1, $myplex_username, true, true); Preference::update('myplex_authtoken', -1, $myplex_authtoken, true, true); Preference::update('myplex_published', -1, $myplex_published, true, true); break; case 'save': $plex_servername = $_POST['plex_servername']; $plex_local_auth = $_POST['plex_local_auth'] ?: '0'; $plex_match_email = $_POST['plex_match_email'] ?: '0'; Preference::update('plex_servername', -1, $plex_servername, true, true); Preference::update('plex_local_auth', -1, $plex_local_auth, true, true); Preference::update('plex_match_email', -1, $plex_match_email, true, true); break; case 'change_uniqid': Preference::update('plex_uniqid', -1,uniqid(), true, true); echo T_('Server UUID changed.') . "
\r\n"; break; } ?>

Configure your Plex server settings bellow.

Server Settings

>
>

myPlex authentication / server publish

Plex servers should locally listen on port 32400. Current local listing port for your Plex backend is . Ampache applies a small URI `hack` to work with custom port as Plex server, but be aware that this will not work with all clients.

myPlex authentication / server publish




Tools