Skip to content

Update default language for library add #1416

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

Merged
Merged
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
4 changes: 2 additions & 2 deletions plexapi/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,15 +226,15 @@ def deleteMediaPreviews(self):
section.deleteMediaPreviews()
return self

def add(self, name='', type='', agent='', scanner='', location='', language='en', *args, **kwargs):
def add(self, name='', type='', agent='', scanner='', location='', language='en-US', *args, **kwargs):
""" Simplified add for the most common options.

Parameters:
name (str): Name of the library
agent (str): Example com.plexapp.agents.imdb
type (str): movie, show, # check me
location (str or list): /path/to/files, ["/path/to/files", "/path/to/morefiles"]
language (str): Two letter language fx en
language (str): Four letter language code (e.g. en-US)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Legacy agents use "two letters" code. New agents use "four letters" code.

kwargs (dict): Advanced options should be passed as a dict. where the id is the key.

**Photo Preferences**
Expand Down
1 change: 1 addition & 0 deletions tools/plex-bootstraptest.py
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,7 @@ def alert_callback(data):
location="/data/Photos" if opts.no_docker is False else photos_path,
agent="com.plexapp.agents.none",
scanner="Plex Photo Scanner",
language="en",
expected_media_count=has_photos,
)
)
Expand Down