From 21eaee7da0b7d2d7ea47e456926ab114e5e624c9 Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Sat, 10 Mar 2018 08:31:51 -0800 Subject: [PATCH] Updated Frequently Asked Questions (FAQ) (markdown) --- Frequently-Asked-Questions-(FAQ).md | 408 +--------------------------- 1 file changed, 1 insertion(+), 407 deletions(-) diff --git a/Frequently-Asked-Questions-(FAQ).md b/Frequently-Asked-Questions-(FAQ).md index 387e9dc..fd9e506 100644 --- a/Frequently-Asked-Questions-(FAQ).md +++ b/Frequently-Asked-Questions-(FAQ).md @@ -1,407 +1 @@ -**If you can't find a solution here, please ask on [Discord](https://discord.gg/36ggawe), [Gitter](https://gitter.im/plexpy/general), or the [Forums](https://forums.plex.tv/discussion/169591/plexpy-another-plex-monitoring-program). Don't post questions on the GitHub issues tracker.** - -## General -* [When will v2 be released?](#general-v2) -* [I have some weird Python errors!](#general-q1) -* [I am receiving some weird datatable warnings.](#general-q2) -* [I forgot my username and/or password!](#general-q3) -* [I can't reach the web interface!](#general-q4) -* [When I try to update PlexPy, it keeps telling me that "A newer version is available. You're XX commits behind."](#general-q5) -* [When I try to update PlexPy, it keeps telling me "Please, commit your changes or stash them before you can merge."](#general-q6) -* [What does the warning "Unable to retrieve data" mean? Is this a problem?](#general-q7) -* [My libraries are duplicated! How do I remove them?](#general-q8) -* [How can I access PlexPy outside my home network?](#general-q9) -* [Why does PlexPy not work with my reverse proxy setup?](#general-q10) -* [I need to reinstall PlexPy. Can I keep my history and statistics?](#general-q11) -* [Help! I accidentally deleted a user/library! How can I add it back?](#general-q12) -* [Can I import my history from PlexWatch/Plexivity?](#general-q13) -* [Where can I find my PlexPy logs?](#general-q14) -* [When trying to install the GeoLite2 database, I get the error "Uncaught ReferenceError: confirmAjaxCall is not defined."](#general-q15) -* [PlexPy says "There was an error communicating with your Plex Server", and the logs say "Status code 401".](#general-q16) -* [I can't connect to my Plex server with "Use SSL" checked.](#general-q17) -* [My PlexPy database got corrupted: "DatabaseError: database disk image is malformed."](#general-q18) -* [PlexPy cannot read my Plex log file.](#general-q19) -* [PlexPy won't start with the error: "configobj.ParseError".](#general-q20) - -## Activity and History Logging - -* [How do I enable displaying of bitrates in the Activity pane?](#history-q1) -* [What is the grey progress bar under the current activity?](#history-q2) -* [I can see the streams on the homepage, but nothing is being logged.](#history-q3) -* [Do I need to keep PlexPy running to record history?](#history-q4) -* [Can PlexPy import history from before it was installed?](#history-q5) -* [Watch history isn't showing up under "Last Watched" on the homepage.](#history-q6) -* [After resuming a media item, it shows up as two plays in PlexPy.](#history-q7) -* [The logs keep telling me "Failed to write sessionKey XX ratingKey YY to the database. Will try again on the next pass."](#history-q8) -* [Can I see which items in my libraries are the *least watched*?](#history-q9) -* [My concurrent streams statistic is showing an insane number!](#history-q10) -* [I am seeing history entries with very long duration times.](#history-q11) - -## Notifications - -* [I can't get Notifications working! Is there a magic trick?](#notifications-q1) -* [My tests say they are successful, but the notification isn't sent and there's nothing in the logs.](#notifications-q10) -* [Can I disable notifications for a specific user/library?](#notifications-q2) -* [Can I disable recently added notifications for TV Shows/Movies?](#notifications-q3) -* [All my recently added notifications are showing `S00E01`.](#notifications-q4) -* [I can't seem to setup Gmail notifications. Help?](#notifications-q5) -* [Why are posters not showing up in my notifications?](#notifications-q6) -* [How do I set up Imgur for notification posters?](#notifications-q7) -* [Facebook notifications are telling me "Insufficient permission to post to target on behalf of the viewer".](#notifications-q8) -* [Facebook notifications are telling me "Some of the aliases you requested do not exist".](#notifications-q9) - -## Windows -* [I enabled HTTPS but received a warning that the pyOpenSSL module is missing. How do I fix this?](#windows-q1) -* [PlexPy keeps telling me "You're running an unknown version of PlexPy."](#windows-q2) -* [When trying to update, the logs say "Invalid update data, update failed."](#windows-q3) -* [I am getting a "DatabaseError: file is encrypted of is not a database"!](#windows-q4) -* [How can I run PlexPy without the command prompt staying open?](#windows-q5) -* [The command prompt just flashes open then closes immediately when starting PlexPy.](#windows-q6) - -## OSX -* [When trying to update, the logs say "Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo."](#osx-q1) - -## QNAP -* [How do I set the Plex Logs Folder on QNAP?](#qnap-q1) - - ---- - -### General - -#### Q: When will v2 be released? -**A:** I add an extra week every time someone asks. You just asked. - -#### Q: I have some weird Python errors! -**A:** Please make sure you have the latest version of Python 2.7.x installed. Python 3.x is not supported by PlexPy. - -#### Q: I am receiving some weird datatable warnings. -**A:** Most datatable warnings can be solved by doing a force refresh in your browser (CTRL+F5 or OPTION+Reload on Mac/Safari). If that doesn't work, try clearing your browser's cache. - -#### Q: I forgot my username and/or password! -**A:** Open the PlexPy config.ini file with your preferred text editor, search for `http_username` and `http_password` and the values after the equal signs are the username and password. You can also delete both lines from the file to disable authentication. Note: If your password is encrypted in the config file, you will have to delete the entire line to disable authentication and reset your password in the PlexPy settings. - -#### Q: I can't reach the web interface! -**A:** Open the PlexPy config.ini file with your preferred text editor, search for `http_host` and `http_port` and delete both lines from the file. Restart PlexPy and it will listen on the default IP address and port (`http://localhost:8181`). - -#### Q: When I try to update PlexPy, it keeps telling me that "A newer version is available. You're XX commits behind." -**A:** The following only applies if you installed PlexPy using `git`. Stop PlexPy, then run the following commands from the command line/shell in the PlexPy folder. - -``` -git remote set-url origin https://github.com/JonnyWong16/plexpy.git -git fetch origin -git checkout master -git branch -u origin/master -git reset --hard origin/master -git pull -``` - -#### Q: When I try to update PlexPy, it keeps telling me "Please, commit your changes or stash them before you can merge." -**A:** See the answer to the previous question. - -#### Q: What does the warning "Unable to retrieve data" mean? Is this a problem? -**A:** No, not necessarily. It means that you requested data that is not available, for example when you view the profile of a user who hasn't watched anything yet or view synced items when there is nothing synced. - -#### Q: My libraries are duplicated! How do I remove them? -**A:** This usually happens when you try to reinstall or switch your Plex Media Server. You can visit the following url to remove all libraries not associated with the current Plex server connected to PlexPy. - -``` -http://localhost:8181/delete_duplicate_libraries -``` - -If the libraries are duplicated on the homepage, toggle the Library Statistic cards under Settings > Homepage and click Save. - -#### Q: How can I access PlexPy outside my home network? -**A:** The easy method is to forward an external port (`8181`) on your router to the internal port used by PlexPy (default is `8181`). Visit [Port Forward](http://portforward.com/) for instructions for your particular router. You will then be able to access PlexPy via `http://EXTERNAL-IP-ADDRESS:8181`. The more advanced method (and more secure if you use SSL) is to setup a web server with Nginx/Apache, and use a reverse proxy to access PlexPy. You can lookup many guides on the internet to find out how to do this. - -#### Q: Why does PlexPy not work with my reverse proxy setup? -**A:** PlexPy uses CherryPy as it's web server, and it includes support for reverse proxies. You must ensure that your proxy web server (e.g. nginx or apache) is sending the standard `X-` headers to CherryPy. For **nginx**, the configuration would look like this: - -``` -# Standard proxying headers -proxy_set_header Host $host; -proxy_set_header X-Real-IP $remote_addr; -proxy_set_header X-Forwarded-Host $server_name; -proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; -``` - -If you have SSL enabled on your webserver (e.g. `Internet --> https://nginx --> http://plexpy`), make sure HTTP Proxy is checked under Settings > Web Interface. Then ensure that your proxy web server is also including these two SSL specific `X-` headers: - -``` -# SSL proxying headers -proxy_set_header X-Forwarded-Proto $scheme; -proxy_set_header X-Forwarded-Ssl on; -``` - -As an alternative, the following configuration will automatically work for both HTTP and HTTPS. -``` -location /plexpy/ { - proxy_pass http://127.0.0.1:8181; - proxy_set_header Host $host; - proxy_set_header X-Forwarded-Host $server_name; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_read_timeout 90; - proxy_set_header X-Forwarded-Proto $scheme; - set $xforwardedssl "off"; - if ($scheme = https) { - set $xforwardedssl "on"; - } - proxy_set_header X-Forwarded-Ssl $xforwardedssl; - proxy_redirect ~^(http(?:s)?://)([^:/]+)(?::\d+)?(/.*)?$ $1$2:$server_port$3; -} -``` - -Don't forget to clear your web browser's cache *every* time you update your web server configuration. - -#### Q: I need to reinstall PlexPy. Can I keep my history and statistics? -**A:** Yes, all you need to do is copy your `plexpy.db` database file somewhere safe (make sure PlexPy is shut down when doing this). Then after reinstalling, place the file back inside the PlexPy folder before starting up PlexPy again. This will work on between any OS. - -#### Q: Help! I accidentally deleted a user/library! How can I add it back? -**A:** First, you need to find the `user_id` for the user ([here](https://plex.tv/api/users)) or `section_id` for the library (the last number in the URL of the library in Plex Web). (This will also work with the `section_name` or `username` but will be less accurate). Once you have the correct data, visit the corresponding address below: - -* Undelete a user: - - ``` - http://localhost:8181/undelete_user?user_id= - http://localhost:8181/undelete_user?username= - ``` - -* Undelete a library: - - ``` - http://localhost:8181/undelete_library?section_id= - http://localhost:8181/undelete_library?section_name= - ``` - -#### Q: Can I import my history from PlexWatch/Plexivity? -**A:** You can import your PlexWatch/Plexivity history into PlexPy by going to Settings > Extra Settings > Database Import Tool. - -#### Q: Where can I find my PlexPy logs? -**A:** You can view the PlexPy logs from the web interface by clicking on "View Logs" in the settings menu. Clicking on the "Download logs" button on this page will allow you to save a copy of the log file. Alternatively, you can also click on the log file link on the "Help & Info" page in the settings to view the entire file in preformatted text. When reporting an issue, please provide a link to this log file by pasting it on [Gist](http://gist.github.com) or [Pastebin](http://pastebin.com/). - -#### Q: When trying to install the GeoLite2 database, I get the error "Uncaught ReferenceError: confirmAjaxCall is not defined."? -**A:** You need to clear your browser cache or force refresh using CTRL+F5 (OPTION+Reload on Mac/Safari). - -#### Q: PlexPy says "There was an error communicating with your Plex Server", and the logs say "Status code 401". -**A:** Go into the PlexPy Settings > Plex.tv Account and fetch a new Plex.tv token. - -#### Q: PlexPy can't connect to my Plex server locally with "Use SSL" checked. -**A:** First check that you can access your server locally with SSL. Login to [Plex.tv](https://plex.tv), then go [here](https://plex.tv/api/resources?includeHttps=1) and find your *local* `*.plex.direct` address. Try to visit that address with `/web` at the end and it should load up your Plex Web interface. The url should look like this: - -``` -https://LOCAL-IP-ADDRESS.SERVER-HASH.plex.direct:32400/web -``` - -If you cannot load the Plex Web interface, then you may have a DNS rebinding issue for `*.plex.direct` addresses. Try changing your system to use a public DNS server, such as [Google Public DNS](https://developers.google.com/speed/public-dns/docs/using). If you are using a pfsense firewall, see this comment in [Issue #528](https://github.com/JonnyWong16/plexpy/issues/528#issuecomment-181134403). - -Otherwise, you may have to set secure connections to "Preferred" in your Plex server settings and uncheck the "Use SSL" box in the PlexPy settings. PlexPy will then connect to your Plex server directly without SSL using the address `http://LOCAL-IP-ADDRESS:32400`. - -#### Q: My PlexPy database got corrupted: "DatabaseError: database disk image is malformed." -**A:** The easiest way to fix this would be restoring an older version of the database from the backup directory. If you are using Windows or Mac OS, then you can try to fix it using the steps below. Alternatively, you can try using the [SQLite command line instructions here](http://froebe.net/blog/2015/05/27/error-sqlite-database-is-malformed-solved/). - -1. Backup your PlexPy database (`plexpy.db`) by making a copy and saving it somewhere safe. -2. Open your database with [DB Browser for SQLite](http://sqlitebrowser.org/). -3. Go to the "Execute SQL" tab and run `pragma integrity_check;` ([screenshot](http://i.imgur.com/06CBhMc.png)). If it does not say "ok" then you need to repair your database. -4. Go to "File > Export > Database to SQL file..." -5. Check the box that says "Multiple rows (VALUES) per INSERT statement ([screenshot](http://i.imgur.com/3GXfQw6.png)). -6. Click "OK" and save the `.sql` file on your computer. -7. Go to "File > Close Database". -8. Go to "File > Import > Database from SQL file..." -9. Select the `.sql` file you saved from step 4, and save the new file as `plexpy.db`. -10. Go to the "Execute SQL" tab and run `pragma integrity_check;` and it should say "ok". -11. Go to "File > Write Changes" and "File > Close Database". -12. Replace your PlexPy database (`plexpy.db`) file with this new one. - -#### Q: PlexPy cannot read my Plex log file. -**A:** PlexPy does not require your Plex logs to function. You can add your Plex logs folder to PlexPy in order to use it as a convenient log viewer. If you are installing PlexPy in a docker container or jail, then you will need to mount/share the Plex log folder into the PlexPy container. You must also specify the full path to the Plex logs folder (shortcuts will not work). - -#### Q: PlexPy won't start with the error: "configobj.ParseError". -**A:** Your `config.ini` file is corrupted. Either delete the file (you will have to reconfigure your PlexPy settings) or try restoring a config file from the backups folder. - - ---- - -### Activity and History Logging - -#### Q: How do I enable displaying of bitrates in the Activity pane? -**A:** You can't because it is not possible since such information is not supplied by the Plex API. - -#### Q: What is the grey progress bar under the current activity? -**A:** The yellow progress bar is the current stream progress, and the grey bar is the current transcoder progress (not the available buffer on the client device). - -#### Q: I can see the streams on the homepage, but nothing is being logged. -**A:** History is only logged if all those following conditions are satisfied: - -* After the stream is stopped. -* If history logging is enabled (Settings > Activity Monitoring > History Logging). -* If the total stream duration is longer than the "Ignore interval" you set in the settings. -* If "Keep History" for the user is enabled (Users > Edit Mode > Toggle Keep History). -* If "Keep History" for the library is enabled (Libraries > Edit Mode > Toggle Keep History). - -If you have satisfied all the above requirements, but nothing is still being logged, then the sessions might be stuck inside the database. Go to Settings > Extra Settings > Flush Temporary Sessions to flush the database, and history logging should be working again. - -#### Q: Do I need to keep PlexPy running to record history? -**A:** Yes. PlexPy cannot "see" your Plex activity if it isn't running, or retroactively import old history. - -#### Q: Can PlexPy import history from before it was installed? -**A:** No, unless you had PlexWatch or Plexivity installed previously and import the database, PlexPy can only start logging history after it is installed. - -#### Q: Watch history isn't showing up under "Last Watched" on the homepage. -**A:** "Last Watched" only shows history that is considered as "watched" (exceed the watched percent that you specify in the settings). - -#### Q: After resuming a media item, it shows up as two plays in PlexPy. -**A:** Enable "Group Table and Watch Statistics History" in Settings > General. - -#### Q: The logs keep telling me "Failed to write sessionKey XX ratingKey YY to the database. Will try again on the next pass." -**A:** PlexPy can't find your library item `YY`. You can double check if that item exists by using PlexPy and going to -``` -http://localhost:8181/info?rating_key=YY -``` - -If the item can't be found then you can flush the temporary sessions database in the Settings > Extra Settings. - -#### Q: Can I see which items in my libraries are the *least watched*? -**A:** You can find out which items have not been watched by viewing the Media Info table for the library. - -#### Q: My concurrent streams statistic is showing an insane number! -**A:** You can try fixing your database by following the steps below: - -1. Create a backup of your PlexPy database (`plexpy.db`) by going to Settings > General > Backup Database -2. Shutdown PlexPy. -3. Open your database with [DB Browser for SQLite](http://sqlitebrowser.org/). -4. Go to the "Execute SQL" tab and run the following SQL: - - DELETE FROM session_history WHERE id NOT IN (SELECT id FROM session_history_metadata); - DELETE FROM session_history_media_info WHERE id NOT IN (SELECT id FROM session_history_metadata); - -5. Go to "File > Write Changes" and "File > Close Database". -6. Restart PlexPy. - -#### Q: I am seeing history entries with very long duration times. -**A:** There's a websocket bug in the recent PMS versions where streams don't send a "stop" event. Once you restart PlexPy, a stop event is triggered, and the duration is calculated from when the stream started to when PlexPy was restarted. - -The only solution at the moment is to disable Settings > Activity Monitoring > Use Websockets and manually delete those history entries from the History tab. - - ---- - -### Notifications - -#### Q: I can't get Notifications working! Is there a magic trick? -**A:** To be honest: Yes. To be very honest: No. You probably forgot to click on the gray bell icon next to the Notification Agent. On the popup you have to check for which notification the selected agent should be used for. After you checked at least one notification type and clicked on Close the bell turns satisfying orange-ish. Also, make sure the "Global Notification Toggles" are enabled under Settings > Notifications. - -#### Q: My tests say they are successful, but the notification isn't sent and there's nothing in the logs. -**A:** Sometimes the browser cache will cause problems with the test notifications. Do a force refresh on the settings page (CTRL+F5 or OPTION+Reload on Mac/Safari), then try sending a test notification again. - -#### Q: Can I disable notifications for a specific user/library? -**A:** You can control which users/libraries will trigger notifications by going to Users/Libraries > Edit mode > Toggle Notifications. - -#### Q: Can I disable recently added notifications for TV Shows/Movies? -**A:** You can control which libraries are included in recently added notifications by going to Libraries > Edit mode > Toggle Recently Added. - -#### Q: All my recently added notifications are showing `S00E01`. -**A:** You probably have "Group notifications for recently added TV Shows or Music" checked in the notification settings. No Season/Episode or Album/Track metadata will be available with this setting enabled. - -#### Q: I can't seem to setup Gmail notifications. Help? -**A:** Here are the settings for Gmail. If you don't use 2-factor authentication, you may need to allow less secure apps to access your account. (See Option 2 [here](https://support.google.com/accounts/answer/6010255?hl=en&ref_topic=2401957)). - -``` -SMTP Server: smtp.gmail.com -SMTP Port: 587 -SMTP User: MyEmail@gmail.com -SMTP Password: Your Gmail password or app password if you use 2-factor authentication (https://security.google.com/settings/security/apppasswords) -TLS: checked -``` - -#### Q: Why are posters not showing up in my notifications? -**A:** Posters are only available for notification agents which have the "[Include Poster Image](https://i.imgur.com/enP0tsP.png)" option in the settings, with the exception of Email. If you are using any of those agents, make sure you have Imgur upload setup (see the next question), and the poster will automatically be included with notification. For Email, make sure you have "[Enable HTML Support](https://i.imgur.com/Rk6FU5p.png)" checked in the Email settings, then you may use an HTML image tag to add the poster to body of your notification, for example: `` - -#### Q: How do I set up Imgur for notification posters? -**A:** First you must create an [Imgur account](https://imgur.com/register), then register a new application [here](https://imgur.com/account/settings/apps). Enter an Application Name, Email, and Description, and select the option "OAuth 2 authorization without a callback URL". You will receive a new `client_id` for your application. Enter this value for the "Imgur Client ID" in the PlexPy settings. - -#### Q: Facebook notifications are telling me "Insufficient permission to post to target on behalf of the viewer". -**A:** When allowing PlexPy to access your Facebook account, you must select `Public` or `Friends` for the app visibility permissions. Selecting `Only Me` will not work. - -#### Q: Facebook notifications are telling me "Some of the aliases you requested do not exist". -**A:** Your Facebook Group ID is incorrect. If your group has a named URL, you'll need to find the ID number using a tool like [lookup-id.com](https://lookup-id.com). Your group will need to be open in order for that tool to work. You can change the group back to closed/secret once you have the group ID number. - ---- - -### Windows - -#### Q: I enabled HTTPS but received a warning that the pyOpenSSL module is missing. How do I fix this? -**A:** The pyOpenSSL module is not bundled with Python. Run the following in the command line to install it. - -``` -pip install pyopenssl -``` - -If that doesn't work: - -1. Download the latest version of pyOpenSSL [here](https://pypi.python.org/pypi/pyOpenSSL#downloads) (the source `.tar.gz` file) and save it to `C:\`. -2. Run `C:\Python27\Scripts\pip.exe install C:\pyOpenSSL-16.0.0.tar.gz` - -If you have installed Python into a different directory or saved pyOpenSSL to somewhere else, you have to modify the above command in step 2 accordingly. - -#### Q: PlexPy keeps telling me "You're running an unknown version of PlexPy." -**A:** You most likely forgot the following step when installing Git for Windows. Run the Git installer again, making sure you include the step below. - -> Run the installer, select all the defaults except for the section called "Adjusting your PATH environment" - here select **"Use Git from the Windows command prompt"** - -#### Q: When trying to update, the logs say "Invalid update data, update failed." -**A:** Delete the `update` folder inside the PlexPy directory and try updating again. - -#### Q: I am getting a "DatabaseError: file is encrypted of is not a database"! -**A:** This seems to be a version mismatch with the packaged Python sqlite3 libraries. Download the latest "Precompiled Binaries for Windows" from [here](https://www.sqlite.org/download.html) and place the extracted `sqlite3.dll`s file in `C:\Python27\DLLs`. - -#### Q: How can I run PlexPy without the command prompt staying open? -**A:** Please refer to the instructions under the [Installation as a Daemon](https://github.com/JonnyWong16/plexpy/wiki/Install-as-a-daemon#windows) wiki. - -#### Q: The command prompt just flashes open then closes immediately when starting PlexPy. -**A:** Start PlexPy manually from the command prompt to view the error. Open the Windows command prompt then running the following command. Fill in `C:\path\to\plexpy` to match the path where PlexPy is installed. - -``` -C:\Python27\python.exe C:\path\to\plexpy\PlexPy.py -``` - -Then refer to [this FAQ](#general-q1) above. - - ---- - -### OSX - -#### Q: When trying to update, the logs say "Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo." -**A:** Run the following command in the terminal (according to this [Stackoverflow answer](http://stackoverflow.com/a/26772631)): - -``` -sudo xcodebuild -license -``` - - ---- - -### QNAP - -#### Q: How do I set the Plex Logs Folder on QNAP? -**A:** When running a Plex Media Server on a QNAP, Plex writes logs into a non-shared location with the `/share/.qpkg` path. PlexPy cannot be pointed to this location and you need to create a symbolic link. - -1. SSH into your QNAP device. -2. Create a directory in a shared folder that will be accessible: - - ``` - mkdir /share/MD0_DATA/PATH/TO/VALID/SHARE/FOLDER/PlexLogs - ``` - -3. Create symbolic link between unshared log folder and new shared folder: - - ``` - ln -s "/share/MD0_DATA/.qpkg/PlexMediaServer/Library/Plex Media Server/Logs/" "/share/MD0_DATA/PATH/TO/VALID/SHARE/FOLDER/PlexLogs" - ``` - -4. Your new location is now usable in Settings > Plex Media Server > Plex Logs > Logs Folder: - - ``` - \\\PATH\TO\VALID\SHARE\FOLDER\PlexLogs - ``` \ No newline at end of file +**The wiki has moved to https://github.com/Tautulli/Tautulli-Wiki/wiki**. \ No newline at end of file