Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plex host setting not saved #5737

Closed
Olivier6767 opened this issue Nov 18, 2018 · 12 comments
Closed

Plex host setting not saved #5737

Olivier6767 opened this issue Nov 18, 2018 · 12 comments
Assignees
Milestone

Comments

@Olivier6767
Copy link

Olivier6767 commented Nov 18, 2018

Hello,
In release 0.2.12, the host setting for plex was lost.
When trying to set ti again, it gets lost during save and the following warning is logged :

2018-11-18 10:27:26 WARNING  APIv2-Thread_16 :: [a1d899b] Config patch ignored {u'notifiers': {u'plex': {u'client': {u'host': u'10.1.1.83:32400', u'password': u''}}}}

Even when modifying the config file manually, the following error is logged when a plex notification is triggered :

2018-11-18 10:25:43 WARNING  POSTPROCESSOR :: [a1d899b] PLEX: Error while trying to contact Plex Media Server: Error: MaxRetryError("HTTPConnectionPool(host='**********', port=80): Max retries exceeded with url: /library/sections (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fa3084863d0>: Failed to establish a new connection: [Errno 22] Invalid argument',))",)
@triage-new-issues triage-new-issues bot added the triage Untriaged issue label Nov 18, 2018
@OmgImAlexis
Copy link
Collaborator

@p0psicles this should be sent as an array since we have it set as a ListField in the API.

'notifiers.plex.client.host': ListField(app, 'PLEX_CLIENT_HOST'),

@triage-new-issues triage-new-issues bot removed the triage Untriaged issue label Nov 18, 2018
@OmgImAlexis OmgImAlexis added this to the 0.2.13 milestone Nov 18, 2018
@p0psicles
Copy link
Contributor

p0psicles commented Nov 19, 2018

@OmgImAlexis it's also passed as an array. The only thing that could be wrong here, is when it's already a string, and you try to resave that.

@Olivier6767 Did you try to empty the field, and add it again?
image

The code:

<config-template label-for="plex_client_host" label="Plex Home Theater IP:Port">
                                        <select-list name="plex_client_host" id="plex_client_host" :list-items="notifiers.plex.client.host" @change="notifiers.plex.client.host = $event.map(x => x.value)"></select-list>
                                        <p>one or more hosts running Plex Home Theater<br>(eg. 192.168.1.100:3000, 192.168.1.101:3000)</p>
                                    </config-template>

See, the $event.map.. should always result in an array.

@Olivier6767
Copy link
Author

@p0psicles Yes the field is totally empty. Whatever I type in is not saved to the config file, even though I get the Saved Notifiiers config popup.
When I change to another page and come back to the Plex notifications screen, the setting is blank again.

However please note that the issue is on the PLEX Media Server settings, not the Plex Home Theater shown in your screenshot.

@p0psicles
Copy link
Contributor

The log states the client, not server
{u'plex': {u'client': {u'host': u'10.1.1.83:32400', u'password': u''}}}}

@p0psicles
Copy link
Contributor

p0psicles commented Nov 19, 2018

I'm having a real hard time reproducing this.
This is what it looks like in my config.ini, after chaging it:

plex_server_host = 192.168.1.2:32400, 192.168.1.3:32400
plex_server_token = ""
plex_client_host = ,

image

@Olivier6767
Copy link
Author

I stopped Medusa, deleted all entries in the PLEX section off the config file and restarted.
I then entered the settings as shown below.
You can also see that mopst settings are not written to the config file, expect the password which is put into the field : plex_server_host....
This stopped working with the last upgrade.

[Plex] use_plex_server = 1 plex_notify_onsnatch = 0 plex_notify_ondownload = 0 plex_notify_onsubtitledownload = 0 plex_update_library = 1 plex_server_host = pass plex_server_token = "" plex_client_host = , plex_server_username = "" plex_server_password = "" use_plex_client = 0 plex_client_username = "" plex_client_password = "" plex_server_https = 0

image

As a side note, I just notices that the text on the Plex MEdia Server settings page mentions : Send KODI commands? It should say PLEX commands.

@p0psicles
Copy link
Contributor

Is the config.ini the result of the settings you changed in the gui? Or did you change them manually in config.ini.?

Also can you enable debug logging, restart. And save settings in gui. Send me debug logs since startup and the console logs from chrome?

I cant reproduce this at all. Maybe try doing a git reset --hard origin/master?

@Olivier6767
Copy link
Author

Yes the config.ini was the result of the changes in the gui, no manual change in the file.

I just did a git reset --hard origin/master and a git pull. I then cleaned up the config file section before starting this trace.

Here is the config file section before:

[Plex]
use_plex_server = 0
plex_notify_onsnatch = 0
plex_notify_ondownload = 0
plex_notify_onsubtitledownload = 0
plex_update_library = 0
plex_server_host = ,
plex_server_token = ""
plex_client_host = ,
plex_server_username = ""
plex_server_password = ""
use_plex_client = 0
plex_client_username = ""
plex_client_password = ""
plex_server_https = 0

Here are the settings:
image

Here is the config file after:

[Plex]
use_plex_server = 1
plex_notify_onsnatch = 0
plex_notify_ondownload = 0
plex_notify_onsubtitledownload = 0
plex_update_library = 1
plex_server_host = pass
plex_server_token = ""
plex_client_host = ,
plex_server_username = ""
plex_server_password = ""
use_plex_client = 0
plex_client_username = ""
plex_client_password = ""
plex_server_https = 0

Here is the debug information:
debug.log

Here is the Chrome console log
medusa.olisab.com-1542645675414.log

Thanks!

@p0psicles
Copy link
Contributor

@OmgImAlexis can you reproduce this?

@OmgImAlexis
Copy link
Collaborator

I used the same before config.

I ended up with this.

[Plex]
use_plex_server = 1
plex_notify_onsnatch = 0
plex_notify_ondownload = 0
plex_notify_onsubtitledownload = 0
plex_update_library = 1
plex_server_host = pass
plex_server_token = ""
plex_client_host = ,
plex_server_username = ""
plex_server_password = ""
use_plex_client = 0
plex_client_username = ""
plex_client_password = ""
plex_server_https = 0

@OmgImAlexis
Copy link
Collaborator

Just rebuilding incase I was on another branch still.

@OmgImAlexis
Copy link
Collaborator

Okay, tried with a fresh install. This is what we're sending the server from that form. So it does look like it's an API issue.

{
  "updateLibrary": true,
  "host": [
    "10.1.1.83:32400"
  ],
  "enabled": true,
  "https": false,
  "token": "ABCDEFG",
  "username": "user",
  "password": "pass"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants