Comments (2)
... so defining a path for the config, better: even the ability to override the config would help :)
from python-plexapi.
The config file is just a convenient way to default a few settings. Everything the config file sets is easily accessible and able to be over-ridden in the plexapi.init file. For example, you can set the default timeout by just setting plexapi.TIMEOUT
to some other value.
import plexapi
plexapi.TIMEOUT = 30
plexapi.X_PLEX_PLATFORM = 'my awesome app'
...continue...
PlexAPI is using the standard logging module. So you can easily set the log settings as you normally would in other Python projects even without the config file.
import logging
from logging.handlers import RotatingFileHandler
plexlog = logging.getLogger('plexapi')
loghandler = RotatingFileHandler('/tmp/plexlog.log', 'a', 512000, 3)
plexlog.addHandler(loghandler)
...continue...
I just committed a small change that allows you to call a convenience function to reset the BASE_HEADERS if you want to change some of the X_PLEX header information. So you do something like this.
import plexapi
plexapi.X_PLEX_DEVICE = 'My Awesome Windows Box'
plexapi.BASE_HEADERS = plexapi.reset_base_headers()
...continue...
commit c76c69c
Author: Michael Shepanski [email protected]
Date: Tue Mar 15 23:47:13 2016 -0400
Convenience function to reset_base_headers is overriding X_PLEX headers
from python-plexapi.
Related Issues (20)
- Unable to connect to a Plex HTPC client HOT 3
- Add Type Hints to Improve Codebase Readability and Maintainability HOT 1
- Show and Season from the video module use wrong key to get subtitleLanguage attribute
- Add support for track genres in music libraries HOT 1
- feat: python class for available filters HOT 3
- Add support for Plex Profile Watch History and Ratings
- Library section lookup clobbered when multiple libraries have the same title
- editAlbum Missing ... HOT 1
- Unable to find Libraries after using PlexApi based python script. HOT 5
- locations is empty when casting to dict HOT 2
- Add 'merge' method for music albums
- Ability to Modify MovieHistory & EpisodeHistory details HOT 1
- Bad Request response when adding library with default language
- Issues creating `PlexClient` instances from `PlexServer` sessions in 4.15.8 HOT 1
- feat: Endpoint for computing sonic adventure
- Add View History Manually HOT 2
- Streams in MediaParts empty (reload() has no effect)
- `totalSize` of MediaContainer
- createPlaylist does not guard smart=True and non-empty items HOT 2
- "Invalid library sectionID: None" after PlexPartialObject.reload() HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-plexapi.