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

New device notification #774

Closed
gitthangbaby opened this issue Feb 2, 2022 · 9 comments
Closed

New device notification #774

gitthangbaby opened this issue Feb 2, 2022 · 9 comments

Comments

@gitthangbaby
Copy link

gitthangbaby commented Feb 2, 2022

The problem

the script triggers "New device" Plex notification on every run:

New Device

_User_ used a new device to access _Server_: _Server_ (PlexTraktSync)

Error trace

-

Expected behavior

Identify as the same client each time

Steps to reproduce the behavior

Run the configured script

Inspect of problematic items

No response

Workarounds

add plexapi.BASE_HEADERS['X-Plex-Client-Identifier'] = "PlexTraktSync" recommended by Plex employee - that made the notification diseappear

Install method

pip

Version

0.18

Python Version

3.7

Operating System and Version

Linux

@gitthangbaby
Copy link
Author

gitthangbaby commented Feb 2, 2022

Related to #168, #200, pkkid/python-plexapi#620,706.
i've changed the workaround to have the constant string there, not sure why platform is used in config.py (it didn't fix #476).

@glensc
Copy link
Collaborator

glensc commented Feb 2, 2022

the script triggers "New device" Plex notification on every run:

where is that? screenshot? version of plex?

@glensc
Copy link
Collaborator

glensc commented Feb 2, 2022

what are those related issues/pull requests? I see no relation to this at all. where or how or why you took those arbitrary items to be listed here?

@gitthangbaby
Copy link
Author

The notification arrives on the users' mobile phone from Plex company whenever new client identifier is used for any access with the same token.

Re mentions: it looks like headers could impact history or cause duplicit processing. 706 is from plexapi (edited above).
Couldn't figure out why all of these header changes exist, especially 168, but seems important to the project so i mention it in case there's a will to change this header as well. This X-Plex-Client-Identifier header record stabilization stops sending endless notification to Plex users on all Plex projects using python-plexapi. As i look at 620 (edited above), it might be python-plexapi issue in the end.

@glensc
Copy link
Collaborator

glensc commented Feb 2, 2022

706 is still unclear what, use urls to be crystal clear. and if you out URLs to own line with preceding dash (list item), github includes title for them.

The only change this project does is to use an identifiable device:

so, in the future (still nothing implemented) are able to determine that the watch record was filled b this app, not the actual player.

if anything, it should have made changes better, not worse.

ps: maybe you want to link to commits or code lines instead of the tickets?

@glensc
Copy link
Collaborator

glensc commented Feb 6, 2022

Can you send pull request with a fix?

@gitthangbaby
Copy link
Author

this should be fixed in plexapi i think, plexapi/init.py uses randomizer per session:
X_PLEX_IDENTIFIER = CONFIG.get('header.identifier', str(hex(getnode())))

here : uuid.getnode will return the same value for every call wthinin a single run of your app. If it has to defer to the random algorithm, then you will get a different value when you start a new instance of your app.

@glensc
Copy link
Collaborator

glensc commented Feb 6, 2022

You can get link to specificv line if you click on the line number:

image

and holding down shift when clicking, you can select range of lines.

@glensc
Copy link
Collaborator

glensc commented Mar 3, 2022

Send a pull request for improvement if this is an issue.

@glensc glensc closed this as completed Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants