Compare commits

...

739 Commits

Author SHA1 Message Date
JonnyWong16
49fb4540a2 Merge branch 'dev' 2016-02-03 20:55:10 -08:00
JonnyWong16
e2120393a2 v1.3.6 2016-02-03 20:54:28 -08:00
JonnyWong16
0b301fff3f Fix regression where duration not reported as min 2016-02-03 09:32:32 -08:00
JonnyWong16
eeb351e991 Update readme 2016-02-02 22:34:46 -08:00
JonnyWong16
1095e29b4d Fix FreeBSD and FreeNAS init scripts daemonizing 2016-02-02 21:23:48 -08:00
JonnyWong16
be058eaff7 Merge branch 'dev' 2016-02-02 21:13:34 -08:00
JonnyWong16
f409dda2ef v1.3.5 2016-02-02 21:12:53 -08:00
JonnyWong16
f409cdda8f Merge pull request #502 from JonnyWong16/startup-tasks-after-daemonizing
Run startup tasks after daemonizing
2016-02-02 21:03:52 -08:00
JonnyWong16
9cd6396c35 Add method to delete duplicate libraries 2016-02-02 20:54:34 -08:00
JonnyWong16
ee754ea533 Remove trailing slash from Facebook redirect URI 2016-02-02 20:38:16 -08:00
JonnyWong16
36de20dd75 Fix getting new pms_identifier for server only 2016-02-02 20:33:47 -08:00
JonnyWong16
a957e8eb4f Clean up time formats for server notifications 2016-02-02 20:33:08 -08:00
JonnyWong16
14a90d84ec Add {stream_time}, {remaining_time}, and {progress_time} to notification options 2016-01-31 16:15:06 -08:00
JonnyWong16
fae9bc618a Initialize PlexPy after daemonizing 2016-01-31 15:13:35 -08:00
JonnyWong16
3248e6500e Clean up build_notify_text
* session is now a dict, so no need for "default values"
2016-01-31 13:34:51 -08:00
JonnyWong16
c17bf79d79 Fix server verification for unpublished servers 2016-01-31 11:32:44 -08:00
JonnyWong16
1ff1270bfa Clean up powershell for scripts 2016-01-30 16:18:45 -08:00
JonnyWong16
b1a2cf33d8 Merge pull request #498 from Hellowlol/ps1
add support for powershell
2016-01-30 15:54:34 -08:00
Hellowlol
b2292e98c1 add support for powershell 2016-01-31 00:18:58 +01:00
JonnyWong16
4d156a8911 Allow expanding of media info table when missing added at date 2016-01-30 00:48:51 -08:00
JonnyWong16
7193b6518b Fix removing unique constraints from database 2016-01-30 00:40:06 -08:00
JonnyWong16
cff6b44109 Merge branch 'dev' 2016-01-29 21:32:37 -08:00
JonnyWong16
fb7ad9438e v1.3.4 2016-01-29 21:31:25 -08:00
JonnyWong16
afc265a188 Fix schedulers not starting with library update 2016-01-29 21:26:27 -08:00
JonnyWong16
01fe7bf612 Reorganize notification options 2016-01-29 19:06:08 -08:00
JonnyWong16
1cb75bd053 Remove unnecessary quoting of script arguments 2016-01-29 18:47:12 -08:00
JonnyWong16
0eaea4d011 Fix empty libraries not added 2016-01-29 18:38:19 -08:00
JonnyWong16
67377a2561 Fix server verification in settings 2016-01-27 23:32:21 -08:00
JonnyWong16
a8aae9f1f5 Fix libraries and users refresh 2016-01-27 23:32:01 -08:00
JonnyWong16
a9ce92decb Change Telegram wording 2016-01-27 21:30:35 -08:00
JonnyWong16
c19162295a Update Facebook instructions 2016-01-27 21:20:04 -08:00
JonnyWong16
58796c45ed Remove built in Twitter consumer key and secret 2016-01-27 21:19:18 -08:00
JonnyWong16
d94b348780 Fix buffer notifications even when disabled with websockets 2016-01-27 19:52:30 -08:00
JonnyWong16
95f92bd292 Add unique identifiers to notification options 2016-01-27 19:51:58 -08:00
JonnyWong16
bc52ac3559 Remove media type toggles from recently added notifications 2016-01-27 19:51:36 -08:00
JonnyWong16
8bbc6a6611 Fix libraries without section_id in database 2016-01-27 19:51:10 -08:00
JonnyWong16
8902b93a26 Merge branch 'dev' 2016-01-26 00:14:38 -08:00
JonnyWong16
ae36af807d v1.3.3 2016-01-26 00:13:58 -08:00
JonnyWong16
fd256625c6 Fix Plays by Month graph not loading 2016-01-25 18:43:51 -08:00
JonnyWong16
bee543a25a Disable datatables caching 2016-01-25 18:30:30 -08:00
JonnyWong16
55eb79cb52 Even faster library updating 2016-01-25 12:01:59 -08:00
JonnyWong16
35965a8320 Merge branch 'dev' 2016-01-24 22:52:47 -08:00
JonnyWong16
8a902ae3e6 v1.3.2 2016-01-24 22:51:36 -08:00
JonnyWong16
52bed5bf98 Attempt at improved library updating 2016-01-24 22:19:48 -08:00
JonnyWong16
9e83f6d779 Another fix for 'datestamp' and 'timestamp' 2016-01-24 09:52:20 -08:00
JonnyWong16
0ba5012464 Merge branch 'dev' 2016-01-23 22:59:46 -08:00
JonnyWong16
73ff28465d v1.3.1 2016-01-23 22:58:44 -08:00
JonnyWong16
7484d65dbb Fix datestamp and timestamp notification options 2016-01-23 22:53:13 -08:00
JonnyWong16
4a120e7a54 Fix unable to startup if library refresh fails 2016-01-23 21:06:41 -08:00
JonnyWong16
8d63d85821 Fix star rating overlapping text 2016-01-23 19:14:54 -08:00
JonnyWong16
5cec84a802 More descriptive libraries updating message 2016-01-23 19:13:16 -08:00
JonnyWong16
48da41690d Fix empty brackets on tables 2016-01-23 19:12:13 -08:00
JonnyWong16
1c82241f30 Fix notifier config ajax calls for reverse proxies 2016-01-23 16:23:20 -08:00
JonnyWong16
b1ea3bcd4e Rename last watched to last played 2016-01-23 14:06:25 -08:00
JonnyWong16
05e485b55e Merge branch 'dev' 2016-01-23 13:23:45 -08:00
JonnyWong16
c62e0e4e99 v1.3.0 2016-01-23 13:21:51 -08:00
JonnyWong16
3c6a1a02b8 Merge pull request #462 from jackwilsdon/fix-restart-dev
Use os.execv instead of subprocess.Popen to restart the process
2016-01-23 13:16:13 -08:00
JonnyWong16
cc287607cd Allow custom search query to update metadata 2016-01-23 12:40:41 -08:00
JonnyWong16
b24e9a2185 Allow custom redirect uri with Facebook notifier 2016-01-23 08:12:41 -08:00
JonnyWong16
01791eac52 Fix rating_key on sync table 2016-01-23 08:05:04 -08:00
JonnyWong16
651b57a93f Add datestamp and timestamp notification options 2016-01-22 19:16:15 -08:00
JonnyWong16
cc857364f4 Fix typos in Notifiers logger 2016-01-22 18:01:32 -08:00
JonnyWong16
f29d7c8cfb Fix stream info modal on Users and Libraries pages 2016-01-22 17:59:20 -08:00
JonnyWong16
af4d0248d9 Revert https cert and key to custom directory 2016-01-22 10:17:17 -08:00
JonnyWong16
2990664b2b Fix section_id for plexwatch import 2016-01-22 09:09:37 -08:00
Jack Wilsdon
ed52038bc4 Use os.execv instead of subprocess.Popen to restart the process
This fixes #460.
2016-01-22 13:19:27 +00:00
JonnyWong16
ee125dfadc Forgot 'not' in 2dcae5e219 2016-01-19 08:31:49 -08:00
JonnyWong16
196048cf38 Work around for iOS web app links opening in Safari 2016-01-19 00:06:14 -08:00
JonnyWong16
5faf357045 Disable logging while library update in progress 2016-01-18 23:48:31 -08:00
JonnyWong16
4e0f06f24d Remove unique constraint for section_id and username 2016-01-18 22:20:14 -08:00
JonnyWong16
717530fff7 Fix Users list not sorting alphabetically 2016-01-18 19:55:10 -08:00
JonnyWong16
4a5e38dc1e Fix error refreshing library counts when XML fails
* Also increase http request timeout to 20 seconds
2016-01-18 19:27:58 -08:00
JonnyWong16
419f8dadad Fix another typo 2016-01-18 19:03:55 -08:00
JonnyWong16
2dcae5e219 Fix folders not created in the data directory 2016-01-18 18:52:01 -08:00
JonnyWong16
36a99f70a3 Fix error when script directory doesn't exist 2016-01-18 18:30:22 -08:00
JonnyWong16
c98cf858c1 Fix typo on edit library and edit user modals 2016-01-18 18:24:07 -08:00
JonnyWong16
dd463f00a7 Fix Facebook authorization not working 2016-01-18 18:22:48 -08:00
JonnyWong16
2459340c6f Fix user duplicated in Library user stats 2016-01-18 12:59:26 -08:00
JonnyWong16
76db5ffa3a Use font awesome for star rating 2016-01-17 22:16:12 -08:00
JonnyWong16
2db0e9c280 Add all media flags 2016-01-17 22:14:16 -08:00
JonnyWong16
db6dbe6c19 Fix refresh media info table doubling rows 2016-01-17 22:14:12 -08:00
JonnyWong16
ecedd4d231 Merge pull request #263 from drzoidberg33/library-id-changes
Library id changes
2016-01-17 16:43:46 -08:00
JonnyWong16
1809b95e2d Add setting to enable calculating total file sizes
* Setting is disabled by default
2016-01-17 16:15:28 -08:00
JonnyWong16
0d7e261bd1 Improved caching and fixed tables 2016-01-17 12:34:23 -08:00
JonnyWong16
908941fb82 Prettier thumbnail popovers 2016-01-17 01:10:25 -08:00
JonnyWong16
fbacc4f789 Add media info icons to info page 2016-01-16 23:17:04 -08:00
Jonathan Wong
3c1290e8fd Some more minor changes 2016-01-16 19:27:40 -08:00
Jonathan Wong
35528ef602 Get file sizes for media info table 2016-01-16 18:23:08 -08:00
Jonathan Wong
c0f0cb0d9e Don't cache last watched or play count 2016-01-16 04:10:21 -08:00
Jonathan Wong
4a65dc1d6e Start database section id update on its own thread 2016-01-16 03:31:00 -08:00
Jonathan Wong
b4a25e33bb Fix websocket log spam
* Bug where websocket reports a session playing while /status/sessions
reports nothing.
2016-01-16 03:28:39 -08:00
Jonathan Wong
7f1a08dd04 Final clean up 2016-01-16 01:51:50 -08:00
Jonathan Wong
6152a1e913 Fix bugs with media info table 2016-01-15 22:15:45 -08:00
Jonathan Wong
002cb93187 Clean up for welcome page 2016-01-15 20:59:14 -08:00
Jonathan Wong
381c3da31c Add media info table to library page 2016-01-15 20:59:02 -08:00
Jonathan Wong
10e4d562ab Clean up graphs.py 2016-01-15 20:58:57 -08:00
Jonathan Wong
2a85e11ad9 Add library recently added 2016-01-15 20:58:55 -08:00
Jonathan Wong
95b55760ad Add sortable homepage cards 2016-01-15 20:58:53 -08:00
Jonathan Wong
636f898da8 Massive code cleanup
* Finish up library pages (toggles and notifications)
* Update user pages to match library pages
* Fix no current activity bif thumbnail at the start of a stream
* Improved logging throughout PlexPy
2016-01-15 20:58:44 -08:00
Jonathan Wong
5fedac691d Add individual library page 2016-01-15 20:50:18 -08:00
Jonathan Wong
979d68957e Clean up users page to match libraries page 2016-01-15 20:49:59 -08:00
Jonathan Wong
a5b0837cf5 Add libraries page 2016-01-15 20:49:41 -08:00
Jonathan Wong
8ba68dcfcf Change home cards config to list type 2016-01-15 20:49:22 -08:00
Jonathan Wong
8f367d140f Add item counts to database
* Add schedule task to refresh libraries list
* Update library stats to use library_sections table
2016-01-15 20:49:04 -08:00
Jonathan Wong
771885f27f Add update metadata feature
* Use rating_key instead of item_id for history info
2016-01-15 20:48:47 -08:00
Jonathan Wong
09aac22909 Initial library_id changes
* Give the library sections their own db table.
2016-01-15 20:48:29 -08:00
Jonathan Wong
1de3c0d559 Fixes for testing script notifications 2016-01-15 00:33:40 -08:00
JonnyWong16
0988b68c8c Merge pull request #391 from PHoSawyer/dev
CentOS 6.X startup script
2016-01-13 00:24:31 -08:00
Jonathan Wong
325ad4094e Clean up Web Apps 2016-01-13 00:16:50 -08:00
JonnyWong16
16a09407e4 Merge pull request #436 from zobe123/dev
Web Apps
2016-01-13 00:12:12 -08:00
JonnyWong16
84256f42c6 Merge pull request #419 from JonnyWong16/facebook-agent
Add Facebook notification agent
2016-01-12 23:28:03 -08:00
JonnyWong16
7befbef6ec Add Facebook notification agent 2016-01-12 23:22:54 -08:00
Jonathan Wong
754df5bea7 Fix to get new pms identifier on server change 2016-01-12 22:39:32 -08:00
Jonathan Wong
78ee646558 Fix for empty most concurrent stat 2016-01-12 22:06:21 -08:00
Jonathan Wong
3d6f89d309 Clean up scripts 2016-01-12 21:38:47 -08:00
JonnyWong16
e321479712 Merge pull request #373 from Hellowlol/scripts
Scripts
2016-01-12 21:05:26 -08:00
Hellowlol
9328b7e586 Add scripts 2016-01-12 22:12:48 +01:00
zobe123
50ace54cd0 improvements 2016-01-12 20:59:32 +01:00
Hellowlol
ad365c7dd0 fix conflicts 2016-01-11 22:24:13 +01:00
zobe123
11427dbecd added commits how JonnyWong16 wanted
* added iOS WebAPP Icons/Splashscreens
* added android WebAPP Icons/Splashscreens
* added IE10 Icons
* Updated plexpy.css - prevents the text is larger than the box on small
screens.
2016-01-11 21:31:46 +01:00
Jonathan Wong
b490831a50 More concurrent stream stats
* Also fix graph queries
2016-01-08 22:49:04 -08:00
JonnyWong16
af76017a79 Fix datatable paging visual bug in Firefox 2016-01-08 17:58:04 -08:00
JonnyWong16
43409b3089 Fix month name localization on play totals graph
#423
2016-01-07 20:37:00 -08:00
Jonathan Wong
bfad769f93 Return message for missing changelog file 2016-01-06 18:54:30 -08:00
Jonathan Wong
7e5dce1c14 Fix regression for grouped recently added metadata 2016-01-03 23:49:58 -08:00
JonnyWong16
8ba4bebe01 Merge pull request #401 from Hellowlol/patch-4
Enable webapp for mobile devices
2015-12-31 20:16:39 -08:00
JonnyWong16
78a87db017 Merge pull request #414 from JonnyWong16/miscellaneous-fixes
Allow SSL when verifying server in settings and test notifications
2015-12-31 20:14:12 -08:00
JonnyWong16
b73a259f68 Clean up Slack agent 2015-12-31 20:13:54 -08:00
JonnyWong16
65f27ee605 Add Email from name option 2015-12-31 20:06:31 -08:00
JonnyWong16
6d5b5e15d5 Remove PlexPy Pushover API token
* User's own API token is now required
2015-12-31 20:06:29 -08:00
JonnyWong16
f31c4dcccd Add test notification for all agents 2015-12-31 20:04:08 -08:00
JonnyWong16
1e616fa585 Allow SSL when verifying server in settings 2015-12-31 20:02:54 -08:00
JonnyWong16
0d2666f7d3 Merge pull request #418 from richipargo/slack-agent
Add slack as a notification agent
2015-12-31 19:58:57 -08:00
Ricardo Tapia
0dd8970668 added url icon validation 2015-12-31 21:13:20 -06:00
Ricardo Tapia
89cda3dcff typo for telegram agent 2015-12-31 21:08:24 -06:00
Ricardo Tapia
1d48688518 finished slack integration 2015-12-31 21:04:33 -06:00
richipargo
0b59f5e29c Slack notification config 2015-12-31 16:26:10 -06:00
Ricardo Tapia
5aebc8d191 slack config options 2015-12-31 15:34:53 -06:00
richipargo
6e00c5da04 Return Settings 2015-12-31 15:21:01 -06:00
Ricardo Tapia
50b06e041c initial agent settings 2015-12-31 13:22:27 -06:00
JonnyWong16
1c539f00dd Fix duration for grouped home stats 2015-12-27 19:46:29 -08:00
JonnyWong16
87ca432ec8 Fix get server friendly name after wizard 2015-12-26 19:55:36 -08:00
Hellowlol
ca33f4a2a5 webapp
https://github.com/drzoidberg33/plexpy/issues/398
2015-12-27 01:07:31 +01:00
Jonathan Wong
9409303f24 Merge branch 'dev' 2015-12-22 19:36:10 -08:00
Jonathan Wong
94a3d35c90 v1.2.16 2015-12-22 19:35:11 -08:00
Jonathan Wong
851de4934b Change logs to 50 line default 2015-12-22 19:31:59 -08:00
JonnyWong16
2942640eb9 Fix most concurrent stat for empty database 2015-12-22 10:21:55 -08:00
PHoSawyer
1cef037db5 CentOS 6.X startup script
Init file for CentOS 6.X systems, variables exist for different install directorys. Please note, current version of Python is 2.6 and PlexPy requires 2.7. A variable exists to point to this path.

Since PlexPy is based on Headphones, I just copied the init script for Headphones and changed the paths and added the Python2.7 path
2015-12-21 15:20:35 +00:00
Jonathan Wong
a00d43092d Merge branch 'dev' 2015-12-20 09:34:38 -08:00
Jonathan Wong
45c2f50018 v1.2.15 2015-12-20 09:33:04 -08:00
JonnyWong16
ef8c6e82e6 Merge pull request #381 from JonnyWong16/miscellaneous-fixes
Group watch statistics history
2015-12-20 03:22:39 -08:00
Jonathan Wong
3eebb58da5 Fix most concurrent count with duplicate time entires 2015-12-20 03:14:39 -08:00
Jonathan Wong
447c50fd03 Group watch statistics history 2015-12-19 20:40:30 -08:00
Jonathan Wong
0620ebebcf Touch up current activity status bar hover effect 2015-12-17 23:26:26 -08:00
JonnyWong16
cf081ee291 Merge pull request #380 from zobe123/patch-1
Added Statusbar hover effect with percentage
2015-12-17 23:18:22 -08:00
zobe123
3c29b8e9c5 Update plexpy.css
Added Statusbar hover effect with percentage
2015-12-17 23:33:53 +01:00
zobe123
6143da5a6a Update pmsconnect.py
some additions to Show readable transcode progress
2015-12-17 23:25:29 +01:00
JonnyWong16
664f71575c Merge pull request #370 from JonnyWong16/miscellaneous-fixes
Miscellaneous fixes
2015-12-16 19:52:07 -08:00
Jonathan Wong
9ae111b8a1 Fix Growl notifications 2015-12-16 19:42:51 -08:00
Jonathan Wong
18682c7a2e Add logger info for Boxcar2 notification sent 2015-12-15 19:56:14 -08:00
Jonathan Wong
b21c50dfcf Fix typo on settings page 2015-12-13 23:53:22 -08:00
Jonathan Wong
49b6965e8e Add CC and BCC and multiple email recipients 2015-12-13 15:08:43 -08:00
Jonathan Wong
c6cc2b8831 Save graph type/days/tab to config file
* Change input for graph days range
2015-12-13 11:35:33 -08:00
Jonathan Wong
f9f65eae53 Add duration to history table footer 2015-12-13 09:36:54 -08:00
Jonathan Wong
b51d442673 Add notification for remote access/server back up 2015-12-13 09:31:11 -08:00
Jonathan Wong
5863b62ccf Add notifier name to modal title 2015-12-12 17:32:32 -08:00
Jonathan Wong
66bb922012 Add stream details to notification options
* Also beautify modal
2015-12-12 17:31:52 -08:00
Jonathan Wong
53876e8f0d Add time range to most concurrent stat
* Reorder cards
2015-12-12 16:21:54 -08:00
Jonathan Wong
cb7ba7fdde Clean up if statement in current activity header 2015-12-12 14:36:57 -08:00
Jonathan Wong
9cf6793b24 Add most concurrent streams home statistic 2015-12-12 14:34:42 -08:00
Jonathan Wong
6e62ffdd22 Get Pushbullet devices automatically using API 2015-12-12 14:34:11 -08:00
Jonathan Wong
c042d9e39a Fix metadata for grouped recently added notifications 2015-12-12 14:31:04 -08:00
Jonathan Wong
1262de2ae2 Clean up notifiers 2015-12-12 14:30:42 -08:00
JonnyWong16
307230cec8 Merge pull request #365 from zobe123/patch-1
Update current_activity_header.html
2015-12-12 14:10:27 -08:00
drzoidberg33
4fa2711e78 Merge pull request #367 from drzoidberg33/frontend-tweaks
Fix greedy search bar.
2015-12-12 16:20:44 +02:00
Tim
5c9c2f9ab8 Fix greedy search bar. 2015-12-12 16:19:30 +02:00
zobe123
604155b41b Update current_activity_header.html
remove "no"
2015-12-11 22:23:14 +01:00
zobe123
6e4198e7be Update current_activity_header.html
dynamic "s" at the word stream/streams
added "no" before Activity when their is no activity
2015-12-10 23:56:02 +01:00
drzoidberg33
14d4940d05 Merge pull request #363 from InAnimaTe/dev
add .pem cert to ignore list
2015-12-09 18:47:22 +02:00
Mario Loria
a6b0cdef97 add .pem cert to ignore list 2015-12-09 11:00:53 -05:00
Tim
6265943607 Merge branch 'dev' 2015-12-07 22:32:00 +02:00
Tim
de39f7691c v1.2.14 2015-12-07 22:31:00 +02:00
drzoidberg33
921a219beb Merge pull request #352 from drzoidberg33/security-fixes
Fix regression on select_single queries Resolves #350
2015-12-07 22:26:33 +02:00
Tim
b9c95d49a6 Fix regression on select_single queries. 2015-12-07 22:22:47 +02:00
Jonathan Wong
fc0be6bce2 Merge branch 'dev' 2015-12-06 11:41:08 -08:00
Jonathan Wong
8db891cfe6 v1.2.13 2015-12-06 11:40:17 -08:00
JonnyWong16
f6e77cc578 Merge pull request #346 from JonnyWong16/miscellaneous-fixes
Fix current activity
2015-12-06 11:36:05 -08:00
Jonathan Wong
a3782f9150 Fix dict key for IP address in current activity 2015-12-06 11:30:33 -08:00
drzoidberg33
7546c7ef42 Merge pull request #345 from drzoidberg33/security-fixes
Security fixes
2015-12-06 21:23:43 +02:00
Jonathan Wong
53de8cda30 Match newline between tags for notification text 2015-12-06 11:13:46 -08:00
Tim
1fb7473dc5 Sanitize sync row items. 2015-12-06 21:04:33 +02:00
Tim
cc9d09bd54 Allow HTML encoded content to be displayed in notification setting descriptions. 2015-12-06 20:49:00 +02:00
Tim
42ff4a2f62 Merge branch 'dev' 2015-12-06 20:02:18 +02:00
Tim
3fa5f80fc4 v1.2.12 2015-12-06 20:01:38 +02:00
drzoidberg33
9b5b7ef8db Merge pull request #343 from drzoidberg33/security-fixes
No need to sanitize same items more than once.
2015-12-06 19:59:34 +02:00
Tim
560acf62fe No need to sanitize same items more than once. 2015-12-06 18:45:02 +02:00
drzoidberg33
27d12922da Merge pull request #339 from drzoidberg33/security-fixes
Move dict_factory out of database class.
2015-12-06 18:10:26 +02:00
Tim
37b92f3d88 Move dict_factory out of database class. 2015-12-06 18:09:18 +02:00
Tim
79d5c0c92e Merge branch 'dev' 2015-12-06 17:33:12 +02:00
Tim
0bdaedd486 Fix more regresssions. 2015-12-06 17:32:25 +02:00
drzoidberg33
018a201688 Merge pull request #338 from drzoidberg33/security-fixes
More dict key fixes.
2015-12-06 17:21:54 +02:00
Tim
a5bd7e6563 More dict key fixes. 2015-12-06 17:19:09 +02:00
drzoidberg33
a055feccd5 Merge pull request #337 from drzoidberg33/security-fixes
Fix changelog modal output.
2015-12-06 16:38:54 +02:00
Tim
ba68a9b52b Fix changelog modal output. 2015-12-06 16:32:07 +02:00
Tim
49669dc7e0 Merge branch 'dev' 2015-12-06 16:16:39 +02:00
Tim
5bdf79606e v1.2.10 2015-12-06 16:16:03 +02:00
drzoidberg33
ff3a9e47df Merge pull request #335 from drzoidberg33/security-fixes
Fix count type graphs.
2015-12-06 16:12:28 +02:00
Tim
a18ba24f4a Fix count type graphs. 2015-12-06 16:07:57 +02:00
Tim
baeb744a7c Merge branch 'dev' 2015-12-06 14:53:04 +02:00
Tim
d07add383f v1.2.9 2015-12-06 14:52:19 +02:00
drzoidberg33
a1f18bc133 Merge pull request #334 from drzoidberg33/security-fixes
Escape input on friendy_name change.
2015-12-06 14:41:31 +02:00
Tim
e00c23bc49 Escape input on friendy_name change. 2015-12-06 14:39:50 +02:00
drzoidberg33
0228a356e4 Merge pull request #333 from drzoidberg33/security-fixes
Better sanitization on templates and datatables output.
2015-12-06 14:18:22 +02:00
Tim
b0fa0d534e Better sanitization on templates and datatables output. 2015-12-06 14:09:38 +02:00
Jonathan Wong
1157fda96c Hide Pushalot notifier message logging 2015-12-06 00:52:43 -08:00
Jonathan Wong
bbf774379d Merge branch 'dev' 2015-12-05 23:45:35 -08:00
Jonathan Wong
24c8c4319d v1.2.8 2015-12-05 23:44:02 -08:00
JonnyWong16
3b8f9f5892 Merge pull request #328 from JonnyWong16/miscellaneous-fixes
Fix recently added
2015-12-05 23:28:49 -08:00
Jonathan Wong
b47ccd06f9 Sanitize player name 2015-12-05 23:26:54 -08:00
Jonathan Wong
8c4292f9ac Fix recently added using added at time 2015-12-05 14:23:10 -08:00
JonnyWong16
a8fbf8ab1d Merge pull request #327 from zobe123/dev
add Microsoft Edge platform
2015-12-05 11:05:30 -08:00
zobe123
38e9938666 Add Microsoft Edge platform image. 2015-12-05 13:31:56 +01:00
zobe123
93c4a0652e Revert "Add Image for Microsoft Edge"
This reverts commit d12b57e1de.
2015-12-05 13:29:10 +01:00
zobe123
2fff6647fd Revert "Update msedge.png"
This reverts commit 36f0f60c49.
2015-12-05 13:29:01 +01:00
zobe123
36f0f60c49 Update msedge.png 2015-12-05 13:02:53 +01:00
zobe123
d12b57e1de Add Image for Microsoft Edge 2015-12-05 13:02:19 +01:00
zobe123
deb16428ed Update script.js 2015-12-05 12:57:26 +01:00
drzoidberg33
a75aba4aee Merge pull request #324 from JonnyWong16/miscellaneous-fixes
Only schedule job for recently added or monitor remote access if sett…
2015-12-04 20:12:44 +02:00
Jonathan Wong
bb5aa2be3d Remember previous recently added items
* Only pull metadata if there are new recently added items since the
last check
2015-12-03 19:50:46 -08:00
Jonathan Wong
ef6ef98541 Clean up settings help text and wording 2015-12-03 19:07:24 -08:00
Jonathan Wong
89f581f63e Only schedule job for recently added or monitor remote access if setting enabled 2015-12-03 18:40:18 -08:00
JonnyWong16
6081fa329b Merge pull request #321 from JonnyWong16/miscellaneous-fixes
Miscellaneous fixes
2015-12-03 10:39:12 -08:00
Jonathan Wong
112811f3e2 Fix subject UTF-8 encode for Prowl notifier 2015-12-02 19:18:04 -08:00
Jonathan Wong
ede07595c3 Match newline characters in notification text 2015-12-02 19:15:46 -08:00
JonnyWong16
08d65623dd Merge pull request #306 from JonnyWong16/miscellaneous-fixes
Delete users
2015-12-02 17:05:39 -08:00
Jonathan Wong
7540b5fb34 Fix recently added notification delay 2015-12-01 22:54:58 -08:00
Jonathan Wong
10c54c2d10 Only show IPv4 addresses 2015-12-01 21:57:02 -08:00
Jonathan Wong
b8d9c8cc47 Set blank metadata so recently added check continues when and item isn't found 2015-12-01 21:50:47 -08:00
Jonathan Wong
bac5018b27 Add channel support to Telegram notifier 2015-12-01 21:31:48 -08:00
Jonathan Wong
c65d9898c8 Add icon for Apple tvOS 2015-12-01 20:05:37 -08:00
Jonathan Wong
d7284c40bd Allow unicode in notification subject and body 2015-12-01 20:03:25 -08:00
Jonathan Wong
1c00f82097 Add ability to delete users 2015-11-27 21:13:17 -08:00
Jonathan Wong
c501923f2b Hide Pushalot notifier response logging 2015-11-27 18:13:20 -08:00
Jonathan Wong
81b22a8c36 Merge branch 'dev' 2015-11-27 06:38:31 -08:00
Jonathan Wong
beb66396fe v1.2.7 2015-11-27 06:33:03 -08:00
Jonathan Wong
aaf3de68cf Fix IP address in notifications 2015-11-27 06:29:41 -08:00
Jonathan Wong
c827c9e825 Fix IP logging again
* Really this time...
2015-11-27 12:33:34 +02:00
Tim van der Westhuizen
5100fdbc96 Merge branch 'dev' 2015-11-27 10:53:28 +02:00
Tim van der Westhuizen
fae3f38a88 v1.2.6 2015-11-27 10:52:29 +02:00
Tim van der Westhuizen
a8236222fb Catch null ratingKeys in plexWatch db importer.
Make sure we have a string when parsing the latinToAscii function.
2015-11-27 10:45:25 +02:00
Jonathan Wong
2be4d9b6c9 Merge branch 'dev' 2015-11-26 19:08:46 -08:00
Jonathan Wong
00934b04d2 Fix IP logging again
* Really this time...
2015-11-26 19:06:51 -08:00
Jonathan Wong
1e28b22c70 Merge branch 'dev' 2015-11-25 20:23:44 -08:00
Jonathan Wong
776061605f Fix IP logging again 2015-11-25 20:20:06 -08:00
Jonathan Wong
683e5663e1 Merge branch 'dev' 2015-11-25 19:16:50 -08:00
Jonathan Wong
090011c9a5 v1.2.5 2015-11-25 19:15:40 -08:00
Jonathan Wong
30b11bce98 Actually add video and audio decision to notifications 2015-11-25 19:13:08 -08:00
Jonathan Wong
2a91ec1560 Fix season and episode number notification option return at least one digit 2015-11-25 19:07:23 -08:00
Jonathan Wong
908ce1ff8d Fix IP address logging 2015-11-25 19:02:59 -08:00
Jonathan Wong
fac47ee68b Fix log spam if notifications turned off 2015-11-25 18:14:08 -08:00
Jonathan Wong
0f8c122ee3 Add video and audio decision to notification options 2015-11-25 18:12:20 -08:00
Jonathan Wong
893c91a15d Merge branch 'dev' 2015-11-24 18:51:35 -08:00
Jonathan Wong
6d152cf308 v1.2.4 2015-11-24 18:49:35 -08:00
Jonathan Wong
af2d0446da Hide fix metadata button for now 2015-11-24 18:21:59 -08:00
Jonathan Wong
244b03ba3e No restart required for monitoring remote access 2015-11-23 23:10:49 -08:00
Jonathan Wong
50e0629890 Fix unicode server name 2015-11-23 23:10:31 -08:00
Jonathan Wong
c296b38b78 Fix text glitch on welcome wizard 2015-11-23 23:10:16 -08:00
Jonathan Wong
f7cdfd3f30 Upgrade config file from previous versions 2015-11-23 23:10:01 -08:00
drzoidberg33
44cb2400d0 Remove donate link 2015-11-23 10:56:44 +02:00
Jonathan Wong
d297597fa6 Separate out movie and tv logging 2015-11-22 22:19:37 -08:00
Jonathan Wong
168e74aa23 Add logger for recently added 2015-11-22 22:15:28 -08:00
Jonathan Wong
35fa8a749b Fix PMS IP error message 2015-11-22 12:28:24 -08:00
Jonathan Wong
21a1870884 Fix callback in wrong spot 2015-11-22 12:24:57 -08:00
Jonathan Wong
1d86187f79 Fix "Please verify your server" setting bug 2015-11-22 12:11:22 -08:00
JonnyWong16
558f7873f5 Merge pull request #289 from JonnyWong16/miscellaneous-fixes
Use Plex API to check remote access down
2015-11-22 10:33:30 -08:00
Jonathan Wong
a20a52f5f1 Refresh port mapping before checking remote access 2015-11-22 10:22:15 -08:00
Jonathan Wong
17bb57d5f5 Apply media type toggles to recently added 2015-11-21 10:28:26 -08:00
Jonathan Wong
e6aef01508 Separate out TV notification toggle in settings 2015-11-21 10:27:51 -08:00
Jonathan Wong
013d957e47 Use Plex API to check remote access down 2015-11-21 10:13:26 -08:00
Jonathan Wong
99e064e040 Add wording for Pushover group key 2015-11-20 19:04:54 -08:00
JonnyWong16
9e5334ac81 Merge pull request #282 from JonnyWong16/miscellaneous-fixes
IPv6 support, fix recently added, get server name, notify server down
2015-11-20 06:28:02 -08:00
Jonathan Wong
fd43cf5dd4 Add setting to enable remote access monitoring 2015-11-19 19:40:50 -08:00
Jonathan Wong
9aea663754 Logger info for email notification sent 2015-11-17 23:39:02 -08:00
Jonathan Wong
223e2b2b32 Add notification for Plex external port down 2015-11-17 23:38:46 -08:00
Jonathan Wong
ca91adbd53 Add check for Plex external port down 2015-11-17 23:35:41 -08:00
Jonathan Wong
4fffbf8a0c Add server uptime 2015-11-17 19:31:13 -08:00
Jonathan Wong
c3ea35806e Move check for server down to check_active_sessions 2015-11-17 06:57:02 -08:00
Jonathan Wong
1c4df69e61 Toggle bell icon for on_down 2015-11-16 23:52:03 -08:00
Jonathan Wong
707c30b0af Fix missing pmsconnect 2015-11-16 23:28:43 -08:00
Jonathan Wong
4d87666a42 Schedule job to check if server down 2015-11-16 23:19:59 -08:00
Jonathan Wong
b28ac1543a Add notification for server down 2015-11-16 23:19:37 -08:00
Jonathan Wong
1983597cf1 Fix get_server_friendly_name 2015-11-16 22:51:21 -08:00
Jonathan Wong
69a3b5134f Switch recently added to only use activity pinger
* Fixed activity pinger logic for grouping notifications
2015-11-16 21:19:04 -08:00
Jonathan Wong
53044c75dd Add setting for recently added notification delay 2015-11-16 21:17:47 -08:00
Jonathan Wong
12056ac2ba Get server name as a scheduled task 2015-11-16 18:31:22 -08:00
Jonathan Wong
7c8fb58600 Change input to textarea for notification body 2015-11-15 23:51:31 -08:00
Jonathan Wong
da2e7635bd Fix notification tags removal for show and artist 2015-11-15 23:50:58 -08:00
Jonathan Wong
f8b75eadc6 Improved get server friendly name
* Add server friendly name to page title
2015-11-15 21:35:53 -08:00
Jonathan Wong
e9bc767c3b Fix username for database queries
* Get the updated username from the users table instead of the one
stored in the session_history table.
2015-11-15 20:59:04 -08:00
Jonathan Wong
1644bbd4b7 Check for IPv4 mapped IPv6 address in PMS logs 2015-11-15 10:26:03 -08:00
Jonathan Wong
18b328a387 Fix private IP address for IPv6 2015-11-15 10:17:28 -08:00
Tim van der Westhuizen
98411f0715 Move IP geolocation service. Temporary until a suitable replacement can be found. 2015-11-13 17:51:25 +02:00
JonnyWong16
fcb3474312 Merge pull request #278 from JonnyWong16/miscellaneous-fixes
Add IP address to current activity
2015-11-12 06:13:08 -08:00
Jonathan Wong
6362b51902 Add ip_address to notification options
* Also track_name
2015-11-11 14:48:59 -08:00
Jonathan Wong
d79d5d5b39 Better IP address handling for current activity 2015-11-11 09:16:28 -08:00
Jonathan Wong
80df8f6191 Add IP address to sessions for PMS 0.9.14 2015-11-11 08:59:55 -08:00
Jonathan Wong
fd9cf7017b Add IP address to current activity 2015-11-10 19:28:14 -08:00
JonnyWong16
2eed2d54ca Merge pull request #274 from JonnyWong16/miscellaneous-fixes
Add more metadata options to notifications
2015-11-09 19:16:08 -08:00
Jonathan Wong
0c33e7492a Open notifier description links in new window 2015-11-09 17:55:37 -08:00
Jonathan Wong
dd137e5c36 Minor notifier text changes 2015-11-08 15:44:59 -08:00
Jonathan Wong
dea9663adf Add more metadata options to notifications 2015-11-08 15:38:30 -08:00
Tim van der Westhuizen
767dd20bdc Make sure we set the PMS client identifier when auto verifying servers at first run. 2015-11-06 17:18:22 +02:00
Tim
c350943041 Add some debug logging for websocket timeline events. 2015-11-05 22:49:05 +02:00
drzoidberg33
c60340d88b Merge pull request #269 from JonnyWong16/miscellaneous-fixes
Miscellaneous fixes
2015-11-02 23:17:41 +02:00
drzoidberg33
276c0e5c7d Merge pull request #267 from onedr0p/feature/telegram_notifications
Feature/telegram notifications
2015-11-02 23:11:55 +02:00
Jonathan Wong
054f116017 Fix title encode for Pushover notifications 2015-11-01 20:38:22 -08:00
Jonathan Wong
e9017a8342 Escape double quotes in search query 2015-11-01 20:37:28 -08:00
Devin Buhl
9cff20ca16 set text format on encode 2015-11-01 11:03:36 -05:00
Devin Buhl
6cbfacaeae added event / suject to notifcation text 2015-10-31 01:59:13 -04:00
devin
8ebfa20db0 Fixed notifications, and added strings to describe bot token and chat id 2015-10-28 20:36:09 -04:00
devin
5beb4876fb removed telegram lib, updated wording, and used a simple request for sending the notif 2015-10-28 20:28:41 -04:00
devin
c723d33d38 telegram updates to notifiers.py 2015-10-28 07:31:07 -04:00
devin
f75fca12c8 telegram updates to config.py 2015-10-28 07:30:41 -04:00
devin
8671707e4d added telegram lib from repo leandrotoledo/python-telegram-bot 2015-10-28 07:29:57 -04:00
drzoidberg33
a9316ebea1 Merge pull request #265 from drzoidberg33/ip-lookup-provider
Change IP lookup provider
2015-10-28 13:06:35 +02:00
Tim van der Westhuizen
ef86740466 Change order of location details in IP lookup. 2015-10-27 15:25:40 +02:00
Tim van der Westhuizen
57cb755668 Change IP lookup provider to Telize.com which supply an SSL endpoint. 2015-10-27 13:53:47 +02:00
JonnyWong16
aa75cf2b73 Merge pull request #259 from JonnyWong16/recently-added
Recently added
2015-10-26 18:04:11 -07:00
Jonathan Wong
3f8224fec5 List notifications agents alphabetically 2015-10-26 18:00:51 -07:00
Jonathan Wong
0b67abb2a2 Fix typos 2015-10-26 17:52:51 -07:00
Jonathan Wong
872ef2771e Fix double recently added episode notifications 2015-10-25 22:00:51 -07:00
Jonathan Wong
3b457304e9 Fix build_notify_text again
* Separate session and timeline
2015-10-25 21:12:19 -07:00
Jonathan Wong
974c672a87 Format code 2015-10-25 17:38:41 -07:00
Jonathan Wong
b9f47df930 Update activity_pinger for recently added 2015-10-25 17:21:49 -07:00
Jonathan Wong
4c388f60d6 Add config to group recently added by grandparent 2015-10-25 13:30:25 -07:00
Jonathan Wong
d6b31dc542 Set on_created notification in database 2015-10-25 12:20:00 -07:00
Jonathan Wong
539cd60e92 Fix notification_handler 2015-10-24 21:23:19 -07:00
Jonathan Wong
056bcd1488 Update notification handler for timeline events 2015-10-24 21:23:03 -07:00
Jonathan Wong
1c58a47073 Update websocket and handler for timeline events 2015-10-24 21:22:46 -07:00
Jonathan Wong
32cf1ada8b Add config settings for on_created
* Note: on_created is recently added
2015-10-24 21:22:29 -07:00
Jonathan Wong
968132099e Change metadata 'type' to 'media_type' 2015-10-24 21:18:09 -07:00
Tim van der Westhuizen
7b3874dcaa Add Plex Media Player icon. 2015-10-23 11:37:13 +02:00
Tim van der Westhuizen
0302b2412a Fix platform overrides for graphs. 2015-10-22 18:12:50 +02:00
Tim van der Westhuizen
4ac5329019 Add Konvergo to platform name overrides. 2015-10-22 17:45:23 +02:00
Tim van der Westhuizen
37bc68573c Implement IFTTT notification option. PR #241. 2015-10-22 16:04:31 +02:00
Tim
dc8996c4d2 Escape single quotes for usernames on user stats page. 2015-10-21 22:06:02 +02:00
drzoidberg33
1ef9d72534 Merge pull request #256 from JonnyWong16/miscellaneous-fixes
Miscellaneous fixes
2015-10-20 13:15:49 +02:00
Jonathan Wong
db7225fbad Clean up code 2015-10-20 00:48:26 -07:00
Jonathan Wong
2c354ad783 Fix bug in search query 2015-10-18 17:47:21 -07:00
Jonathan Wong
b96abc8853 Add detailed logger messages for database queries 2015-10-18 13:53:23 -07:00
Jonathan Wong
c4dc81e8fb Change order args are created for datatable query
* Make sure search filter args are created after custom_where
2015-10-18 13:29:29 -07:00
Jonathan Wong
be753983fe Fix breadcrumbs for update metadata page 2015-10-18 13:14:22 -07:00
Jonathan Wong
1bcb34d7eb Add button to fix metadata on info pages 2015-10-18 13:02:16 -07:00
Jonathan Wong
2243cd1de9 Add filtering of media_type from history table 2015-10-18 11:50:01 -07:00
Jonathan Wong
1ff58a85dc Fix bug in "Last Watched" statistics
*Fix if two users watched the same item, it would only show the most
recent user.
2015-10-18 10:27:18 -07:00
Tim
428706d9a7 Merge branch 'dev' 2015-10-18 00:27:41 +02:00
Tim
5967636ef9 v1.2.3 2015-10-18 00:26:44 +02:00
drzoidberg33
ddc9563de9 Merge pull request #252 from JonnyWong16/miscellaneous-fixes
Miscellaneous fixes
2015-10-16 16:40:23 +02:00
Jonathan Wong
3d1a1b5e45 Fix watch stats not showing on homepage 2015-10-15 18:02:28 -07:00
Jonathan Wong
60b330573e Increase width of user watch time stats 2015-10-13 20:59:24 -07:00
Jonathan Wong
76c1558473 Add {remaining_duration} to notifications
* Also clean up/reorder notification parameters
2015-10-13 20:42:26 -07:00
Tim
5fe47d797f v1.2.2 2015-10-12 20:22:39 +02:00
Tim
dd5ba05c88 v1.2.1 2015-10-12 20:19:58 +02:00
drzoidberg33
26d825dc09 Merge pull request #239 from JonnyWong16/miscellaneous-fixes
Notification agent sounds
2015-10-12 12:01:20 +02:00
Jonathan Wong
3299ec7c82 Clean up Pushover sound code 2015-10-12 00:54:26 -07:00
Jonathan Wong
c25c48c1a6 Add watched percent to history table tooltip 2015-10-12 00:28:05 -07:00
Jonathan Wong
2680162b67 Add dropdown for Boxcar sounds 2015-10-11 23:48:12 -07:00
Jonathan Wong
7d3d2957c3 Add dropdown for Pushover sounds 2015-10-11 23:45:58 -07:00
Jonathan Wong
c12862ffba Add select dropdown to notification agents
* Change priority selections to dropdown
2015-10-11 22:36:00 -07:00
Jonathan Wong
9968f8b6dd Clean up home_stats code 2015-10-11 17:58:17 -07:00
Jonathan Wong
2ea6ae648c Order sync table by State > User > Title 2015-10-11 17:58:02 -07:00
drzoidberg33
75f6ed3fc1 Merge pull request #228 from BrianInAz/pushover-sounds
Added ability to set custom notification sound for Pushover
2015-10-07 20:47:20 +02:00
drzoidberg33
39c5156d08 Merge pull request #217 from Hellowlol/patch-1
If we fail to parse a response, log the uri
2015-10-07 20:46:04 +02:00
drzoidberg33
2f2069e0ad Merge pull request #213 from Hellowlol/gdp
Good day plex!
2015-10-07 20:45:27 +02:00
drzoidberg33
be4e8985b7 Merge pull request #200 from Hellowlol/apistuff
initial api changes
2015-10-07 20:32:31 +02:00
John
3e344ce56c fix typo 2015-10-04 20:38:37 +02:00
Brian Charbonneau
ca4e6cde3e Fixed indent. Replaced tabs with spaces 2015-10-03 23:34:33 -07:00
Brian Charbonneau
1ad982f5b7 Removed newlines 2015-10-03 23:25:57 -07:00
Brian Charbonneau
280a5ae744 Added ability to set custom notification sound for Pushover 2015-10-03 22:05:27 -07:00
Hellowlol
b1e27d9bc2 If we fail to parse a response, log the uri
and the original response
2015-10-02 20:34:47 +02:00
John
92bbf8e994 select needs name to serialize 2015-10-01 20:51:52 +02:00
drzoidberg33
cf49f4d6bf Merge pull request #220 from JonnyWong16/miscellaneous-fixes
Player in tables and top level info pages
2015-10-01 20:15:50 +02:00
Jonathan Wong
721bd606cb Change info navbar to use bootstrap breadcrumb 2015-09-30 00:00:21 -07:00
Jonathan Wong
61865ace64 Add link to top level info page from library statistics 2015-09-29 23:34:03 -07:00
Jonathan Wong
5b88058133 Add top level info pages with history table
* Movies / TV Shows / Music
2015-09-29 23:23:03 -07:00
Jonathan Wong
2616e14c83 Add "player" to tables
* Also rename user platforms to user players
* Fix other platform vs. player ambiguities
2015-09-29 22:43:23 -07:00
Jonathan Wong
f1c4bf6249 Fix current activity details for tracks 2015-09-29 20:43:08 -07:00
Jonathan Wong
e884d018ed Fix indents 2015-09-29 15:52:10 -07:00
John
9d925cce03 add getSync, fix named argument 2015-09-29 23:27:19 +02:00
John
ff8d9f9f4c fix parsing of servers, remove unbound var 2015-09-29 23:16:34 +02:00
Tim
c65d8a1ec6 Merge branch 'dev' 2015-09-29 22:32:16 +02:00
Tim
2346033871 v1.2.1 2015-09-29 22:31:17 +02:00
Tim
6103d14a6f Fix for null paused_counter issue. 2015-09-29 22:27:39 +02:00
Tim
b0600402dd Merge branch 'dev' 2015-09-29 22:01:42 +02:00
Tim
8fca6352cf v1.2.0 2015-09-29 22:00:09 +02:00
drzoidberg33
34167495ed Merge pull request #218 from JonnyWong16/miscellaneous-fixes
Change to notify stopped only if less than watched percent
2015-09-29 21:28:34 +02:00
Jonathan Wong
672377ffb7 Change wording in Plex logs settings to indicate complete folder path is required 2015-09-29 10:30:01 -07:00
Jonathan Wong
441572ea12 Fix "Mystery" platform in stats and activity 2015-09-29 10:11:11 -07:00
Jonathan Wong
c12c72bbd6 Don't group history in graphs modal table 2015-09-29 10:07:47 -07:00
Jonathan Wong
dff493c8d9 Change to notify stopped only if less than watched percent
* Also fix paused notifications sending at the end of items (right
before stopping)
2015-09-29 09:24:23 -07:00
John
f7bffdc050 Add stuff to api
getLog finished
2015-09-28 23:07:45 +02:00
John
37df262b24 Good day plex! 2015-09-28 23:00:06 +02:00
Tim
f7bc208fd1 Show restart modal in settings when a change requires a restart. 2015-09-28 15:54:57 +02:00
Tim
40260c33af Fix indent. 2015-09-28 14:53:53 +02:00
Tim
138390ff59 Don't allow concurrent db actions as they may cause sqlite lockups. 2015-09-28 14:52:00 +02:00
drzoidberg33
a5ef749bce Merge pull request #211 from JonnyWong16/miscellaneous-fixes
Clean up settings styles
2015-09-28 12:07:34 +02:00
Tim
667c6fe3d1 Some more adjustments to the websocket failover retries.
Try to determine if a track was skipped and if so don't log it.
2015-09-28 11:58:20 +02:00
drzoidberg33
3320f2a2f9 Merge pull request #190 from JonnyWong16/group-history
Group history on tables
2015-09-28 11:33:38 +02:00
Jonathan Wong
59bb5139f7 Clean up settings styles
* Capitalization of titles for consistency
* Change notification agents settings text for consistency
* Fix notification agents config modal column width for line breaks
2015-09-28 00:57:13 -07:00
Jonathan Wong
c1f32674dc Change wording of group history in settings 2015-09-28 00:35:30 -07:00
Jonathan Wong
8b52548016 Fix delete mode to use list of child id's instead of loop 2015-09-27 22:43:42 -07:00
Jonathan Wong
200a85adcf Move code from monitor to activity_processor 2015-09-27 14:43:08 -07:00
Jonathan Wong
960c281659 Add icon change from plus to minus 2015-09-27 14:42:38 -07:00
Jonathan Wong
d9d04f4857 Remove href for non-expandable rows. 2015-09-27 14:17:51 -07:00
Jonathan Wong
a053789344 Fix popover cut off by modal box 2015-09-27 13:59:58 -07:00
Jonathan Wong
0784b0a0db Fix merge conflicts 2015-09-27 12:10:19 -07:00
Jonathan Wong
b84f214030 Align expand history icon 2015-09-27 12:06:59 -07:00
drzoidberg33
f15e3a47ea Merge pull request #207 from JonnyWong16/update-metadata
Update rating key for missing items
2015-09-27 21:03:14 +02:00
Jonathan Wong
82b567f15f Fix merge conflicts 2015-09-27 11:59:20 -07:00
Tim
6e2fa9a3b4 Fix plexWatch db importer.
Always return None on exception in http handler.
Increase websocket retry counts.
2015-09-27 20:48:10 +02:00
drzoidberg33
16b20976b6 Merge pull request #208 from JonnyWong16/miscellaneous-fixes
Miscellaneous fixes
2015-09-27 20:18:36 +02:00
Jonathan Wong
22a4478a06 Format code and disable button once clicked 2015-09-27 10:55:40 -07:00
Jonathan Wong
7327be1ff8 Pass audio_decision to history tables 2015-09-27 10:26:35 -07:00
Jonathan Wong
8f4034540c Update confirmation box to indicate all item will be updated 2015-09-27 00:15:16 -07:00
Jonathan Wong
45a385f36e Always match child (episode or track) by index 2015-09-27 00:06:30 -07:00
Jonathan Wong
5aa7192e90 Fix incorrect order of arguments 2015-09-27 00:06:00 -07:00
Jonathan Wong
c7d51b90c6 Update grandparent/parent/child rating keys
* Updates all rating keys for show/season/episode or artist/album/track
2015-09-26 02:45:53 -07:00
Jonathan Wong
dcb7486fd6 Fix audio transcode/stream/play icon on history tables 2015-09-25 12:13:00 -07:00
Jonathan Wong
e9585ea15d Use .png Plex logo instead of .svg
* Fix .svg not showing on some devices
2015-09-25 11:55:22 -07:00
Jonathan Wong
339361d15c Add global search feature 2015-09-25 11:38:55 -07:00
Jonathan Wong
2b9817319a Fix season search results 2015-09-25 11:38:41 -07:00
drzoidberg33
a008b09e09 Merge pull request #206 from Hellowlol/patch-1
Open compare link in new tab
2015-09-25 11:16:34 +02:00
Jonathan Wong
fb8f6ebd8c Center metadata not found error message 2015-09-25 00:36:44 -07:00
Jonathan Wong
1c3a3876e3 Update styles for confirm modal box 2015-09-25 00:26:54 -07:00
Jonathan Wong
dfd0b1bf64 Update documentation 2015-09-25 00:03:34 -07:00
Jonathan Wong
e0873ff5ad Style fixes for search/info pages 2015-09-24 23:44:02 -07:00
Jonathan Wong
1f2efedf7f Fix search URL encoding 2015-09-24 23:41:48 -07:00
Jonathan Wong
91446d01a7 Filter season search by season index 2015-09-24 23:41:15 -07:00
Jonathan Wong
c45a903f9f Add user selection to update rating key 2015-09-24 22:12:44 -07:00
Jonathan Wong
e6556eaf27 Add function to update rating keys 2015-09-24 22:11:56 -07:00
Jonathan Wong
28d05ba9fe Add seasons to search query 2015-09-24 22:09:14 -07:00
Jonathan Wong
25249e7538 Display search results if metadata not found 2015-09-24 19:33:44 -07:00
Jonathan Wong
d36de5a535 Add search functions 2015-09-24 18:42:56 -07:00
Jonathan Wong
f921035ee7 Fix ajax message alignment on datatables 2015-09-24 18:18:07 -07:00
Hellowlol
f901eaa625 Open compare link in new tab 2015-09-25 01:11:32 +02:00
Tim
9738bdcb55 Merge remote-tracking branch 'origin/dev' into dev 2015-09-23 22:57:53 +02:00
Tim
6f6541fdb8 Start the scheduler after first run wizard. 2015-09-23 22:57:35 +02:00
drzoidberg33
08959fd1e6 Merge pull request #201 from JonnyWong16/miscellaneous-fixes
More titles for ellipse text
2015-09-23 20:35:31 +02:00
Tim
89a03fb263 Fix the real reason we were getting double start notifications. 2015-09-23 19:40:22 +02:00
drzoidberg33
b9e900f540 Merge pull request #202 from drzoidberg33/websocket-testing
Some activity event fixes.
2015-09-23 19:25:03 +02:00
Tim
ed6ff9c10c Don't fire off session start until the item is playing (fixes double start notifications).
Don't try to write a temp session if we don't have any data.
2015-09-23 19:23:17 +02:00
Jonathan Wong
5da4fe953e More titles for ellipse text 2015-09-22 16:14:48 -07:00
drzoidberg33
302ca85dd3 Merge pull request #199 from drzoidberg33/websocket-testing
Initial Websocket code
2015-09-23 00:44:51 +02:00
Tim
98c0d6619a Remove some old unused code 2015-09-23 00:38:45 +02:00
Tim
9fdcc93e2e Hack things to make sure we know what is going on when clients don't send a stop event. 2015-09-23 00:25:27 +02:00
Tim
74e8d7d329 Get buffer and watched notifications working again. 2015-09-22 21:59:07 +02:00
Tim
5595ef2e20 Move activity processor code to the correct place. 2015-09-22 20:30:22 +02:00
Tim
6ee5eb13f0 Fix paused counter
Fix bad key name
2015-09-22 20:22:13 +02:00
Tim
3afa52b607 Refactor the Monitor code. 2015-09-22 20:02:11 +02:00
Tim
28227a3c35 Initial code for a more suitable websocket event handler. 2015-09-22 00:06:42 +02:00
drzoidberg33
2d671fdfc4 Merge pull request #196 from JonnyWong16/miscellaneous-fixes
Miscellaneous Fixes
2015-09-20 20:02:41 +02:00
Jonathan Wong
ff67719cf8 Add titles to homepage so ellipse text is readable 2015-09-20 09:13:41 -07:00
Tim
1761b14fe9 Merge branch 'dev' 2015-09-20 14:16:10 +02:00
Tim
8792aa6c70 v1.1.10 2015-09-20 14:15:15 +02:00
Tim
34e548cc15 Don't log some Twitter auth stuff. 2015-09-20 14:03:47 +02:00
Tim
fa25809e7a Make websocket failover if no connection can be made on startup or during runtime. 2015-09-20 13:39:04 +02:00
Tim
fa71beb03f Very early work on implementing websocket monitoring method. 2015-09-20 12:21:39 +02:00
Tim
9c955771c0 Do not include the paused time in our ignore interval logic. 2015-09-19 13:57:54 +02:00
Tim
0c6ccc5d52 Fix bug on stats type where it would always show home stats by duration. 2015-09-19 13:10:03 +02:00
Tim
7c6619ebc5 Fix Email TLS checkbox bug.
Clean up some notifier code.
2015-09-19 12:37:51 +02:00
drzoidberg33
22ed8a3a95 Merge pull request #195 from JonnyWong16/home-stats
Selective hiding home homepage statistics
2015-09-19 12:29:08 +02:00
Jonathan Wong
924ed70458 Move cards settings help text 2015-09-19 00:53:18 -07:00
Jonathan Wong
de4d8fb277 Default to show all cards until the user disables them. 2015-09-19 00:42:00 -07:00
Jonathan Wong
d61e699dc9 Remove test code 2015-09-18 23:49:34 -07:00
Jonathan Wong
ad183ff9fe Update message to prompt the user to enable cards for homepage statistics 2015-09-18 23:43:01 -07:00
Jonathan Wong
078f4babf5 Add setting to selectively hide library statistics cards on the homepage 2015-09-18 23:42:16 -07:00
Jonathan Wong
8a989d71ca Add top music and popular music cards to watch statistics 2015-09-18 18:58:59 -07:00
Jonathan Wong
78f959d39a Clean up passing unnecessary configs to homepage 2015-09-18 18:54:48 -07:00
Jonathan Wong
20056718db Add setting to selectively hide watch statistic cards on homepage 2015-09-18 18:52:46 -07:00
Tim
6eec4d1ca6 Some Twitter love. Resolves Issue #47. 2015-09-19 00:57:24 +02:00
Jonathan Wong
7c725ee424 Update grouping logic for new sessions
* Check the user's previous row to match the rating key
2015-09-18 15:00:51 -07:00
Jonathan Wong
4fa70cb234 Update grouping logic
* Check the user's previous row to match the rating key
2015-09-18 14:36:52 -07:00
Tim
483f5825db Add check for webbrowser import which may not be available in all Python builds (like certain NAS devices). 2015-09-17 21:04:10 +02:00
drzoidberg33
d23aaf91f7 Merge pull request #189 from JonnyWong16/miscellaneous-fixes
Fix for music on graphs, and fixes on homepage
2015-09-17 20:26:48 +02:00
Jonathan Wong
1f3a238ab2 Fix logic to add "Direct Stream" state to current activity 2015-09-16 15:42:45 -07:00
Jonathan Wong
060c549259 Another ambiguous column name fix 2015-09-16 13:40:47 -07:00
Jonathan Wong
626e7fdf82 Fix watched status to use watched percent specified in settings 2015-09-16 13:30:05 -07:00
Jonathan Wong
adc808ac9f Fix ambiguous column names 2015-09-16 13:11:38 -07:00
Jonathan Wong
fc75232519 Change group logic to use user_id instead of user 2015-09-16 11:52:00 -07:00
Jonathan Wong
c85ee3aec0 Update write_session_history to include the reference_id 2015-09-16 11:37:50 -07:00
Jonathan Wong
881142d4a1 Update get_history query to use the new reference_id 2015-09-16 11:37:19 -07:00
Jonathan Wong
c1b5514789 Add reference_id column to session_history
* Also update database with values from previous versions
2015-09-16 11:36:34 -07:00
Jonathan Wong
7170dbd800 Fix home stats Last Watched to use watched percent specified in settings 2015-09-16 01:13:08 -07:00
Jonathan Wong
d6c21e173d Update history table to show grouped items 2015-09-15 23:35:07 -07:00
Jonathan Wong
179eaf1bbe Rewrite get_history query for grouping 2015-09-15 23:34:42 -07:00
Jonathan Wong
8791babf8e Add settings for grouping in history table 2015-09-15 23:34:00 -07:00
Jonathan Wong
048b31c87a Fix music visible on graph only if "Log music" is enabled 2015-09-14 20:59:04 -07:00
Tim
e386d3ee21 Merge branch 'dev' 2015-09-14 20:53:09 +02:00
Tim
285946bf94 v1.1.9
Close href tag on activity pane.
Update program description.
2015-09-14 20:45:49 +02:00
drzoidberg33
578ba52215 Merge pull request #185 from JonnyWong16/miscellaneous-fixes
Add tracks to user recently watched
2015-09-14 20:23:05 +02:00
Jonathan Wong
5126c39c26 Group recently watched tracks together by album
* Also group identical movie or episode
2015-09-14 00:02:31 -07:00
Jonathan Wong
5ec9e41244 Add tracks to user recently watched
* Clean up poster styles to match info pages
2015-09-13 23:28:42 -07:00
Tim
5eebf6592a Make music items clickable in activity pane now that we have info pages. 2015-09-14 01:09:12 +02:00
Tim
7994351644 Fix broken history logging. 2015-09-14 00:58:28 +02:00
drzoidberg33
e445228b8a Merge pull request #182 from JonnyWong16/music-info-pages
Music info pages
2015-09-13 23:42:54 +02:00
drzoidberg33
46e6250329 Merge pull request #183 from JonnyWong16/miscellaneous-fixes
Fix typo for location of PMS logs path
2015-09-13 23:28:23 +02:00
Jonathan Wong
2edfc1e3da Add link to music info from recently added 2015-09-13 14:09:22 -07:00
Jonathan Wong
f2024b0854 Fix typo for location of PMS logs path 2015-09-13 14:04:20 -07:00
Jonathan Wong
5f2cf6cb7a Add links for track items on tables 2015-09-13 13:33:09 -07:00
Jonathan Wong
73664b6a03 Update info page to show music info 2015-09-13 13:32:44 -07:00
Jonathan Wong
af131ce16d Change code to get generic library children items
* Merge the separate season list and episode list
2015-09-13 13:31:51 -07:00
Jonathan Wong
414c4c2ffa Add artist, album, and track metadata 2015-09-13 13:29:04 -07:00
drzoidberg33
d2cdc2cea2 Merge pull request #180 from JonnyWong16/miscellaneous-fixes
Add photos to current activity
2015-09-13 20:09:26 +02:00
Jonathan Wong
b860f9a5e8 Add photos to current activity
* Also fix BIF fade in
2015-09-12 23:09:01 -07:00
drzoidberg33
e5535b6167 Merge pull request #177 from JonnyWong16/miscellaneous-fixes
Fix paused time on graphs and other miscellaneous items
2015-09-13 01:44:46 +02:00
Jonathan Wong
6359c02c80 Fix PMS Token input error message on settings page 2015-09-11 21:17:11 -07:00
Jonathan Wong
1c589fbefa Change season and episode number in history table item title
* For seasons/episodes of any number of digits
2015-09-11 21:09:48 -07:00
Jonathan Wong
b768ad8a19 Fix Mystery platform names in graphs 2015-09-11 17:41:25 -07:00
Jonathan Wong
60878ed12e Add table name session_history to paused_counter in watch stats query 2015-09-11 15:40:24 -07:00
Jonathan Wong
328d744efd Swap order of History and Users in the navbar 2015-09-11 15:19:30 -07:00
Jonathan Wong
92a868c3c6 Clean up watch statistics duration database queries 2015-09-11 13:35:50 -07:00
Jonathan Wong
7b9210a5fc Add music to graphs
* Separate out TV, movies, and music on bar graphs
* Separate out direct play, direct stream, and transcode on bar graphs
2015-09-11 13:12:33 -07:00
Jonathan Wong
fb872596d6 Fix paused time from graphs 2015-09-11 11:11:32 -07:00
Jonathan Wong
a43efef28a Fix write session to history only if library item
Some channel items, specifically Apple movie trailers, are counted as
movie items. Make sure the rating_key is a number to filter these out.
2015-09-10 21:30:34 -07:00
Jonathan Wong
e30e6dfe35 Fix Plex Web click through logo 2015-09-10 15:03:38 -07:00
Tim
eaadd5e2d6 Merge branch 'dev' 2015-09-09 22:20:45 +02:00
Tim
c608c7c9fc v1.1.8 2015-09-09 22:19:59 +02:00
drzoidberg33
451485d706 Merge pull request #173 from JonnyWong16/miscellaneous-fixes
Change Plex click through to app.plex.tv instead of local IP
2015-09-09 22:16:05 +02:00
Jonathan Wong
849675185d Change Plex click through to app.plex.tv instead of local IP 2015-09-09 13:13:17 -07:00
drzoidberg33
b060a23733 Merge pull request #170 from JonnyWong16/miscellaneous-fixes
Miscellaneous
2015-09-09 21:51:11 +02:00
drzoidberg33
bee9091182 Add Gitter Button to README 2015-09-09 16:49:28 +02:00
Jonathan Wong
f8e1ba6798 Add link to poster on info pages to view item in Plex/Web 2015-09-09 02:13:52 -07:00
Tim
e5ce57fead Fix bug with missing tagline field in PlexWatch db import. 2015-09-08 21:30:09 +02:00
Jonathan Wong
c9e2d1d200 Fix delete mode on info pages 2015-09-08 10:35:33 -07:00
Jonathan Wong
88b6eae3bf Add platform icons for windows and windows phone 2015-09-08 09:09:16 -07:00
drzoidberg33
c7d6ee8021 Merge pull request #166 from JonnyWong16/miscellaneous-fixes
Fix home stats title overflow
2015-09-08 00:44:26 +02:00
Jonathan Wong
7480508af2 Fix home stats title overflow 2015-09-07 15:38:34 -07:00
Tim
3fcc44aacf Merge branch 'dev' 2015-09-07 21:16:30 +02:00
Tim
fcc4575a86 v1.1.7 2015-09-07 21:15:52 +02:00
Tim
ebd0276eae Fix bug when parsing custom notification strings with unicode characters. 2015-09-07 20:43:15 +02:00
drzoidberg33
35521e127f Merge pull request #163 from JonnyWong16/miscellaneous-fixes
Fix for 5 digit library stats
2015-09-07 19:22:04 +02:00
Jonathan Wong
2c83554631 Update documentation 2015-09-06 21:13:56 -07:00
Jonathan Wong
56b717b1a1 Add transcode progress and speed to dashboard activity 2015-09-06 21:10:47 -07:00
Jonathan Wong
56f601e2a5 Add icon for play/pause/buffer state in dashboard activity 2015-09-06 15:52:47 -07:00
Jonathan Wong
3867dd7bdd Add throttled indicator to dashboard activity 2015-09-06 15:51:46 -07:00
Jonathan Wong
b7dc28c3fb Remove unnecessary console.log 2015-09-06 13:33:35 -07:00
Jonathan Wong
e6383d52ad Fix adding tagline to session_history_metadata table 2015-09-06 13:21:08 -07:00
Jonathan Wong
0a2ebb8815 Add tagline for newly watched items 2015-09-06 12:57:51 -07:00
Jonathan Wong
e44a0fed22 Fix tagline only if type is movie 2015-09-06 12:46:46 -07:00
Jonathan Wong
2d7585d64b Add tagline to movie info metadata 2015-09-06 12:31:50 -07:00
Jonathan Wong
df290d995b Make video preview thumbnails wording clearer. 2015-09-06 12:17:55 -07:00
Jonathan Wong
36ee5234b1 Revert overflow: hidden
* Accidentally hid top stats slider.
2015-09-06 11:54:31 -07:00
Jonathan Wong
48e601d5ff Restore edit username in users table
* Editing usernames was accidentally removed in e7b1e17
2015-09-06 11:20:49 -07:00
Jonathan Wong
84aa727387 Fix for 5 digit library stats 2015-09-06 11:03:47 -07:00
Tim
29204cb6ba Fix weird issue with bad merge. 2015-09-06 15:33:17 +02:00
Tim
6b75a55ce8 Merge branch 'dev'
# Conflicts:
#	data/interfaces/default/info.html
2015-09-06 15:23:38 +02:00
Tim
527e7be13d v1.1.6 2015-09-06 14:41:40 +02:00
Tim
2d739f64cf Fix some issues where some channel streams are being reported as episodes.
Fix images for activity pane when channels/clips are being played.
2015-09-06 13:49:09 +02:00
drzoidberg33
39ae387e0e Merge pull request #160 from JonnyWong16/miscellaneous-fixes
Fix mobile layout for home and info pages
2015-09-06 11:58:27 +02:00
Jonathan Wong
aaa1f0aa33 Change mobile layout for devices up to 400px wide 2015-09-05 18:08:21 -07:00
Jonathan Wong
423360e820 Simplify css for homepage mobile layout fix 2015-09-05 18:01:44 -07:00
Jonathan Wong
52fae6df0e Fix dashboard activity and home stats for mobile layout
* Specify dashboard activity as 100% width instead of a set px width
2015-09-05 17:41:48 -07:00
Jonathan Wong
58ea4a65e1 Fix info pages for mobile layout 2015-09-05 17:41:46 -07:00
drzoidberg33
82025457ba Merge pull request #157 from JonnyWong16/miscellaneous-fixes
Fix top platforms sort by duration
2015-09-05 10:16:28 +02:00
Jonathan Wong
9d60ed7174 Fix top platforms sort by duration 2015-09-04 23:03:16 -07:00
drzoidberg33
d67f903107 Merge pull request #146 from JonnyWong16/server-stats
Rename server statistics to library statistics
2015-08-30 22:02:04 +02:00
Jonathan Wong
389ce97d03 Rename server statistics to library statistics 2015-08-30 11:01:52 -07:00
Tim
98f5c33af7 Fix album art on recently added. 2015-08-30 17:54:45 +02:00
drzoidberg33
dceab3791f Merge pull request #145 from JonnyWong16/server-stats
Initial implementation of server statistics
2015-08-30 17:46:04 +02:00
Jonathan Wong
d44bd2f35b Shift secondary count right to account for 4 digit items 2015-08-29 13:24:44 -07:00
Jonathan Wong
82fc314b35 Another 1px off fix 2015-08-29 13:20:21 -07:00
Jonathan Wong
6ff902e653 Fix playcounts 1px off 2015-08-29 13:16:03 -07:00
Jonathan Wong
0245668907 Add "items" text 2015-08-29 13:15:29 -07:00
Jonathan Wong
3436175223 Initial implementation of server statistics 2015-08-29 12:15:11 -07:00
Tim
8138c27242 Fix reversed column names on user history table. 2015-08-29 00:59:51 +02:00
Tim
5705e677d4 fixed conflicts 2015-08-29 00:32:52 +02:00
Tim
c2417de895 Add "Local" as the default unauthenticated user to the local database. 2015-08-29 00:18:09 +02:00
Jonathan Wong
9b03ffbaa1 Fix season_list 2015-08-28 13:05:45 -07:00
Jonathan Wong
53c98d0acc Fix typo 2015-08-28 11:32:58 -07:00
Tim
883a183208 Fix broken bif indexes on activity pane.
Fix incorrect video dimensions when media transcoded on activity pane.
2015-08-28 11:40:22 +02:00
Jonathan Wong
85a3f15531 Fix platform_type missing for last watched home stats 2015-08-28 01:31:35 -07:00
Jonathan Wong
28d136075c Add Last Watched to home stats 2015-08-27 18:30:43 -07:00
Jonathan Wong
a682cd31af Remove video fields from stream info modal if item is a track 2015-08-27 15:38:39 -07:00
Jonathan Wong
9fc44f793b Change episodes default to art on dashboard 2015-08-27 15:31:54 -07:00
Jonathan Wong
16b1b2a781 Add episode number to info navbar 2015-08-27 14:41:12 -07:00
drzoidberg33
6e14c08570 Merge pull request #142 from JonnyWong16/top-lists
Dashboard activity
2015-08-27 23:32:52 +02:00
drzoidberg33
b5f1475a90 Merge pull request #141 from JonnyWong16/tables
Tables
2015-08-27 23:06:16 +02:00
Jonathan Wong
8efb37c4ec Fix merging conflict 2015-08-27 14:02:16 -07:00
Jonathan Wong
ab78b59f61 Update graphs history table modal
* Tooltips
* Stream details modal
2015-08-27 13:57:53 -07:00
Jonathan Wong
e7b1e177d2 Fix group purge on users table to remember state on table redraw
* Changed popover to alert box
* Changed button colour
2015-08-27 13:57:50 -07:00
Jonathan Wong
e41fa7a08e Make sure buttons are cleared when entering delete mode 2015-08-27 13:57:48 -07:00
Jonathan Wong
0f10c21a66 Change alert and button color on info and user history tables 2015-08-27 13:57:46 -07:00
Tim
f2b9984cd6 fixed conflicts 2015-08-27 22:34:09 +02:00
Jonathan Wong
99dd133a9a Increase home stats card width to match dashboard activity 2015-08-27 13:00:40 -07:00
Jonathan Wong
7bbcc575b0 Style current activity to match Plex/Web 2015-08-27 12:50:31 -07:00
Tim
0fded38bfb fix conflicts 2015-08-27 21:49:53 +02:00
drzoidberg33
88a651645a Merge pull request #139 from JonnyWong16/miscellaneous-fixes
Create body container so scrollbar is beneath navbar
2015-08-27 21:11:13 +02:00
Jonathan Wong
60380c6a99 Add season list to show page, and watch history to season page 2015-08-27 00:48:10 -07:00
Jonathan Wong
298d98cee9 Fix settings page error alerts 2015-08-27 00:05:43 -07:00
Jonathan Wong
b91a4844e0 Cleanup dashboard activity styles 2015-08-26 23:45:19 -07:00
Jonathan Wong
f00de8e548 Another clipping text fix 2015-08-26 20:41:05 -07:00
Jonathan Wong
dfbf435c77 Fix clipping on long titles 2015-08-26 20:34:06 -07:00
Jonathan Wong
dd7390d111 Fix box shadow on slider 2015-08-26 20:17:42 -07:00
Jonathan Wong
73125153c8 Update graphs history table modal
* Tooltips
* Stream details modal
2015-08-26 19:36:08 -07:00
Jonathan Wong
c08d581df3 Fix group purge on users table to remember state on table redraw
* Changed popover to alert box
* Changed button colour
2015-08-26 18:20:29 -07:00
Jonathan Wong
ef5d9d6604 Make sure buttons are cleared when entering delete mode 2015-08-26 18:18:40 -07:00
Jonathan Wong
84ffcc7948 Change alert and button color on info and user history tables 2015-08-26 17:56:17 -07:00
Jonathan Wong
53830a7711 Fix info navbar overflow 2015-08-26 17:29:05 -07:00
Jonathan Wong
a126703f44 Fix content-wrapper background 2015-08-26 17:29:02 -07:00
Jonathan Wong
6720d696eb Fix typo 2015-08-26 17:29:00 -07:00
Jonathan Wong
7328fcd0fb Create body container so scrollbar is beneath navbar 2015-08-26 17:28:55 -07:00
Jonathan Wong
1e57e952db Overhaul of info pages
* Updated style to match Plex/Web
* Full page background art
* Larger posters
* Navigation bar
2015-08-26 17:01:17 -07:00
Jonathan Wong
d627e0efdb Create body container so scrollbar is beneath navbar 2015-08-26 16:23:54 -07:00
Jonathan Wong
2193d06363 Only toggle top lists on click
Fixed borders on the slider
2015-08-26 16:04:06 -07:00
Jonathan Wong
3fc573bd90 Remove console.log and more css cleanup 2015-08-26 16:04:04 -07:00
Jonathan Wong
9b9088bd5e Fixed alert messages on settings validation 2015-08-26 16:04:02 -07:00
Jonathan Wong
53fb8b999f Added chevrons and more reliable animations 2015-08-26 16:04:00 -07:00
Jonathan Wong
58efd299cc Add setting to change the number of items in the top lists 2015-08-26 16:03:58 -07:00
Jonathan Wong
8ae2f718f4 Initial implementation of homepage top lists
* Top lists for all stats, default max 5 items
2015-08-26 16:03:56 -07:00
Tim
ff0ed1abe4 Fix info pages bugging out if non-existent rating key is passed. 2015-08-27 00:35:29 +02:00
Tim
41e1fee4b4 Match user refreshes on user_id not username as it causes issues if usernames change. 2015-08-26 23:53:42 +02:00
Tim
b308e92c9d Merge branch 'dev' 2015-08-26 12:26:43 +02:00
Tim
82808cdc97 v1.1.5 2015-08-26 12:26:02 +02:00
Tim
6d5e7135ae v1.1.4 2015-08-26 12:08:50 +02:00
Tim
4a75e372d9 v1.1.4
Version number increment.
2015-08-26 11:54:19 +02:00
Tim
a37ca3f29c v1.1.4
Hide show/hide option on users table until it does something.
2015-08-26 11:52:51 +02:00
Tim
9016fc41f9 Add user submitted systemd scripts. 2015-08-26 11:28:07 +02:00
Tim
f56ba300ac Don't refresh users on every config save.
Don't reschedule all tasks on every config save.
Send pre-formatted month+year string for monthly total plays graph.
2015-08-26 00:11:20 +02:00
drzoidberg33
0a850fc3af Merge pull request #134 from JonnyWong16/history-tables
Change alert message and button colour
2015-08-25 23:52:57 +02:00
Jonathan Wong
5124ebfe16 Change alert message and button colour 2015-08-25 14:43:08 -07:00
drzoidberg33
4de252d8e4 Merge pull request #126 from JonnyWong16/history-tables
History tables
2015-08-25 22:29:26 +02:00
Jonathan Wong
c5237547cf Fixed thumbnail for high DPI screens 2015-08-25 12:31:36 -07:00
Jonathan Wong
af85d36762 Also remember state on user history and info pages 2015-08-24 14:38:54 -07:00
Jonathan Wong
41c94741e2 Remember selected delete state on table redraw 2015-08-24 14:21:21 -07:00
drzoidberg33
8b07b53b43 Merge pull request #127 from JonnyWong16/miscellaneous-fixes
Miscellaneous fixes
2015-08-24 18:34:35 +02:00
Jonathan Wong
445dd1250f Revert "Fix season info page episode picture dimensions" 2015-08-24 04:04:30 -07:00
Jonathan Wong
4df8014102 Revert "Fix size of posters pulled from Plex"
This reverts commit 81a8d93336.

Conflicts:
	data/interfaces/default/home_stats.html
2015-08-24 03:57:18 -07:00
drzoidberg33
35320649db Merge pull request #124 from JonnyWong16/edit-users
Add modal confirm box for purging of individual user history
2015-08-24 12:32:02 +02:00
Jonathan Wong
c62ec71cfc Simplify css for hover borders 2015-08-23 23:41:57 -07:00
Jonathan Wong
b685d17969 Make user profile picture a link on users table 2015-08-23 23:41:35 -07:00
Jonathan Wong
ba5fd4b9d3 Fix season info page episode picture dimensions 2015-08-23 23:26:28 -07:00
Jonathan Wong
79757da2b1 Update user images 2015-08-23 23:25:55 -07:00
Jonathan Wong
77f5224e13 Moved settings around to more logical locations 2015-08-23 23:23:23 -07:00
Jonathan Wong
31805e39e6 Change class name for consistency 2015-08-23 17:46:44 -07:00
Jonathan Wong
ff6d43c398 Fixed numbers swapped 2015-08-23 17:06:05 -07:00
Jonathan Wong
81a8d93336 Fix size of posters pulled from Plex 2015-08-23 15:58:16 -07:00
Jonathan Wong
609549f974 Also add group delete to user history and info pages 2015-08-23 15:33:41 -07:00
Jonathan Wong
7ba6d704cd Add group delete feature to history table
* This helps to prevent accidental row deletes
2015-08-23 15:27:36 -07:00
Jonathan Wong
0ff1b4d5dd Add modal confirm box for purging of individual user history 2015-08-23 14:37:42 -07:00
Tim
7eac521369 Remove max width restriction on home stats cards. 2015-08-23 23:01:10 +02:00
drzoidberg33
1d8a16f3c4 Merge pull request #120 from JonnyWong16/edit-users
Fix popover relocating on window resizing
2015-08-23 22:35:20 +02:00
Jonathan Wong
685f8cabdb Fix popover relocating on window resizing
Also stay under the navbar if scrolling down the page.
2015-08-23 11:20:36 -07:00
drzoidberg33
70141eda22 Merge pull request #118 from JonnyWong16/edit-users
Add group editing of users from the user table
2015-08-23 15:52:50 +02:00
Jonathan Wong
0204478483 Add group editing of users from the user table
From the user table, you can now:
* Change the friendly name
* Toggle notifications
* Toggle keep history
* Purge all user history (as a group selection)
2015-08-23 04:32:42 -07:00
drzoidberg33
79f317709b Merge pull request #111 from JonnyWong16/info-pages
Info pages
2015-08-23 00:18:25 +02:00
drzoidberg33
0f04a6d25b Merge pull request #110 from drzoidberg33/revert-108-info-pages
Revert "Info pages"
2015-08-23 00:09:29 +02:00
drzoidberg33
2d19accdd1 Revert "Info pages" 2015-08-23 00:08:55 +02:00
drzoidberg33
3d5706002d Merge pull request #108 from JonnyWong16/info-pages
Info pages
2015-08-23 00:08:50 +02:00
Tim
ac3bafcd02 Fix stream_duration when notify state is play. 2015-08-22 23:57:17 +02:00
Tim
ac9a8b85ec Fix stream_duration if no paused_duration and format correctly. 2015-08-22 22:11:47 +02:00
Tim
abec036cb2 v1.1.3 2015-08-22 17:11:04 +02:00
drzoidberg33
8bdd40f011 Merge pull request #105 from JonnyWong16/history-tooltips
History tooltips
2015-08-22 16:32:52 +02:00
drzoidberg33
b98c17e738 Merge pull request #104 from JonnyWong16/stream_duration-notification
Stream duration notification option
2015-08-22 16:32:35 +02:00
Jonathan Wong
a71c6e6592 Fix Air date and runtime 2015-08-22 05:24:06 -07:00
Jonathan Wong
545b7cb581 Remove grandparent_rating_key from season media type 2015-08-22 05:24:02 -07:00
Jonathan Wong
0848e317ee Add links to info pages to move between show / season / episode
* Clicking poster moves up one level
* Links in titles of season and episodes
2015-08-22 05:18:33 -07:00
Jonathan Wong
e976e6cf5c Added more detail to history items
* Year for movies
* Season and episode number for episodes
* Album name for tracks
2015-08-22 05:17:30 -07:00
Jonathan Wong
95cd2b4f81 Forgot semicolon 2015-08-22 03:13:23 -07:00
Jonathan Wong
3df73dc287 Implement changes to history table to user tables
* Add tooltips
* Change icons
2015-08-22 01:20:57 -07:00
Jonathan Wong
3a703eb605 Move icons to the left
* Added icons for "direct play" and "direct stream"
* Separate icons for "movie" and "episode"
2015-08-22 01:20:11 -07:00
Jonathan Wong
e94c00ca48 Fix history table on info pages 2015-08-22 01:17:58 -07:00
Jonathan Wong
d6a34b3e6b Get thumbnails for tooltips in history table 2015-08-21 03:56:47 -07:00
Jonathan Wong
3cbf05d54a Update settings page to show available stream_duration 2015-08-21 03:07:18 -07:00
Jonathan Wong
cba8608c23 Adds stream_duration to notification options 2015-08-21 02:59:49 -07:00
Jonathan Wong
e34865d0dd Initial implementation of tooltips in history table
* Move transcode icon to platform column
* Tooltips for transcode icon and media type icon
* Popover for album art when hover over title
2015-08-20 21:55:11 -07:00
drzoidberg33
b2a7f639bb Merge pull request #100 from JonnyWong16/dev
Some more changes
2015-08-20 22:10:11 +02:00
JonnyWong16
fcbc921470 Fix delete history row only if the button is clicked
History row was deleting even when clicking in the table cell outside
the button.
2015-08-20 12:13:54 -07:00
JonnyWong16
5168d76e86 Add "Last Platform" and "Last Watched" to user data tables 2015-08-20 12:13:52 -07:00
JonnyWong16
968d213b97 Fix platform text clickable and swap column order
Other minor changes to history tables:
* hidden columns with  smaller screen size
* font colour
2015-08-20 12:13:51 -07:00
JonnyWong16
9fc4573c42 Show 0 mins with 0 plays on user page. 2015-08-20 12:13:49 -07:00
drzoidberg33
9adf5cc39a Merge pull request #96 from JonnyWong16/dev
More stylized homepage statistics and other style changes
2015-08-19 23:29:58 +02:00
JonnyWong16
2ca04f4a8b Missed a file in last commit 2015-08-19 13:54:11 -07:00
JonnyWong16
fd3b2a48f9 Revert home stats poster size. 2015-08-19 13:53:23 -07:00
JonnyWong16
01b3ae377b Add clear search button to data tables. 2015-08-19 13:25:29 -07:00
JonnyWong16
5a1516286c Changes to info pages
* Style changes
* Added missing metadata
* Don't show metadata field if data is unavailable
2015-08-19 01:13:55 -07:00
JonnyWong16
317a9f0b8e Dynamically adjust user recently watched items
Only show one row of recently watched items which adjusts to the window
size, similar to recently added items.
2015-08-19 00:51:27 -07:00
JonnyWong16
c98505038a Fallback to show poster if season poster is unavailable. 2015-08-19 00:50:19 -07:00
JonnyWong16
1ec1edefdd More style changes across site 2015-08-18 19:05:14 -07:00
JonnyWong16
aa351bd965 Fixed graphs days text not updating with cookies. 2015-08-18 17:05:34 -07:00
JonnyWong16
519ff6b203 Fixed default Gravatar on homepage. 2015-08-18 16:47:49 -07:00
JonnyWong16
5b2beb2b81 More stylized homepage statistics
Also fixed some formatting on user page and posters on info page.
2015-08-18 16:44:17 -07:00
Tim
13e6a70a30 Fix typo on user edit page.
Change styling of version number and changelog button.
2015-08-19 00:03:49 +02:00
Tim
7e99eb7a2a Update README. 2015-08-18 23:39:20 +02:00
Tim
6efaabb630 Remove some more Headphones references. 2015-08-18 23:27:09 +02:00
Tim
2536fdf17b Fix month display showing "invalid date" on totals graph.
Make duration on home stats human readable.
2015-08-18 22:59:24 +02:00
drzoidberg33
7e8a427107 Merge pull request #95 from JonnyWong16/dev
Update to homepage statistics
2015-08-18 22:50:29 +02:00
JonnyWong16
bbaf428fd8 Fix "Select columns" button text 2015-08-18 13:41:34 -07:00
JonnyWong16
7dfd063138 Update documentation for home stats 2015-08-18 12:36:10 -07:00
JonnyWong16
5c94b21bd1 Update to homepage statistics
* Added most popular movie to homepage
* New setting to toggle statistics based on play duration instead of
play count
2015-08-18 12:32:41 -07:00
drzoidberg33
58474d9565 Merge pull request #87 from JonnyWong16/dev
Use cookies to save graph state.
2015-08-18 13:36:30 +02:00
JonnyWong16
6cb1c057cf Another update to recently added and recently watched.
Recently added albums now include artist name.
Recently watched episodes now include show name.
2015-08-18 02:26:52 -07:00
JonnyWong16
22cc06dec3 Fixed tab spacing 2015-08-17 16:25:27 -07:00
JonnyWong16
357797df6b Use cookies to save graph state.
The selected graph state is remembered on refreshing the graph page.
2015-08-17 16:23:45 -07:00
Tim
4c6f6ca736 Clearer version info in Settings menu.
Rudimentary changelog reader (Settings menu -> General)
Reverse the changelog order - newer changes first.
2015-08-18 01:05:12 +02:00
drzoidberg33
c0214f1489 Merge pull request #83 from JonnyWong16/dev
Fixed recently added and recently watched posters.
2015-08-17 22:38:31 +02:00
JonnyWong16
dd27f9bf72 Fixed recently added and recently watched posters.
Changed posters to match Plex/Web style, and fixed stretching on "home
video" posters.
2015-08-17 13:03:44 -07:00
Tim
c1c7911d08 Fix IP modal on history tab of user page. 2015-08-17 21:21:02 +02:00
drzoidberg33
755e9107fa Merge pull request #79 from JonnyWong16/dev
Two digit season and episode numbers and FreeNAS init script
2015-08-17 11:19:42 +02:00
JonnyWong16
3bb6320fc1 Modified FreeBSD init script for FreeNAS 2015-08-16 23:25:14 -07:00
JonnyWong16
b5ad88ae5a Two digit season and episode numbers for notifications. 2015-08-16 23:24:52 -07:00
Tim
bbcf3bf7da Don't reset to page 1 on history row delete. 2015-08-16 23:45:17 +02:00
Tim
51e1949538 Hide delete and watched columns in column selector.
Add delete mode to user history tab too.
Some styling changes.
2015-08-16 23:30:45 +02:00
Tim
6b1a57e650 Add "delete mode" on history table allows individual rows to be deleted permanently.
Add user history purge option in edit user screen. Will remove all history for selected user.
2015-08-16 22:52:08 +02:00
Tim
8e57df53fd Report the correct version numbers. 2015-08-16 13:48:39 +02:00
Tim
cea4992331 v1.1.2 2015-08-16 13:02:38 +02:00
Tim
c98a8865d6 Fix bug where user refresh would fail under certain circumstances.
Move all user functions to it's own class.
2015-08-16 12:40:32 +02:00
Tim
fd3daae491 v1.1.1 2015-08-15 21:54:43 +02:00
drzoidberg33
697d107952 Merge pull request #71 from jroyal/include-show-title-in-rec-add
Recently added TV Shows display title of the show
2015-08-15 21:49:29 +02:00
drzoidberg33
65e42be278 Merge pull request #69 from jroyal/feature-show-most-watched-movie
Most watched movie is now on home page
2015-08-15 21:48:27 +02:00
Tim
ad79d860db Allow the buffer warnings to be completely disabled by setting buffer threshold to 0.
Fix bug with buffer warnings where notification would trigger continuously after first trigger.
Fix bug where custom avatar URL would get reset on every user refresh.
2015-08-15 21:30:31 +02:00
James Royal
5826a823a8 Add parent_title to the docs of recently_added.html 2015-08-15 13:52:50 -05:00
James Royal
cbec1e7768 Recently added TV Shows display title of the show 2015-08-15 13:28:32 -05:00
James Royal
40f72bbe5f Most watched movie is now on home page 2015-08-15 12:26:37 -05:00
Tim
699f481308 v1.1.0 2015-08-15 18:20:53 +02:00
Tim
411c28a10b Fix bug when updating user profile pic without user_id. 2015-08-15 17:49:54 +02:00
drzoidberg33
375bd733f1 Merge pull request #66 from jroyal/feature-allow-custom-profile-pic
Feature allow custom profile pic
2015-08-15 15:59:02 +02:00
Tim
a96482ee3c New pause, resume and buffer notification options.
Reworked notification config in settings menu.
2015-08-15 14:37:27 +02:00
James Royal
5fa6489733 Remove unneeded print statement 2015-08-14 23:56:29 -05:00
James Royal
804a667b19 New profile URLs are saved to the database 2015-08-14 23:52:28 -05:00
James Royal
7a7c92191d Add field to set new profile pic url. Support retrieving only. 2015-08-14 23:33:16 -05:00
Tim
b7baf1a05d Fix alignment of weekend bands on graphs. 2015-08-14 21:38:51 +02:00
Tim
c4416572cf Remove unnecessary transparency on update notification and column selection.
Keep the update message closed for 1 hour if close button is clicked. Will reset if manual update check is done.
Don't ignore user logging when doing import (we still need an option in the import to override this).
2015-08-14 20:15:30 +02:00
drzoidberg33
5062c6e67a Merge pull request #63 from jroyal/dev
Allow a user to change home page statistics day length
2015-08-14 19:37:49 +02:00
James Royal
3fc2f43b79 Create an option in settings to change home statistics length 2015-08-13 22:10:24 -05:00
James Royal
a0bd94397c Add 7 days button to graph page 2015-08-13 22:08:25 -05:00
Tim
ad12a85c6c Show all users in Users table even if they don't have any history. 2015-08-14 01:05:35 +02:00
Tim
e8e5a0b5ff Fix home stats not displaying even if non-TV items have been logged. 2015-08-14 00:20:30 +02:00
Tim
0877a6bf21 Add per-user history logging toggle. Uncheck to disable history logging for specific user.
On SSL cert bypass check that the method is available before allowing.
2015-08-13 23:05:09 +02:00
drzoidberg33
b0ded77571 Merge pull request #60 from drzoidberg33/master
v1.0.1
2015-08-13 19:25:59 +02:00
882 changed files with 37603 additions and 6159 deletions

1
.gitignore vendored
View File

@@ -21,6 +21,7 @@ cache/*
*.crt
*.key
*.csr
*.pem
# OS generated files #
######################

57
API.md
View File

@@ -4,24 +4,77 @@ The API is still pretty new and needs some serious cleaning up on the backend bu
## General structure
The API endpoint is `http://ip:port + HTTP_ROOT + /api?apikey=$apikey&cmd=$command`
Data response in JSON formatted.
Response example
```
{
"response": {
"data": [
{
"loglevel": "INFO",
"msg": "Signal 2 caught, saving and exiting...",
"thread": "MainThread",
"time": "22-sep-2015 01:42:56 "
}
],
"message": null,
"result": "success"
}
}
```
General parameters:
out_type: 'xml',
callback: 'pong',
'debug': 1
## API methods
### getLogs
Not working yet
Possible params: sort='', search='', order='desc', regex='', start=0, end=0
Returns the plexpy log
### getApikey
Possible params: username='', password='' (required if auth is enabled)
Returns the apikey
### getSettings
No params
Returns the config file
### getVersion
No params
Returns some version information: git_path, install_type, current_version, installed_version, commits_behind
### getHistory
possible params: user=None, user_id=None, ,rating_key='', parent_rating_key='', grandparent_rating_key='', start_date=''
Returns
### getMetadata
Required params: rating_key
Returns metadata about a file
### getSync
Possible params: machine_id=None, user_id=None,
Returns
### getUserips
Possible params: user_id=None, user=None
### getPlayby
Possible params: time_range=30, y_axis='plays', playtype='total_plays_per_month'
### checkGithub
Updates the version information above and returns getVersion data
### shutdown
No params
Shut down plexpy
### restart
No params
Restart plexpy
### update
No params
Update plexpy - you may want to check the install type in get version and not allow this if type==exe

View File

@@ -1,10 +1,376 @@
# Changelog
## v1.0 (2015-07-11)
## v1.3.6 (2016-02-03)
* First release
* Fix: Regression where {duration} not reported in minutes.
* Fix: Proper daemonizing in FreeBSD and FreeNAS init scripts.
* Change: Update readme documentation.
## v1.0.1 (2015-07-13)
## v1.3.5 (2016-02-02)
* Fix: Removing unique constraints from database.
* Fix: Unable to expand media info table when missing "Added At" date.
* Fix: Server verification for unpublished servers.
* Fix: Updating PMS identifier for server change.
* Add: {stream_time}, {remaining_time}, and {progress_time} to notification options.
* Add: Powershell script support. (Thanks @Hellowlol)
* Add: Method to delete duplicate libraries.
* Change: Daemonize before running start up tasks.
## v1.3.4 (2016-01-29)
* Fix: Activity checker not starting with library update (history not logging).
* Fix: Libraries duplicated in database.
* Fix: Buffer notifications even when disabled when using websockets.
* Fix: Libraries and Users lists not refreshing.
* Fix: Server verification in settings.
* Fix: Empty libraries not added to database.
* Add: Unique identifiers to notification options.
* Remove: Requirement of media type toggles for recently added notifications.
* Remove: Built in Twitter key and secret.
* Change: Unnecessary quoting of script arguments.
* Change: Facebook notification instructions.
## v1.3.3 (2016-01-26)
* Fix: Plays by Month graph not loading.
* Change: Disable caching for datatables.
* Change: Improved updating library data in the database again.
## v1.3.2 (2016-01-24)
* Fix: 'datestamp' and 'timestamp' for server notifications.
* Change: New method for updating library data in database.
## v1.3.1 (2016-01-23)
* Fix: Notifiers authorization popups for reverse proxies.
* Fix: Empty brackets in titles on tables.
* Fix: Star rating overlapping text.
* Fix: Unable to startup when library refresh fails.
* Fix: Unable to parse 'datestamp' and 'timestamp' format.
* Change: Rename "Last Watched" to "Last Played".
* Change: More descriptive libraries updating message.
## v1.3.0 (2016-01-23)
* Add: Brand new Libraries section.
* Add: Lots of new library statistics.
* Add: Media info table for libraries.
* Add: Web app for Android and iOS. (Thanks @zobe123)
* Add: Slack notification agent. (Thanks @richipargo)
* Add: Facebook notification agent.
* Add: Custom script notification agent. (Thanks @Hellowlol)
* Add: Custom "From Name" to email notification agent.
* Add: Ability to test notifications / send custom one-off notifications.
* Add: 'datestamp' and 'timestamp' notification options.
* Add: More concurrent stream statistics.
* Add: Media info flags on the info pages.
* Add: Ability to fix broken metadata if the item has been moved in Plex.
* Add: Ability to rearrange the homepage statistics cards.
* Add: CentOS startup script (Thanks @PHoSawyer)
* Fix: Server name blank after first run wizard.
* Fix: Incorrect duration for grouped home stats.
* Fix: Allow SSL when verifying server in settings.
* Fix: Metadata for grouped recently added notifications.
* Fix: Unable to access settings with missing changelog file.
* Fix: Month name localization on play totals graphs.
* Fix: Get new PMS identifier when changing servers.
* Fix: Websocket log spam when there is no active session.
* Fix: Logs and cache folder not created in the data directory.
* Fix: Title links on sync table.
* Fix: Other various minor bugs and graphical glitches.
* Change: Prettier thumbnail popovers on tables.
* Change: Star ratings to use css/font-awesome.
* Change: More detailed logging info to warnings and errors.
* Change: Better PlexPy process restart handling (Thanks @jackwilsdon)
* Change: Massive behind the scenes code cleanup.
* Remove: Built in Pushover API token (User's own API token is now required).
## v1.2.16 (2015-12-22)
* Fix Most Concurrent stream stat for emtpy databases
* Change logs to 50 lines by default
## v1.2.15 (2015-12-20)
* Fix navbar covering current activity on smaller screens.
* Fix metadata for grouped recently added notifications.
* Fix Growl notification agent not working.
* Change graph days selection.
* Change watch statistics to match table history grouping.
* Add automatic discovery of Pushbullet devices.
* Add Most Concurrent Streams watch statistic.
* Add precentage to current activity progress bars.
* Add a bunch of stream details to notification options.
* Add notification for Plex Remote Access/Plex Media Server back up.
* Add CC/BCC and multiple recipients to email notification agent.
* Add total watch time to history table footer.
## v1.2.14 (2015-12-07)
* Fix regression with PlexWatch db importer and buffer warnings.
## v1.2.13 (2015-12-06)
* Fix match newlines between tags in notification text.
* Fix current activity not showing on PMS 0.9.12.
## v1.2.12 (2015-12-06)
* Fix for "too many open files" error.
## v1.2.11 (2015-12-06)
* Fix more regressions (sorry).
## v1.2.10 (2015-12-06)
* Fix broken count graphs regression.
## v1.2.9 (2015-12-06)
* Fix and improve text sanitization.
## v1.2.8 (2015-12-06)
* Fix sanitize player names
* Fix recently added notification delay
* Fix recently added metadata queries
* Fix multiple lines in notification body text
* Fix UTF-8 encoding in Prowl notifications subject line
* Change to only log IPv4 addresses
* Add global toggle for recently added notifcations
* Add feature to delete users
* Add channel support for Telegram notification agent
* Add icon for Apple tvOS
* Add icon for Microsoft Edge
## v1.2.7 (2015-11-27)
* Fix IP address option in notifications
## v1.2.6 (2015-11-27)
* Fixes for IP logging in PMS < 0.9.14.x.
* Fix issue in plexWatch importer when trying to import item with no ratingKey.
## v1.2.5 (2015-11-25)
* Add video_decision and audio_decision to notification options
* Fix IP address logging
* Fix log spam if notifications disabled
## v1.2.4 (2015-11-24)
* Add filtering by media type in the history table
* Add IFTTT notification agent
* Add Telegram notification agent
* Add notifications for recently added media
* Add notifications for server down and remote access down
* Add more metadata to notifications options
* Add IP address to notification options (for PMS 0.9.14 and above)
* Add server uptime to notification options
* Add IP address to current activity
* Add IPv6 address logging
* Add PMS server name to the page title
* Fix bug in "Last Watched" statistic
* Fix bug in search query
* Fix bug on user pages for usernames with single quotes
* Fix name for new Plex Media Center
* Fix Pushover notifications with unicode characters
* Fix bug with showing old usernames in datatables
* Fix bug with "Please verify your server" in settings
* Change IP lookup provider
* Change notifications custom body text to larger text box
* Change movie/tv logging and notifications into individual options
## v1.2.3 (2015-10-18)
* Added "remaining time" as notification substitution.
* Fix bug on home stats cards.
* Fix visual bug on user page.
## v1.2.2 (2015-10-12)
* Add server discovery on first run.
* Add column to tables for Platform.
* Add link to top level breadcrumbs on info pages.
* Add ability to change notification sounds for Pushover and Boxcar.
* Show watched percentage tooltip on progress column in history tables.
* More logging in event an http request fails.
* Code cleanups and other fixes.
* Fix ordering on sync table.
* Fix bug on home stats cards.
* Fix bug on activity pane where music details were not shown.
## v1.2.1 (2015-09-29)
* Fix for possible issue when paused_counter is null.
## v1.2.0 (2015-09-29)
* Added option to group consecutive plays in the history tables.
* Added option for websocket monitoring (still slightly experimental and disabled by default).
* Added global search option (searches your Plex library).
* Added option to update any items that may have had their rating keys changed.
* Added option to disable consecutive notifications.
* Some visual tweaks and fixes.
* Fix bug where monitoring wouldn't start up after first run.
* Fix bug showing incorrect transcode decisions for music tracks on history tables.
## v1.1.10 (2015-09-20)
* Added dedicated settings section for home stats configuration with ability to show/hide selected stats and sections.
* Added support for Twitter notifications.
* Only show music in graphs if music logging is enabled.
* The monitoring ignore interval now excludes paused time.
* Fix display bug on activity panel which incorrectly reported transcoding sometimes.
* Fix bug with Email notification TLS checkbox when it would be disabled by changing any other settings afterwards.
* Fix issue on some Python releases where the webbrowser library isn't included.
## v1.1.9 (2015-09-14)
* Another JonnyWong release. I'm going to stop thanking you now ;)
* Add music plays to graphs.
* Add info pages for music items.
* Add music to user recently watched items.
* Add photo views to Activity pane (photos are not logged).
* Fix token validation message on Settings page.
* Fix some "Mystery" platform names.
* Fix paused time be counted for graph data.
* Other small bug fixes.
## v1.1.8 (2015-09-09)
* Add platform images for Windows devices. Thanks @JonnyWong.
* Add click-through to PlexWeb preplay page from info page. Thanks @JonnyWong.
* Fix broken delete option on info pages. Thanks @JonnyWong.
* Fix tagline bug in PlexWatch db import tool.
* Fix home stats text overflow bug. Thanks @JonnyWong.
## v1.1.7 (2015-09-07)
* Show tagline in info screens for movies. Thanks @JonnyWong.
* Add play/pause/buffer icon to activity pane. Thanks @JonnyWong.
* Add transcoder info in activity pane info. Thanks @JonnyWong.
* Show transcoder progress on activity progress bar. Thanks @JonnyWong.
* Fix bug where custom notification strings would be ignored if unicode characters were present.
* Fix text overflow issue on home stats cards. Thanks @JonnyWong.
* Fix regression with user friendly name change input in edit screen. Thanks @JonnyWong.
## v1.1.6 (2015-09-06)
* Home stats cards are now expandable to show multiple items. Configurable in settings. Thanks @JonnyWong.
* Completely redesigned media info pages. Thanks @JonnyWong.
* Redesigned activity pane to match Plex Web more closely. Thanks @JonnyWong.
* New Library stats on home page, shows total item counts per library. Thanks @JonnyWong.
* New last watched card in home stats. Shows last watched items. Thanks @JonnyWong.
* Improved some layout issues on mobile devices. Thanks @JonnyWong.
* Fixed issue where some clip/channel items are reported as episodes and causing exceptions.
* Many styling improvements and fixes. Thanks @JonnyWong.
* Fixed incorrect sort on home stats platform count by duration. Thanks @JonnyWong.
* Fix issue where user refresh would continually be called as "Local" user didn't exist in database.
* Fixed styling on graph stream modal. Thanks @JonnyWong.
* Fixed some issues with users page editing. Thanks @JonnyWong.
* Fix error page when clicking through to an item that no longer exists.
## v1.1.5 (2015-08-27)
* Fix git tag being one release behind.
## v1.1.4 (2015-08-26)
* User info is now editable from the users table. Thanks @JonnyWong.
* Improved delete mode for history pages - able to multi-select now. Thanks @JonnyWong.
* Improved image quality on tooltip images.
* More styling improvements and fixes on user and info pages. Thanks @JonnyWong.
* Added some user submitted systemd init scripts. Thanks @malle-pietje and @artbird309.
* Fixed some background operations when saving settings.
* Fix max width restricting home stats to 1600px.
* Fix stream duration parameter for notifications when paused counter is null.
## v1.1.3 (2015-08-22)
* Show human readable version info and this cool changelog in Settings -> General.
* Add a "delete" mode to the history tables. Toggle it to show a delete button next to each history item.
* Two digit season and episode numbers for custom notification messages. Thanks @JonnyWong.
* New FreeNAS init script. Thanks @JonnyWong.
* Lots of styling improvements! Thanks @JonnyWong.
* Graph page remembers last selected options. Thanks @JonnyWong.
* New Popular movie homepage stats. Thanks @JonnyWong.
* Add option for duration vs play count on home stats. (Settings -> Extra Settings). Thanks @JonnyWong.
* Clean up media info pages. Don't show metadata that is missing. Thanks @JonnyWong.
* Add clear button to search inputs. Thanks @JonnyWong.
* New columns on Users list. Thanks @JonnyWong.
* New stream duration option for custom notification messages. Thanks @JonnyWong.
* Rad new tooltips on the history pages. Thanks @JonnyWong.
* And a lot of small visual changes and fixes. Thanks @JonnyWong.
* Fixed IP address modal on user history page.
* Fixed "invalid date" showing on monthly plays graph.
## v1.1.2 (2015-08-16)
* Fix bug where user refresh would fail under certain circumstances.
## v1.1.1 (2015-08-15)
* Added Most watched movie for home stats. Thanks @jroyal.
* Added TV show title to recently added text. Thanks @jroyal.
* Fix bug with buffer warnings where notification would trigger continuously after first trigger.
* Fix bug where custom avatar URL would get reset on every user refresh.
## v1.1.0 (2015-08-15)
* Add option to disable all history logging per user.
* Add option to change user avatar URL. Thanks @jroyal.
* Show all users on users table even if they don't yet have history.
* Add option to change time frame of statistics on home page (Settings -> Extra Settings). Thanks @jroyal.
* Add 7 day period for graphs. Thanks @jroyal.
* Add pause, resume and buffer warning notification options.
* Add fine tuning settings for buffer warning triggers.
* Fix issue with SSL cert verification bypass when method doesn't exist (depends on Python version).
* Fix bug on home stats which wouldn't update unless a TV show was first logged.
* Fix alignment of bands on daily graphs which highlight weekends.
* Fix behaviour of close button on update popup, will now stay closed for an hour after clicking close.
* Fix some styling niggles.
## v1.0.1 (2015-08-13)
* Allow SSL certificate check override for certain systems with bad CA stores.
* Fix typo on graphs page causing date selection to break on Safari.
* Fix typo on graphs page causing date selection to break on Safari.
## v1.0 (2015-08-11)
* First release

View File

@@ -1,4 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# This file is part of PlexPy.
#
# PlexPy is free software: you can redistribute it and/or modify
@@ -20,7 +22,7 @@ import sys
# Ensure lib added to path, before any other imports
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'lib/'))
from plexpy import webstart, logger
from plexpy import webstart, logger, web_socket
import locale
import time
@@ -64,7 +66,7 @@ def main():
# Set up and gather command line arguments
parser = argparse.ArgumentParser(
description='Python frontend for PlexWatch.')
description='A Python based monitoring and tracking tool for Plex Media Server.')
parser.add_argument(
'-v', '--verbose', action='store_true', help='Increase console logging verbosity')
@@ -151,12 +153,12 @@ def main():
# Put the database in the DATA_DIR
plexpy.DB_FILE = os.path.join(plexpy.DATA_DIR, 'plexpy.db')
# Read config and start logging
plexpy.initialize(config_file)
if plexpy.DAEMON:
plexpy.daemonize()
# Read config and start logging
plexpy.initialize(config_file)
# Force the http port if neccessary
if args.port:
http_port = args.port
@@ -191,6 +193,16 @@ def main():
# Start the background threads
plexpy.start()
# Open connection for websocket
if plexpy.CONFIG.MONITORING_USE_WEBSOCKET:
try:
web_socket.start_thread()
except:
logger.warn(u"Websocket :: Unable to open connection.")
# Fallback to polling
plexpy.POLLING_FAILOVER = True
plexpy.initialize_scheduler()
# Open webbrowser
if plexpy.CONFIG.LAUNCH_BROWSER and not args.nolaunch:
plexpy.launch_browser(plexpy.CONFIG.HTTP_HOST, http_port,

155
README.md
View File

@@ -1,107 +1,74 @@
#PlexPy
# PlexPy
[![Join the chat at https://gitter.im/drzoidberg33/plexpy](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/drzoidberg33/plexpy?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
A python based web application for monitoring, analytics and notifications for Plex Media Server (www.plex.tv).
This project is based on code from Headphones (https://github.com/rembo10/headphones) and PlexWatchWeb (https://github.com/ecleese/plexWatchWeb).
This project is based on code from [Headphones](https://github.com/rembo10/headphones) and [PlexWatchWeb](https://github.com/ecleese/plexWatchWeb).
* plexPy forum thread: https://forums.plex.tv/discussion/169591/plexpy-another-plex-monitoring-program
* PlexPy [forum thread](https://forums.plex.tv/discussion/169591/plexpy-another-plex-monitoring-program)
If you'd like to buy me a beer, hit the donate button below.
## Features
* Responsive web design viewable on desktop, tablet and mobile web browsers.
* Themed to complement Plex/Web.
* Easy configuration setup (no separate web server required).
* Monitor current Plex Media Server activity.
* Fully customizable notifications for stream activity and recently added media.
* Top statistics on home page with configurable duration and measurement metric.
* Global watching history with search/filtering & dynamic column sorting.
* Full user list with general information and comparison stats.
* Individual user information including devices IP addresses.
* Complete library statistics and media file information.
* Rich analytics presented using Highcharts graphing.
* Beautiful content information pages.
* Full sync list data on all users syncing items from your library.
* And many more!!
[![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=G9HZK9BDJLKT6)
## Installation and Support
###Support
-----------
* PlexPy Wiki: https://github.com/drzoidberg33/plexpy/wiki
###Features
-----------
* Responsive web design viewable on desktop, tablet and mobile web browsers
* Themed to complement Plex/Web
* Easy configuration setup via html form
* Current Plex Media Server viewing activity including:
* number of current users
* title
* progress
* platform
* user
* state (playing, paused, buffering, etc)
* stream type (direct, transcoded)
* video type & resolution
* audio type & channel count.
* Recently added media and how long ago it was added
* Global watching history with search/filtering & dynamic column sorting
* date
* user
* platform
* ip address (if enabled in plexWatch)
* title
* stream information details
* start time
* paused duration length
* stop time
* duration length
* percentage completed
* Full user list with general information and comparison stats
* Individual user information
- username and gravatar (if available)
- daily, weekly, monthly, all time stats for play count and duration length
- individual platform stats for each user
- public ip address history with last seen date and geo tag location
- recently watched content
- watching history
- synced items
* Rich analytics presented using Highcharts graphing
- user-selectable time periods of 30, 90 or 365 days
- daily watch count and duration
- totals by day of week and hours of the day
- totals by top 10 platform
- totals by top 10 users
- detailed breakdown by transcode decision
- source and stream resolutions
- transcode decision counts by user and platform
- total monthly counts
* Content information pages
- movies (includes watching history)
- tv shows (includes watching history)
- tv seasons
- tv episodes (includes watching history)
* Full sync list data on all users syncing items from your library
## Installation and Notes
* [Installation page](../../wiki/Installation) shows you how to install PlexPy.
* [Usage guide](../../wiki/Usage-guide) introduces you to PlexPy.
* [Troubleshooting page](../../wiki/TroubleShooting) in the wiki can help you with common problems.
**Issues** can be reported on the GitHub issue tracker considering these rules:
1. Analyze your log, you just might find the solution yourself!
2. You read the wiki and searched existing issues, but this is not solving your problem.
3. Post the issue with a clear title, description and the HP log and use [proper markdown syntax](https://help.github.com/articles/github-flavored-markdown) to structure your text (code/log in code blocks).
4. Close your issue when it's solved! If you found the solution yourself please comment so that others benefit from it.
**Feature requests** can be reported on the GitHub issue tracker too:
1. Search for similar existing 'issues', feature requests can be recognized by the label 'Request'.
2. If a similar Request exists, post a comment (+1, or add a new idea to the existing request), otherwise you can create a new one.
If you **comply with these rules** you can [post your request/issue](http://github.com/drzoidberg33/plexpy/issues).
* [Installation Guides](https://github.com/drzoidberg33/plexpy/wiki/Installation) shows you how to install PlexPy.
* [FAQs](https://github.com/drzoidberg33/plexpy/wiki/Frequently-Asked-Questions-(FAQ)) in the wiki can help you with common problems.
**Support** the project by implementing new features, solving support tickets and provide bug fixes.
## Issues
##### Many issues can simply be solved by:
- Making sure you update to the latest version.
- Turning your device off and on again.
- Analyzing your logs, you just might find the solution yourself!
- Using the **search** function to see if this issue has already been reported/solved.
- Checking the [Wiki](https://github.com/drzoidberg33/plexpy/wiki) for
[ [Installation] ](https://github.com/drzoidberg33/plexpy/wiki/Installation) and
[ [FAQs] ](https://github.com/drzoidberg33/plexpy/wiki/Frequently-Asked-Questions-(FAQ)).
- For basic questions try asking on [Gitter](https://gitter.im/drzoidberg33/plexpy) or the [Plex Forums](https://forums.plex.tv/discussion/169591/plexpy-another-plex-monitoring-program) first before opening an issue.
##### If nothing has worked:
1. Open a new issue on the GitHub [issue tracker](http://github.com/drzoidberg33/plexpy/issues).
2. Provide a clear title to easily help identify your problem.
3. Use proper [markdown syntax](https://help.github.com/articles/github-flavored-markdown) to structure your post (i.e. code/log in code blocks).
4. Make sure you provide the following information:
- [ ] Branch
- [ ] Version/Commit hash
- [ ] Your operating system and python version
- [ ] What you did?
- [ ] What happened?
- [ ] What you expected?
- [ ] How can we reproduce your issue?
- [ ] What are your (relevant) settings?
- [ ] Include a link to your **FULL** (not just a few lines!) log file that has the error. Please use [Gist](http://gist.github.com) or [Pastebin](http://pastebin.com/).
5. Close your issue when it's solved! If you found the solution yourself please comment so that others benefit from it.
## Feature Requests
1. Search for similar existing 'issues', feature requests can be recognized by the blue `enhancement` label.
2. If a similar request exists, post a comment (+1, or add a new idea to the existing request).
3. If no similar requests exist, you can create a new one.
4. Provide a clear title to easily identify the feature request.
5. Tag your feature request with `[Feature Request]` so it can be identified easily.
## License
This is free software under the GPL v3 open source license. Feel free to do with it what you wish, but any modification must be open sourced. A copy of the license is included.

View File

@@ -1,4 +1,4 @@
<%
<%
import plexpy
from plexpy import version
%>
@@ -7,7 +7,7 @@ from plexpy import version
<html lang="en">
<head>
<meta charset="utf-8">
<title>PlexPy - ${title}</title>
<title>PlexPy - ${title} | ${server_name}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
@@ -18,28 +18,133 @@ from plexpy import version
${next.headIncludes()}
<link rel="icon" type="image/x-icon" href="interfaces/default/images/favicon.ico"/>
<!-- touch icons -->
<link rel="shortcut icon" href="interfaces/default/images/favicon.png">
<link rel="apple-touch-icon" href="interfaces/default/images/icon_iphone.png">
<link rel="apple-touch-icon" sizes="72x72" href="interfaces/default/images/icon_ipad.png">
<link rel="apple-touch-icon" sizes="114x114" href="interfaces/default/images/icon_iphone@2x.png">
<link rel="apple-touch-icon" sizes="144x144" href="interfaces/default/images/icon_ipad@2x.png">
<!-- Allow web app to be run in full-screen mode. -->
<meta name="apple-mobile-web-app-capable" content="yes">
<!-- Configure the status bar. -->
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<!-- Set the viewport. -->
<meta name="viewport" content="initial-scale=1">
<!-- Disable automatic phone number detection. -->
<meta name="format-detection" content="telephone=no">
<!-- ICONS -->
<!-- IE10 icon -->
<meta name="application-name" content="PlexPy" />
<meta name="msapplication-config" content="interfaces/default/xml/IEconfig.xml"/>
<!-- Android >M39 icon -->
<link rel="manifest" href="interfaces/default/json/Android-manifest.json">
<!-- iPad retina icon -->
<link href="interfaces/default/images/res/ios/icon-76@2x.png" sizes="152x152" rel="apple-touch-icon-precomposed">
<!-- iPad retina icon (iOS < 7) -->
<link href="interfaces/default/images/res/ios/icon-72@2x.png" sizes="144x144" rel="apple-touch-icon-precomposed">
<!-- iPad non-retina icon -->
<link href="interfaces/default/images/res/ios/icon-76.png" sizes="76x76" rel="apple-touch-icon-precomposed">
<!-- iPad non-retina icon (iOS < 7) -->
<link href="interfaces/default/images/res/ios/icon-72.png" sizes="72x72" rel="apple-touch-icon-precomposed">
<!-- iPhone 6 Plus icon -->
<link href="interfaces/default/images/res/ios/icon-60@2x.png" sizes="120x120" rel="apple-touch-icon-precomposed">
<!-- iPhone retina icon (iOS < 7) -->
<link href="interfaces/default/images/res/ios/icon@2x.png" sizes="114x114" rel="apple-touch-icon-precomposed">
<!-- iPhone non-retina icon (iOS < 7) -->
<link href="interfaces/default/images/res/ios/icon.png" sizes="57x57" rel="apple-touch-icon-precomposed">
<!-- iPhone / iPod Touch -->
<link href="interfaces/default/images/res/ios/icon-60@3x.png" sizes="180x180" rel="apple-touch-icon-precomposed">
<link href="interfaces/default/images/res/ios/icon-60.png" sizes="60x60" rel="apple-touch-icon-precomposed">
<!-- Spotlight Icon -->
<link href="interfaces/default/images/res/ios/icon-40.png" sizes="40x40" rel="apple-touch-icon-precomposed">
<link href="interfaces/default/images/res/ios/icon-40@2x.png" sizes="80x80" rel="apple-touch-icon-precomposed">
<!-- iPhone Spotlight and Settings Icon -->
<link href="interfaces/default/images/res/ios/icon-small.png" sizes="29x29" rel="apple-touch-icon-precomposed">
<link href="interfaces/default/images/res/ios/icon-small@2x.png" sizes="58x58" rel="apple-touch-icon-precomposed">
<!-- iPad Spotlight and Settings Icon -->
<link href="interfaces/default/images/res/ios/icon-50.png" sizes="50x50" rel="apple-touch-icon-precomposed">
<link href="interfaces/default/images/res/ios/icon-50@2x.png" sizes="100x100" rel="apple-touch-icon-precomposed">
<!-- STARTUP IMAGES -->
<!-- iPad retina portrait startup image -->
<link href="interfaces/default/images/res/screen/ios/Default-Portrait@2x~ipad.png"
media="(device-width: 768px) and (device-height: 1024px)
and (-webkit-device-pixel-ratio: 2)
and (orientation: portrait)"
rel="apple-touch-startup-image">
<!-- iPad retina landscape startup image -->
<link href="interfaces/default/images/res/screen/ios/Default-Landscape@2x~ipad.png"
media="(device-width: 768px) and (device-height: 1024px)
and (-webkit-device-pixel-ratio: 2)
and (orientation: landscape)"
rel="apple-touch-startup-image">
<!-- iPad non-retina portrait startup image -->
<link href="interfaces/default/images/res/screen/ios/Default-Portrait~ipad.png"
media="(device-width: 768px) and (device-height: 1024px)
and (-webkit-device-pixel-ratio: 1)
and (orientation: portrait)"
rel="apple-touch-startup-image">
<!-- iPad non-retina landscape startup image -->
<link href="interfaces/default/images/res/screen/ios/Default-Landscape~ipad.png"
media="(device-width: 768px) and (device-height: 1024px)
and (-webkit-device-pixel-ratio: 1)
and (orientation: landscape)"
rel="apple-touch-startup-image">
<!-- iPhone 6 Plus portrait startup image -->
<link href="interfaces/default/images/res/screen/ios/Default-736h.png"
media="(device-width: 414px) and (device-height: 736px)
and (-webkit-device-pixel-ratio: 3)
and (orientation: portrait)"
rel="apple-touch-startup-image">
<!-- iPhone 6 Plus landscape startup image -->
<link href="interfaces/default/images/res/screen/ios/Default-Landscape-736h.png"
media="(device-width: 414px) and (device-height: 736px)
and (-webkit-device-pixel-ratio: 3)
and (orientation: landscape)"
rel="apple-touch-startup-image">
<!-- iPhone 6 startup image -->
<link href="interfaces/default/images/res/screen/ios/Default-667h.png"
media="(device-width: 375px) and (device-height: 667px)
and (-webkit-device-pixel-ratio: 2)"
rel="apple-touch-startup-image">
<!-- iPhone 5 startup image -->
<link href="interfaces/default/images/res/screen/ios/Default-568h@2x~iphone5.jpg"
media="(device-width: 320px) and (device-height: 568px)
and (-webkit-device-pixel-ratio: 2)"
rel="apple-touch-startup-image">
<!-- iPhone < 5 retina startup image -->
<link href="interfaces/default/images/res/screen/ios/Default@2x~iphone.png"
media="(device-width: 320px) and (device-height: 480px)
and (-webkit-device-pixel-ratio: 2)"
rel="apple-touch-startup-image">
<!-- iPhone < 5 non-retina startup image -->
<link href="interfaces/default/images/res/screen/ios/Default~iphone.png"
media="(device-width: 320px) and (device-height: 480px)
and (-webkit-device-pixel-ratio: 1)"
rel="apple-touch-startup-image">
</head>
<body class="content">
<div class="container">
<div id="ajaxMsg" class="ajaxMsg"></div>
% if plexpy.CONFIG.CHECK_GITHUB and not plexpy.CURRENT_VERSION:
<div id="updatebar">
<div id="updatebar" style="display: none;">
You're running an unknown version of PlexPy. <a href="update">Update</a> or
<a href="#" onclick="$('#updatebar').slideUp('slow');">Close</a>
<a href="#" id="updateDismiss">Close</a>
</div>
% elif plexpy.CONFIG.CHECK_GITHUB and plexpy.CURRENT_VERSION != plexpy.LATEST_VERSION and plexpy.COMMITS_BEHIND > 0 and plexpy.INSTALL_TYPE != 'win':
<div id="updatebar">
<div id="updatebar" style="display: none;">
A <a
href="https://github.com/${plexpy.CONFIG.GIT_USER}/plexpy/compare/${plexpy.CURRENT_VERSION}...${plexpy.LATEST_VERSION}">
href="https://github.com/${plexpy.CONFIG.GIT_USER}/plexpy/compare/${plexpy.CURRENT_VERSION}...${plexpy.LATEST_VERSION}" target="_blank">
newer version</a> is available. You're ${plexpy.COMMITS_BEHIND} commits behind. <a href="update">Update</a> or
<a href="#" onclick="$('#updatebar').slideUp('slow');">Close</a>
<a href="#" id="updateDismiss">Close</a>
</div>
% endif
<nav class="navbar navbar-fixed-top">
@@ -52,42 +157,59 @@ from plexpy import version
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="home">
<img alt="PlexPy" src="interfaces/default/images/logo-plexpy@2x.png" height="40px">
<img alt="PlexPy" src="interfaces/default/images/logo-plexpy@2x.png" height="40">
</a>
</div>
<div class="collapse navbar-collapse navbar-right" id="navbar-collapse-1">
<ul class="nav navbar-nav">
% if title=="Home":
<li class="hidden-sm hidden-xs">
<form action="search" method="post" class="form" id="search_form">
<div class="input-group">
<span class="input-textbox">
<input type="text" class="form-control" name="query" id="query" aria-label="Search" placeholder="Search..."/>
</span>
<span class="input-group-btn">
<button class="btn btn-dark btn-inactive" type="submit" id="search_button"><i class="fa fa-search"></i></button>
</span>
</div>
</form>
</li>
% if title == "Home":
<li class="active"><a href="home"><i class="fa fa-lg fa-home"></i></a></li>
% else:
<li><a href="home"><i class="fa fa-lg fa-home"></i></a></li>
% endif
% if title=="History":
<li class="active"><a href="history">History</a></li>
% if title == "Libraries" or title == "Library" or title == "Info":
<li class="active"><a href="libraries">Libraries</a></li>
% else:
<li><a href="history">History</a></li>
<li><a href="libraries">Libraries</a></li>
% endif
% if title=="Users" or title=="User":
% if title == "Users" or title == "User":
<li class="active"><a href="users">Users</a></li>
% else:
<li><a href="users">Users</a></li>
% endif
% if title=="Graphs":
% if title == "History":
<li class="active"><a href="history">History</a></li>
% else:
<li><a href="history">History</a></li>
% endif
% if title == "Graphs":
<li class="active"><a href="graphs">Graphs</a></li>
% else:
<li><a href="graphs">Graphs</a></li>
% endif
% if title=="Synced Items":
% if title == "Synced Items":
<li class="active"><a href="sync">Synced Items</a></li>
% else:
<li><a href="sync">Synced Items</a></li>
% endif
% if title=="Log":
% if title == "Log":
<li class="active"><a href="logs">Logs</a></li>
% else:
<li><a href="logs">Logs</a></li>
% endif
% if title=="Settings":
% if title == "Settings":
<li class="active"><a href="settings">Settings</a></li>
% else:
<li><a href="settings">Settings</a></li>
@@ -99,11 +221,61 @@ from plexpy import version
</div>
${next.headerIncludes()}
${next.body()}
<div class="body-container">
${next.body()}
</div>
<script src="interfaces/default/js/jquery-2.1.4.min.js"></script>
<script src="interfaces/default/js/bootstrap3/bootstrap.min.js"></script>
<script src="interfaces/default/js/script.js"></script>
<script>
$('#updateDismiss').click(function() {
$('#updatebar').slideUp('slow');
// Set cookie to remember dismiss decision for 1 hour.
setCookie('updateDismiss', 'true', 1/24);
});
if (!getCookie('updateDismiss')) {
$('#updatebar').show();
}
</script>
<script>
$('#search_form').submit(function (e) {
if ($('#query').hasClass('active') && $('#query').val().trim() != '') {
$.ajax({
type: 'post',
url: 'search',
data: { query: $('#query').val() }
})
} else {
e.preventDefault();
$('#search_button').removeClass('btn-inactive');
$('#query').clearQueue().val('').animate({ right: '0', width: '200px' }).addClass('active').focus();
}
})
$('#query').on('blur', function (e) {
if ($(this).val().trim() == '') {
$(this).delay(200).animate({ right: '-200px', width: '0' }, function () {
$('#search_button').addClass('btn-inactive');
}).removeClass('active');
}
});
</script>
<script>
// Work around for iOS web app links opening in Safari
$(document).ready(function () {
if (("standalone" in window.navigator) && window.navigator.standalone) {
// For iOS Apps
$('a').on('click', function (e) {
e.preventDefault();
var new_location = $(this).attr('href');
if (new_location != undefined && new_location.substr(0, 1) != '#' && $(this).attr('data-method') == undefined) {
window.location = new_location;
}
});
}
});
</script>
${next.javascriptIncludes()}
</body>
</html>

View File

@@ -72,9 +72,10 @@ ul.ColVis_collection {
width: 150px;
padding: 8px 8px 4px 8px;
margin: 10px 0px 0px 0px;
background-color: rgba( 88, 88, 88, 0.8 );
background-color: #444;
overflow: hidden;
z-index: 2002;
border-radius: 4px;
}
ul.ColVis_collection li {

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,401 @@
/**
* selectize.bootstrap3.css (v0.12.1) - Bootstrap 3 Theme
* Copyright (c) 20132015 Brian Reavis & contributors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the License at:
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
* ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*
* @author Brian Reavis <brian@thirdroute.com>
*/
.selectize-control.plugin-drag_drop.multi > .selectize-input > div.ui-sortable-placeholder {
visibility: visible !important;
background: #f2f2f2 !important;
background: rgba(0, 0, 0, 0.06) !important;
border: 0 none !important;
-webkit-box-shadow: inset 0 0 12px 4px #ffffff;
box-shadow: inset 0 0 12px 4px #ffffff;
}
.selectize-control.plugin-drag_drop .ui-sortable-placeholder::after {
content: '!';
visibility: hidden;
}
.selectize-control.plugin-drag_drop .ui-sortable-helper {
-webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.selectize-dropdown-header {
position: relative;
padding: 3px 12px;
border-bottom: 1px solid #d0d0d0;
background: #f8f8f8;
-webkit-border-radius: 4px 4px 0 0;
-moz-border-radius: 4px 4px 0 0;
border-radius: 4px 4px 0 0;
}
.selectize-dropdown-header-close {
position: absolute;
right: 12px;
top: 50%;
color: #333333;
opacity: 0.4;
margin-top: -12px;
line-height: 20px;
font-size: 20px !important;
}
.selectize-dropdown-header-close:hover {
color: #000000;
}
.selectize-dropdown.plugin-optgroup_columns .optgroup {
border-right: 1px solid #f2f2f2;
border-top: 0 none;
float: left;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.selectize-dropdown.plugin-optgroup_columns .optgroup:last-child {
border-right: 0 none;
}
.selectize-dropdown.plugin-optgroup_columns .optgroup:before {
display: none;
}
.selectize-dropdown.plugin-optgroup_columns .optgroup-header {
border-top: 0 none;
}
.selectize-control.plugin-remove_button [data-value] {
position: relative;
padding-right: 24px !important;
}
.selectize-control.plugin-remove_button [data-value] .remove {
z-index: 1;
/* fixes ie bug (see #392) */
position: absolute;
top: 0;
right: 0;
bottom: 0;
width: 17px;
text-align: center;
font-weight: bold;
font-size: 12px;
color: inherit;
text-decoration: none;
vertical-align: middle;
display: inline-block;
padding: 1px 0 0 0;
border-left: 1px solid rgba(0, 0, 0, 0);
-webkit-border-radius: 0 2px 2px 0;
-moz-border-radius: 0 2px 2px 0;
border-radius: 0 2px 2px 0;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.selectize-control.plugin-remove_button [data-value] .remove:hover {
background: rgba(0, 0, 0, 0.05);
}
.selectize-control.plugin-remove_button [data-value].active .remove {
border-left-color: rgba(0, 0, 0, 0);
}
.selectize-control.plugin-remove_button .disabled [data-value] .remove:hover {
background: none;
}
.selectize-control.plugin-remove_button .disabled [data-value] .remove {
border-left-color: rgba(77, 77, 77, 0);
}
.selectize-control {
position: relative;
}
.selectize-dropdown,
.selectize-input,
.selectize-input input {
color: #333333;
font-family: inherit;
font-size: inherit;
line-height: 20px;
-webkit-font-smoothing: inherit;
}
.selectize-input,
.selectize-control.single .selectize-input.input-active {
background: #ffffff;
cursor: text;
display: inline-block;
}
.selectize-input {
border: 1px solid #cccccc;
padding: 6px 12px;
display: inline-block;
width: 100%;
overflow: hidden;
position: relative;
z-index: 1;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-box-shadow: none;
box-shadow: none;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.selectize-control.multi .selectize-input.has-items {
padding: 5px 12px 2px;
}
.selectize-input.full {
background-color: #ffffff;
}
.selectize-input.disabled,
.selectize-input.disabled * {
cursor: default !important;
}
.selectize-input.focus {
-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
}
.selectize-input.dropdown-active {
-webkit-border-radius: 4px 4px 0 0;
-moz-border-radius: 4px 4px 0 0;
border-radius: 4px 4px 0 0;
}
.selectize-input > * {
vertical-align: baseline;
display: -moz-inline-stack;
display: inline-block;
zoom: 1;
*display: inline;
}
.selectize-control.multi .selectize-input > div {
cursor: pointer;
margin: 0 3px 3px 0;
padding: 1px 3px;
background: #efefef;
color: #333333;
border: 0 solid rgba(0, 0, 0, 0);
}
.selectize-control.multi .selectize-input > div.active {
background: #428bca;
color: #ffffff;
border: 0 solid rgba(0, 0, 0, 0);
}
.selectize-control.multi .selectize-input.disabled > div,
.selectize-control.multi .selectize-input.disabled > div.active {
color: #808080;
background: #ffffff;
border: 0 solid rgba(77, 77, 77, 0);
}
.selectize-input > input {
display: inline-block !important;
padding: 0 !important;
min-height: 0 !important;
max-height: none !important;
max-width: 100% !important;
margin: 0 !important;
text-indent: 0 !important;
border: 0 none !important;
background: none !important;
line-height: inherit !important;
-webkit-user-select: auto !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
}
.selectize-input > input::-ms-clear {
display: none;
}
.selectize-input > input:focus {
outline: none !important;
}
.selectize-input::after {
content: ' ';
display: block;
clear: left;
}
.selectize-input.dropdown-active::before {
content: ' ';
display: block;
position: absolute;
background: #ffffff;
height: 1px;
bottom: 0;
left: 0;
right: 0;
}
.selectize-dropdown {
position: absolute;
z-index: 10;
border: 1px solid #d0d0d0;
background: #ffffff;
margin: -1px 0 0 0;
border-top: 0 none;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
-webkit-border-radius: 0 0 4px 4px;
-moz-border-radius: 0 0 4px 4px;
border-radius: 0 0 4px 4px;
}
.selectize-dropdown [data-selectable] {
cursor: pointer;
overflow: hidden;
}
.selectize-dropdown [data-selectable] .highlight {
background: rgba(255, 237, 40, 0.4);
-webkit-border-radius: 1px;
-moz-border-radius: 1px;
border-radius: 1px;
}
.selectize-dropdown [data-selectable],
.selectize-dropdown .optgroup-header {
padding: 3px 12px;
}
.selectize-dropdown .optgroup:first-child .optgroup-header {
border-top: 0 none;
}
.selectize-dropdown .optgroup-header {
color: #777777;
background: #ffffff;
cursor: default;
}
.selectize-dropdown .active {
background-color: #f5f5f5;
color: #262626;
}
.selectize-dropdown .active.create {
color: #262626;
}
.selectize-dropdown .create {
color: rgba(51, 51, 51, 0.5);
}
.selectize-dropdown-content {
overflow-y: auto;
overflow-x: hidden;
max-height: 200px;
}
.selectize-control.single .selectize-input,
.selectize-control.single .selectize-input input {
cursor: pointer;
}
.selectize-control.single .selectize-input.input-active,
.selectize-control.single .selectize-input.input-active input {
cursor: text;
}
.selectize-control.single .selectize-input:after {
content: ' ';
display: block;
position: absolute;
top: 50%;
right: 17px;
margin-top: -3px;
width: 0;
height: 0;
border-style: solid;
border-width: 5px 5px 0 5px;
border-color: #333333 transparent transparent transparent;
}
.selectize-control.single .selectize-input.dropdown-active:after {
margin-top: -4px;
border-width: 0 5px 5px 5px;
border-color: transparent transparent #333333 transparent;
}
.selectize-control.rtl.single .selectize-input:after {
left: 17px;
right: auto;
}
.selectize-control.rtl .selectize-input > input {
margin: 0 4px 0 -2px !important;
}
.selectize-control .selectize-input.disabled {
opacity: 0.5;
background-color: #ffffff;
}
.selectize-dropdown,
.selectize-dropdown.form-control {
height: auto;
padding: 0;
margin: 2px 0 0 0;
z-index: 1000;
background: #ffffff;
border: 1px solid #cccccc;
border: 1px solid rgba(0, 0, 0, 0.15);
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
-webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
}
.selectize-dropdown .optgroup-header {
font-size: 12px;
line-height: 1.42857143;
}
.selectize-dropdown .optgroup:first-child:before {
display: none;
}
.selectize-dropdown .optgroup:before {
content: ' ';
display: block;
height: 1px;
margin: 9px 0;
overflow: hidden;
background-color: #e5e5e5;
margin-left: -12px;
margin-right: -12px;
}
.selectize-dropdown-content {
padding: 5px 0;
}
.selectize-dropdown-header {
padding: 6px 12px;
}
.selectize-input {
min-height: 34px;
}
.selectize-input.dropdown-active {
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.selectize-input.dropdown-active::before {
display: none;
}
.selectize-input.focus {
border-color: #66afe9;
outline: 0;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
}
.has-error .selectize-input {
border-color: #a94442;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}
.has-error .selectize-input:focus {
border-color: #843534;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;
}
.selectize-control.multi .selectize-input.has-items {
padding-left: 9px;
padding-right: 9px;
}
.selectize-control.multi .selectize-input > div {
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
.form-control.selectize-control {
padding: 0;
height: auto;
border: none;
background: none;
-webkit-box-shadow: none;
box-shadow: none;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}

View File

@@ -19,7 +19,7 @@ session_key Returns a unique session id for the active stream
rating_key Returns the unique identifier for the media item.
media_index Returns the index of the media item.
parent_media_index Returns the index of the media item's parent.
type Returns the type of session. Either 'track', 'episode' or 'movie'.
media_type Returns the type of session. Either 'track', 'episode' or 'movie'.
thumb Returns the location of the item's thumbnail. Use with pms_image_proxy.
bif_thumb Returns the location of the item's bif thumbnail. Use with pms_image_proxy.
art Returns the location of the item's artwork
@@ -28,10 +28,16 @@ user Returns the name of the user owning the session.
user_id Returns the Plex user id if available.
machine_id Returns the machine id of the players being used.
friendly_name Returns the friendlly name of the user owning the session.
user_thumb Returns the profile picture of the user owning the session.
state Returns the state of the current session. Either 'playing', 'paused' or 'buffering'.
title Returns the name of the episode, movie or music track.
year Returns the year of the episode, movie, or clip.
ip_address Returns the ip address of the stream.
player Returns the name of the platform used to play the stream.
platform Returns the type of platform used to play the stream.
throttled Returns true if the transcode session is throttled.
transcode_progress Returns the current transcode progress of the item. 0 to 100.
transcode_speed Returns the current transcode speed of the item.
audio_decision Returns the audio transcode decision. Either 'transcode', 'copy' or 'direct play'.
audio_codec Returns the name of the audio codec.
audio_channels Returns the number of audio channels.
@@ -61,159 +67,225 @@ DOCUMENTATION :: END
% if data is not None:
% if data['stream_count'] != '0':
% for a in data['sessions']:
<div class="instance" id="instance-${a['session_key']}">
<div class="poster">
<div class="dashboard-activity-poster-face">
% if a['type'] == 'movie' and not a['indexes']:
<img src="pms_image_proxy?img=${a['art']}&width=410&height=230"/>
<div class="dashboard-instance" id="instance-${a['session_key']}">
% if a['media_type'] == 'movie' or a['media_type'] == 'episode' or a['media_type'] == 'track':
<a href="info?rating_key=${a['rating_key']}">
% endif
<div class="dashboard-activity-poster">
% if (a['media_type'] == 'movie' and not a['indexes']) or (a['indexes'] and not a['view_offset']):
<div class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${a['art']}&width=500&height=280);"></div>
% elif (a['media_type'] == 'episode' and not a['indexes']) or (a['indexes'] and not a['view_offset']):
<div class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${a['art']}&width=500&height=280);"></div>
% elif a['indexes']:
<img onload="fadeIn(this)" src="pms_image_proxy?img=${a['bif_thumb']}&width=300&height=169" style="display: none;"/>
<div class="dashboard-activity-poster-face bif" style="background-image: url(pms_image_proxy?img=${a['bif_thumb']}&width=500&height=280); display: none;"></div>
% else:
% if a['type'] == 'track':
<div class="dashboard-activity-poster-music-bg" style="background-image: url('pms_image_proxy?img=${a['thumb']}&width=300&height=300');"></div>
% endif
% if a['type'] == 'clip':
<img src="${a['thumb']}"/>
% else:
<img src="pms_image_proxy?img=${a['thumb']}&width=410&height=230&fallback=cover"/>
% endif
% endif
<div class="dashboard-activity-poster-info-bar">
<div class="dashboard-activity-poster-info-text">
% if a['type'] == 'track':
Track ${a['media_index']}
% elif a['type'] == 'episode':
Season ${a['parent_media_index']}, Episode ${a['media_index']}
% if a['media_type'] == 'track':
<div class="dashboard-activity-cover-face-bg" style="background-image: url(pms_image_proxy?img=${a['thumb']}&width=300&height=300);"></div>
<div class="dashboard-activity-cover-face" style="background-image: url(pms_image_proxy?img=${a['thumb']}&width=300&height=300);"></div>
% elif a['media_type'] == 'clip':
% if a['art'][:4] == 'http':
<div class="dashboard-activity-poster-face" style="background-image: url(${a['art']});"></div>
% elif a['thumb'][:4] == 'http':
<div class="dashboard-activity-poster-face" style="background-image: url(${a['thumb']});"></div>
% else:
${a['title']}
% if a['art']:
<div class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${a['art']}&width=500&height=280);"></div>
% else:
<div class="dashboard-activity-poster-face" style="background-image: url(pms_image_proxy?img=${a['thumb']}&width=500&height=280);"></div>
% endif
% endif
% elif a['media_type'] == 'photo':
<div class="dashboard-activity-poster-face bif" style="background-image: url(pms_image_proxy?img=${a['thumb']}&width=500&height=500);"></div>
% else:
<div class="dashboard-activity-cover-face" style="background-image: url(pms_image_proxy?img=${a['thumb']}&width=300&height=300&fallback=cover);"></div>
% endif
% endif
<div class="dashboard-activity-button-info">
<button type="button" class="btn btn-activity-info btn-lg" data-target="#stream-${a['session_key']}">
<i class="fa fa-info-circle"></i>
</button>
</div>
<div id="stream-${a['session_key']}" class="dashboard-activity-info-details-overlay">
<div class="dashboard-activity-info-details-content">
<div id="platform-${a['session_key']}" title="${a['platform']}">
<script>
$("#platform-${a['session_key']}").html("<div class='dashboard-activity-info-platform-box' style='background-image: url(" + getPlatformImagePath('${a['platform']}') + ");'>");
</script>
</div>
<div class="dashboard-activity-info-platform">
<strong>${a['player']}</strong><br />
% if a['state'] == 'playing':
State &nbsp;<strong>Playing</strong>
% elif a['state'] == 'paused':
State &nbsp;<strong>Paused</strong>
% elif a['state'] == 'buffering':
State &nbsp;<strong>Buffering</strong>
% endif
</div>
% if a['media_type'] == 'track':
% if a['audio_decision'] == 'direct play':
Stream &nbsp;<strong>Direct Play</strong>
% elif a['audio_decision'] == 'copy':
Stream &nbsp;<strong>Direct Stream</strong>
% else:
Stream &nbsp;<strong>Transcoding
(Speed: ${a['transcode_speed']})
% if a['throttled'] == '1':
(Throttled)
% endif
</strong>
% endif
<br />
% if a['audio_decision'] == 'direct play':
Audio &nbsp;<strong>Direct Play (${a['audio_codec']}) (${a['audio_channels']}ch)</strong>
% elif a['audio_decision'] == 'copy':
Audio &nbsp;<strong>Direct Stream (${a['transcode_audio_codec']}) (${a['transcode_audio_channels']}ch)</strong>
% elif a['audio_decision'] == 'transcode':
Audio &nbsp;<strong>Transcode (${a['transcode_audio_codec']}) (${a['transcode_audio_channels']}ch)</strong>
% endif
% elif a['media_type'] == 'episode' or a['media_type'] == 'movie' or a['media_type'] == 'clip':
% if a['video_decision'] == 'direct play' and a['audio_decision'] == 'direct play':
Stream &nbsp;<strong>Direct Play</strong>
% elif a['video_decision'] == 'copy' and a['audio_decision'] == 'copy':
Stream &nbsp;<strong>Direct Stream</strong>
% else:
Stream &nbsp;<strong>Transcoding
(Speed: ${a['transcode_speed']})
% if a['throttled'] == '1':
(Throttled)
% endif
</strong>
% endif
<br />
% if a['video_decision'] == 'direct play':
Video &nbsp;<strong>Direct Play (${a['video_codec']}) (${a['width']}x${a['height']})</strong>
% elif a['video_decision'] == 'copy':
Video &nbsp;<strong>Direct Stream (${a['transcode_video_codec']}) (${a['width']}x${a['height']})</strong>
% elif a['video_decision'] == 'transcode':
Video &nbsp;<strong>Transcode (${a['transcode_video_codec']}) (${a['transcode_width']}x${a['transcode_height']})</strong>
% endif
<br />
% if a['audio_decision'] == 'direct play':
Audio &nbsp;<strong>Direct Play (${a['audio_codec']}) (${a['audio_channels']}ch)</strong>
% elif a['audio_decision'] == 'copy':
Audio &nbsp;<strong>Direct Stream (${a['transcode_audio_codec']}) (${a['transcode_audio_channels']}ch)</strong>
% elif a['audio_decision'] == 'transcode':
Audio &nbsp;<strong>Transcode (${a['transcode_audio_codec']}) (${a['transcode_audio_channels']}ch)</strong>
% endif
% elif a['media_type'] == 'photo':
% if a['video_decision'] == 'direct play':
Stream &nbsp;<strong>Direct Play</strong>
% elif a['video_decision'] == 'copy':
Stream &nbsp;<strong>Direct Stream</strong>
% else:
Stream &nbsp;<strong>
Transcoding
(Speed: ${a['transcode_speed']})
% if a['throttled'] == '1':
(Throttled)
% endif
</strong>
% endif
% endif
<br>
</div>
</div>
% if a['media_type'] != 'photo':
<div class="dashboard-activity-poster-info-bar">
<div class="dashboard-activity-poster-info-ip-address">
% if a['ip_address']:
<span>IP: ${a['ip_address']}</span>
% else:
<span>IP: N/A</span>
% endif
</div>
<div class="dashboard-activity-poster-info-time">
<span class="progress_time">${a['progress']}</span>/<span class="progress_time">${a['duration']}</span>
<span class="progress_time">${a['view_offset']}</span>/<span class="progress_time">${a['duration']}</span>
</div>
</div>
% endif
</div>
<div class='dashboard-activity-metadata-wrapper'>
<div class='dashboard-activity-instance-overlay'>
<div class='dashboard-activity-metadata-progress-minutes'>
<div class='activity-progress'>
<div class="bar" style="width: ${a['progress_percent']}%">${a['progress_percent']}%</div>
</div>
</div>
<div class="dashboard-activity-metadata-platform" data-toggle="tooltip" data-placement="right" title data-title="${a['player']}" id="platform-${a['session_key']}">
</div>
<div class="dashboard-activity-metadata-user">
% if a['user_id']:
<a href="user?user_id=${a['user_id']}">${a['friendly_name']}</a> is ${a['state']}
% else:
<a href="user?user=${a['user']}">${a['friendly_name']}</a> is ${a['state']}
% endif
</div>
<div class="dashboard-activity-metadata-title">
% if a['type'] == 'episode':
<a href="info?item_id=${a['rating_key']}">${a['grandparent_title']} - ${a['title']}</a>
% elif a['type'] == 'movie':
<a href="info?item_id=${a['rating_key']}">${a['title']}</a>
% elif a['type'] == 'clip':
${a['title']}
% elif a['type'] == 'track':
${a['grandparent_title']} - ${a['title']}
% else:
${a['grandparent_title']} - ${a['title']}
% endif
</div>
</div>
<div id="stream-${a['session_key']}" class="collapse out">
<div class='dashboard-activity-info-details-overlay'>
<div class='dashboard-activity-info-details-content'>
% if a['type'] == 'track':
Artist: <strong>${a['grandparent_title']}</strong>
<br>
Album: <strong>${a['parent_title']}</strong>
<br>
% endif
% if a['state'] == 'playing':
State: <strong>Playing</strong>
% elif a['state'] == 'paused':
State: <strong>Paused</strong>
% elif a['state'] == 'buffering':
State: <strong>Buffering</strong>
% endif
<br>
% if a['type'] == 'track':
% if a['audio_decision'] == 'direct play':
Stream: <strong>Direct Play</strong>
% else:
Stream: <strong>Transcoding</strong>
% endif
<br/>
% if a['audio_decision'] != 'direct play':
Audio: <strong>${a['transcode_audio_codec']} (${a['transcode_audio_channels']}ch)</strong>
% elif a['audio_decision'] == 'direct play':
Audio: <strong>${a['audio_codec']} (${a['audio_channels']}ch)</strong>
% endif
% elif a['type'] == 'episode' or a['type'] == 'movie' or a['type'] == 'clip':
% if a['video_decision'] == 'direct play':
Stream: <strong>Direct Play</strong>
% else:
Stream: <strong>Transcoding</strong>
% endif
<br/>
% if a['video_decision'] != 'direct play':
Video: <strong>${a['video_decision']} (${a['transcode_video_codec']})
(${a['transcode_width']}x${a['transcode_height']})</strong>
% elif a['audio_decision'] == 'direct play':
Video: <strong>${a['video_decision']} (${a['video_codec']})
(${a['width']}x${a['height']})</strong>
% endif
<br/>
% if a['audio_decision'] != 'direct play':
Audio: <strong>${a['audio_decision']} ${a['transcode_audio_codec']} (${a['transcode_audio_channels']}ch)</strong>
% elif a['audio_decision'] == 'direct play':
Audio: <strong>${a['audio_codec']} (${a['audio_channels']}ch)</strong>
% endif
% endif
<br>
</div>
</div>
</div>
% if a['media_type'] == 'movie' or a['media_type'] == 'episode' or a['media_type'] == 'track':
</a>
% endif
<div class="dashboard-activity-progress">
<div class="dashboard-activity-progress-bar">
<div class="bufferbar" style="width: ${a['transcode_progress']}%">${a['transcode_progress']}%</div>
<div class="bar" style="width: ${a['progress_percent']}%">${a['progress_percent']}%</div>
</div>
</div>
<div class="dashboard-activity-button-info">
<button type="button" class="btn btn-activity-info btn-sm" data-toggle="collapse" data-target="#stream-${a['session_key']}">
<i class='fa fa-info-circle'></i>
</button>
</div>
<div class="dashboard-activity-metadata-wrapper">
<a href="user?user_id=${a['user_id']}">
<div class="dashboard-activity-metadata-user-thumb" style="background-image: url(${a['user_thumb']});"></div>
</a>
<div class="dashboard-activity-metadata-title">
% if a['state'] == 'playing':
<i class="fa fa-play"></i>&nbsp;
% elif a['state'] == 'paused':
<i class="fa fa-pause"></i>&nbsp;
% elif a['state'] == 'buffering':
<i class="fa fa-spinner"></i>&nbsp;
% endif
% if a['media_type'] == 'episode':
<a href="info?rating_key=${a['rating_key']}" title="${a['grandparent_title']} - ${a['title']}">${a['grandparent_title']} - ${a['title']}</a>
% elif a['media_type'] == 'movie':
<a href="info?rating_key=${a['rating_key']}" title="${a['title']}">${a['title']}</a>
% elif a['media_type'] == 'clip':
<span title="${a['title']}">${a['title']}</span>
% elif a['media_type'] == 'track':
<a href="info?rating_key=${a['rating_key']}" title="${a['grandparent_title']} - ${a['title']}">${a['grandparent_title']} - ${a['title']}</a>
% elif a['media_type'] == 'photo':
<span title="${a['parent_title']}">${a['parent_title']}</span>
% else:
<span title="${a['title']}">${a['title']}</span>
% endif
</div>
<div class="dashboard-activity-metadata-subtitle">
% if a['media_type'] == 'episode':
<span title="S${a['parent_media_index']} &middot; E${a['media_index']}">S${a['parent_media_index']} &middot; E${a['media_index']}</span>
% elif a['media_type'] == 'movie':
<span title="${a['year']}">${a['year']}</span>
% elif a['media_type'] == 'track':
<a href="info?rating_key=${a['parent_rating_key']}" title="${a['parent_title']}">${a['parent_title']}</a>
% elif a['media_type'] == 'photo':
<span title="${a['title']}">${a['title']}</span>
% else:
<span title="${a['year']}">${a['year']}</span>
% endif
</div>
<div class="dashboard-activity-metadata-user">
% if a['user_id']:
<a href="user?user_id=${a['user_id']}" title="${a['friendly_name']}">${a['friendly_name']}</a>
% else:
<a href="user?user=${a['user']}" title="${a['friendly_name']}">${a['friendly_name']}</a>
% endif
</div>
</div>
</div>
<script>
$("#platform-${a['session_key']}").html("<img src='" + getPlatformImagePath('${a['platform']}') + "'>");
</script>
% endfor
<script>
// When using bif indexes make the image transition a little smoother.
function fadeIn(obj) {
$(obj).fadeIn(450);
}
$('.bif').each(function() {
$(this).hide().fadeIn(1000);
});
// Convert timestamps to readable times
$('.progress_time').each(function(index) {
$(this).html(millisecondsToMinutes($(this).text(), false));
});
// Hide the info bar on page load
$('.dashboard-activity-poster-info-bar').hide();
// When mouse over the activity pane, show an info bar with extra info.
$('.dashboard-activity-poster-face').mouseenter(function() {
$('.dashboard-activity-poster-info-bar', this).slideDown('fast');
});
$('.dashboard-activity-poster-face').mouseleave(function() {
$('.dashboard-activity-poster-info-bar', this).slideUp('fast');
// Show/Hide activity info
$('.btn-activity-info').on('click', function(e) {
e.preventDefault();
$($(this).attr('data-target')).toggle();
});
// Tooltips
$('.dashboard-activity-metadata-platform').each(function() {
$(this).tooltip();
// Add hover class to dashboard-instance
$('.dashboard-activity-poster').hover(function() {
$(this).closest('.dashboard-instance').addClass('hover');
}, function() {
$(this).closest('.dashboard-instance').removeClass('hover');
});
</script>
% else:
@@ -223,4 +295,4 @@ DOCUMENTATION :: END
<div class="text-muted">There was an error communicating with your Plex Server. Please check your <a
href="settings">settings</a>.
</div><br>
% endif
% endif

View File

@@ -15,11 +15,13 @@ DOCUMENTATION :: END
</%doc>
% if data != None:
% if data == '0':
<h3>Activity</h3>
% if data == '0':
<h3>Activity</h3>
% elif data == '1':
<h3>Activity <small>${data} stream</small></h3>
% else:
<h3>Activity <small>${data} streams</small></h3>
% endif
% else:
<h3>Activity <small>${data} stream(s)</small></h3>
<h3>Activity</h3>
% endif
% else:
<h3>Activity</h3>
% endif

View File

@@ -0,0 +1,179 @@
<%doc>
USAGE DOCUMENTATION :: PLEASE LEAVE THIS AT THE TOP OF THIS FILE
For Mako templating syntax documentation please visit: http://docs.makotemplates.org/en/latest/
Filename: edit_library.html
Version: 0.1
Variable names: data [list]
data :: Usable parameters
== Global keys ==
section_id Returns the library id of the library.
section_name Returns the name of the library.
section_type Returns the type of the library.
library_thumb Returns the thumbnail for the library.
custom_thumb Returns the custom thumbnail for the library.
library_art Returns the artwork for the library.
count Returns the item count for the library.
parent_count Returns the parent item count for the library.
child_count Returns the child item count for the library.
do_notify Returns bool value for whether to send notifications for the library.
keep_history Returns bool value for whether to keep history for the library.
DOCUMENTATION :: END
</%doc>
<%!
from plexpy import helpers
%>
% if data != None:
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-remove"></i></button>
<h4 class="modal-title">Edit library <strong>${data['section_name']}</strong></h4>
</div>
<div class="modal-body" id="modal-text">
<fieldset>
<div class="form-group">
<label for="profile_url">Library Picture URL</label>
<div class="row">
<div class="col-md-8">
<input type="text" class="form-control" id="custom_thumb_url" name="custom_thumb_url" value="${data['library_thumb']}">
</div>
</div>
<p class="help-block">Change the library's picture in PlexPy. To reset to default, leave this field empty and save.</p>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="do_notify" name="do_notify" value="1" ${helpers.checked(data['do_notify'])}> Enable notifications
</label>
<p class="help-block">Uncheck this if you do not want to receive notifications for this library's activity.</p>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="keep_history" name="keep_history" value="1" ${helpers.checked(data['keep_history'])}> Keep history
</label>
<p class="help-block">Uncheck this if you do not want to keep any history on this library's activity.</p>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="do_notify_created" name="do_notify_created" value="1" ${helpers.checked(data['do_notify_created'])}> Enable recently added notifications
</label>
<p class="help-block">Uncheck this if you do not want to receive recently added notifications for this library.</p>
</div>
% if data['section_id']:
<div class="form-group">
<button class="btn btn-danger" id="delete-all-history">Purge</button>
<p class="help-block">DANGER ZONE! Click the purge button to remove all history logged for this library. This is permanent!</p>
</div>
% endif
</fieldset>
</div>
<div class="modal-footer">
<div>
<span id="edit-library-status-message"></span>
<input type="button" id="save_library" class="btn btn-bright" value="Save">
</div>
</div>
</div>
</div>
<div id="confirm-modal-purge" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="confirm-modal-purge">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-remove"></i></button>
<h4 class="modal-title" id="myModalLabel">Confirm Purge</h4>
</div>
<div class="modal-body" style="text-align: center;">
<p>Are you REALLY sure you want to purge all history for this library?</p>
<p>This is permanent and cannot be undone!</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-dark" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-danger btn-ok" data-dismiss="modal" id="confirm-purge">Purge</button>
</div>
</div>
</div>
</div>
<script>
// Save library options
$("#save_library").on('click', function () {
var custom_thumb = $("#custom_thumb_url").val();
var do_notify = 0;
var do_notify_created = 0;
var keep_history = 0;
if ($("#do_notify").is(":checked")) {
do_notify = 1;
}
if ($("#do_notify_created").is(":checked")) {
do_notify_created = 1;
}
if ($("#keep_history").is(":checked")) {
keep_history = 1;
}
$.ajax({
url: 'edit_library',
data: {
section_id: '${data["section_id"]}',
custom_thumb: custom_thumb,
do_notify: do_notify,
do_notify_created: do_notify_created,
keep_history: keep_history
},
cache: false,
async: true,
success: function (data) {
location.reload();
}
});
});
$("#delete-all-history").on('click', function() {
$('#confirm-modal-purge').modal();
$('#confirm-modal-purge').one('click', '#confirm-purge', function () {
$.ajax({
url: 'delete_all_library_history',
data: { section_id: '${data["section_id"]}' },
cache: false,
async: true,
success: function(data) {
location.reload();
}
});
});
});
$(document).ready(function() {
// Move #confirm-modal to parent container
if (!($('#edit-library-modal').next().is('#confirm-modal-purge'))) {
$('#confirm-modal-purge').appendTo($('#edit-library-modal').parent());
}
$('#edit-library-modal > #confirm-modal-purge').remove();
$('#edit-library-modal').css('z-index', '1050');
$('.modal-backdrop').not('.modal-backdrop-stack').css('z-index', '1049');
$('.modal-backdrop').not('.modal-backdrop-stack').addClass('modal-backdrop-stack');
$('#confirm-modal-purge').on('show.bs.modal', function () {
// Fix position to match parent modal
var currentPadding = parseInt($('body').css('padding-right'));
$(this).children('.modal-dialog').css('left', -currentPadding/2);
$('#edit-library-modal').css('overflow-y', 'hidden');
});
$('#confirm-modal-purge').on('shown.bs.modal', function () {
$(this).css('z-index', '1060');
$('.modal-backdrop').not('.modal-backdrop-stack').css('z-index', '1059');
$('.modal-backdrop').not('.modal-backdrop-stack').addClass('modal-backdrop-stack');
});
$('#confirm-modal-purge').on('hidden.bs.modal', function () {
$('body').addClass('modal-open');
$('#edit-library-modal').css('overflow-y', 'auto');
});
});
</script>
% endif

View File

@@ -10,85 +10,169 @@ Variable names: data [list]
data :: Usable parameters
== Global keys ==
user Return the real Plex username
user_id Return the Plex user_id
friendly_name Returns the friendly edited Plex username
do_notify Returns bool value for whether the user should trigger notifications
user_id Returns the user id of the user.
username Returns the user's username.
friendly_name Returns the friendly name of the user.
email Returns the user's email address.
user_thumb Returns the thumbnail for the user.
is_home_user Returns bool value for whether the user is part of a Plex Home.
is_allow_sync Returns bool value for whether the user has sync rights.
is_restricted Returns bool value for whether the user account is restricted.
do_notify Returns bool value for whether to send notifications for the user.
keep_history Returns bool value for whether to keep history for the user.
DOCUMENTATION :: END
</%doc>
% if data is not None:
<%!
from plexpy import helpers
%>
% if data != None:
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-remove"></i></button>
<h4 class="modal-title">Edit user <strong>${data['user']}</strong></h4>
<h4 class="modal-title">Edit user <strong>${data['username']}</strong></h4>
</div>
<div class="modal-body" id="modal-text">
<fieldset>
<div class="form-group">
<label for="friendly_name">Friendly Name</label>
<div class="row">
<div class="col-xs-6">
<div class="col-md-6">
<input type="text" class="form-control" id="friendly_name" name="friendly_name" value="${data['friendly_name']}" size="30">
</div>
</div>
<p class="help-block">Replace all occurances of the username with this name.</p>
</div>
<div class="form-group">
<label for="profile_url">Profile Picture URL</label>
<div class="row">
<div class="col-md-8">
<input type="text" class="form-control" id="custom_avatar_url" name="custom_avatar_url" value="${data['user_thumb']}">
</div>
</div>
<p class="help-block">Change the users profile picture in PlexPy. To reset to default, leave this field empty and save.</p>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="do_notify" name="do_notify" value="1" ${data['do_notify']}> Enable notifications
<input type="checkbox" id="do_notify" name="do_notify" value="1" ${helpers.checked(data['do_notify'])}> Enable notifications
</label>
<p class="help-block">Uncheck this if you do not want to receive notifications for this user's activity.</p>
</div>
<div class="checkbox">
<label>
<input type="checkbox" id="keep_history" name="keep_history" value="1" ${helpers.checked(data['keep_history'])}> Keep history
</label>
<p class="help-block">Uncheck this if you do not want to keep any history on this user's activity.</p>
</div>
% if data['user_id']:
<div class="form-group">
<button class="btn btn-danger" id="delete-all-history">Purge</button>
<p class="help-block">DANGER ZONE! Click the purge button to remove all history logged for this user. This is permanent!</p>
</div>
% endif
</fieldset>
</div>
<div class="modal-footer">
<div>
<span id="edit-user-status-message"></span>
<input type="button" id="save_user_name" class="btn btn-bright" value="Save">
<input type="button" id="save_user" class="btn btn-bright" value="Save">
</div>
</div>
</div>
</div>
<div id="confirm-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="confirm-modal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-remove"></i></button>
<h4 class="modal-title" id="myModalLabel">Confirm Purge</h4>
</div>
<div class="modal-body" style="text-align: center;">
<p>Are you REALLY sure you want to purge all history for this user?</p>
<p>This is permanent and cannot be undone!</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-dark" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-danger btn-ok" data-dismiss="modal" id="confirm-purge">Purge</button>
</div>
</div>
</div>
</div>
<script>
// Set new friendly name
$("#save_user_name").click(function() {
// Set user options
$("#save_user").on('click', function () {
var friendly_name = $("#friendly_name").val();
var custom_thumb = $("#custom_avatar_url").val();
var do_notify = 0;
var keep_history = 0;
if ($("#do_notify").is(":checked")) {
do_notify = 1;
}
if ($("#keep_history").is(":checked")) {
keep_history = 1;
}
% if data['user_id']:
$.ajax({
url: 'edit_user',
data: {
user_id: '${data["user_id"]}',
friendly_name: friendly_name,
custom_thumb: custom_thumb,
do_notify: do_notify,
keep_history: keep_history
},
cache: false,
async: true,
success: function(data) {
location.reload();
}
});
});
$("#delete-all-history").on('click', function() {
$('#confirm-modal').modal();
$('#confirm-modal').one('click', '#confirm-purge', function () {
$.ajax({
url: 'edit_user',
data: {user_id: '${data['user_id']}', friendly_name: friendly_name, do_notify: do_notify},
url: 'delete_all_user_history',
data: { user_id: '${data["user_id"]}' },
cache: false,
async: true,
success: function(data) {
$("#edit-user-status-message").html(data);
if ($.trim(friendly_name) !== '') {
$(".set-username").html(friendly_name);
}
location.reload();
}
});
% else:
$.ajax({
url: 'edit_user',
data: {user: '${data['user']}', friendly_name: friendly_name, do_notify: do_notify},
cache: false,
async: true,
success: function(data) {
$("#edit-user-status-message").html(data);
if ($.trim(friendly_name) !== '') {
$(".set-username").html(friendly_name);
}
}
});
% endif
});
});
$(document).ready(function() {
// Move #confirm-modal to parent container
if(!($('#edit-user-modal').next().is('#confirm-modal'))) {
$('#confirm-modal').appendTo($('#edit-user-modal').parent());
}
$('#edit-user-modal > #confirm-modal').remove();
$('#edit-user-modal').css('z-index', '1050');
$('.modal-backdrop').not('.modal-backdrop-stack').css('z-index', '1049');
$('.modal-backdrop').not('.modal-backdrop-stack').addClass('modal-backdrop-stack');
$('#confirm-modal').on('show.bs.modal', function () {
// Fix position to match parent modal
var currentPadding = parseInt($('body').css('padding-right'));
$(this).children('.modal-dialog').css('left', -currentPadding/2);
$('#edit-user-modal').css('overflow-y', 'hidden');
});
$('#confirm-modal').on('shown.bs.modal', function () {
$(this).css('z-index', '1060');
$('.modal-backdrop').not('.modal-backdrop-stack').css('z-index', '1059');
$('.modal-backdrop').not('.modal-backdrop-stack').addClass('modal-backdrop-stack');
});
$('#confirm-modal').on('hidden.bs.modal', function() {
$('body').addClass('modal-open');
$('#edit-user-modal').css('overflow-y', 'auto');
});
});
</script>
% endif

View File

@@ -13,112 +13,137 @@
</div>
<div class="button-bar hidden-xs">
<div class="btn-group" data-toggle="buttons" id="yaxis-selection">
% if config['graph_type'] == 'duration':
<label class="btn btn-dark">
<input type="radio" name="yaxis-options" id="yaxis-count" value="plays" autocomplete="off"> Play Count
</label>
<label class="btn btn-dark active">
<input type="radio" name="yaxis-options" id="yaxis-duration" value="duration" autocomplete="off" checked> Play Duration
</label>
% else:
<label class="btn btn-dark active">
<input type="radio" name="yaxis-options" id="yaxis-count" value="plays" autocomplete="off" checked> Play Count
</label>
<label class="btn btn-dark">
<input type="radio" name="yaxis-options" id="yaxis-duration" value="duration" autocomplete="off"> Play Duration
</label>
% endif
</div>
<div class="btn-group" data-toggle="buttons" id="days-selection">
<label class="btn btn-dark active">
<input type="radio" name="date-options" id="graph-30" value="30" autocomplete="off" checked> 30 days
</label>
<label class="btn btn-dark">
<input type="radio" name="date-options" id="graph-90" value="90" autocomplete="off"> 90 days
</label>
<label class="btn btn-dark">
<input type="radio" name="date-options" id="graph-365" value="365" autocomplete="off"> 1 year
<div class="btn-group" id="days-selection">
<label>
<input type="number" name="graph-days" id="graph-days" value="${config['graph_days']}" min="1" /> days
</label>
</div>
</div>
</div>
<div class='table-card-back'>
<ul class="nav nav-pills" role="tablist" id="graph-tabs">
% if config['graph_tab'] == 'tabs-3':
<li role="presentation"><a href="#tabs-1" aria-controls="tabs-1" data-toggle="tab" role="tab">Plays by period</a></li>
<li role="presentation"><a href="#tabs-2" aria-controls="tabs-2" data-toggle="tab" role="tab">Stream Info</a></li>
<li role="presentation" class="active"><a href="#tabs-3" aria-controls="tabs-3" data-toggle="tab" role="tab">Play Totals</a></li>
% elif config['graph_tab'] == 'tabs-2':
<li role="presentation"><a href="#tabs-1" aria-controls="tabs-1" data-toggle="tab" role="tab">Plays by period</a></li>
<li role="presentation" class="active"><a href="#tabs-2" aria-controls="tabs-2" data-toggle="tab" role="tab">Stream Info</a></li>
<li role="presentation"><a href="#tabs-3" aria-controls="tabs-3" data-toggle="tab" role="tab">Play Totals</a></li>
% else:
<li role="presentation" class="active"><a href="#tabs-1" aria-controls="tabs-1" data-toggle="tab" role="tab">Plays by period</a></li>
<li role="presentation"><a href="#tabs-2" aria-controls="tabs-2" data-toggle="tab" role="tab">Stream Info</a></li>
<li role="presentation"><a href="#tabs-3" aria-controls="tabs-3" data-toggle="tab" role="tab">Play Totals</a></li>
% endif
</ul>
<div class="tab-content">
% if config['graph_tab'] != 'tabs-2' and config['graph_tab'] != 'tabs-3':
<div role="tabpanel" class="tab-pane active" id="tabs-1">
<div class="row">
<div class="col-md-12">
<h4><i class="fa fa-history"></i> Daily <span class="yaxis-text">Play count</span> <small>Last <span class="days">30</span> days</small></h4>
<p class="help-block">
The total play count or duration of movies and tv played per day. Click a graph point to open up a list of items played for that specific date.
</p>
<div class="graphs-instance">
<div class="watch-chart" id="chart_div_plays_by_day">
<div class="graphs-load"><i class="fa fa-refresh fa-spin"></i> Loading chart...</div>
<br>
% else:
<div role="tabpanel" class="tab-pane" id="tabs-1">
% endif
<div class="row">
<div class="col-md-12">
<h4><i class="fa fa-history"></i> Daily <span class="yaxis-text">Play count</span> <small>Last <span class="days">30</span> days</small></h4>
<p class="help-block">
The total play count or duration of tv, movies, and music played per day. Click a graph point to open up a list of items played for that specific date.
</p>
<div class="graphs-instance">
<div class="watch-chart" id="chart_div_plays_by_day">
<div class="graphs-load"><i class="fa fa-refresh fa-spin"></i> Loading chart...</div>
<br>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<h4><i class="fa fa-calendar"></i> <span class="yaxis-text">Play count</span> by day of week <small>Last <span class="days">30</span> days</small></h4>
<p class="help-block">
The combined total of tv, movies, and music played per day of the week.
</p>
<div class="graphs-instance">
<div class="watch-chart" id="chart_div_plays_by_dayofweek" style="float: left;">
<div class="graphs-load">
<i class="fa fa-refresh fa-spin"></i> Loading chart...
</div>
<br>
</div>
</div>
</div>
<div class="col-md-6">
<h4><i class="fa fa-clock-o"></i> <span class="yaxis-text">Play count</span> by hour of day <small>Last <span class="days">30</span> days</small></h4>
<p class="help-block">
The combined total of tv, movies, and music played per hour of the day.
</p>
<div class="graphs-instance">
<div class="watch-chart" id="chart_div_plays_by_hourofday">
<div class="graphs-load">
<i class="fa fa-refresh fa-spin"></i> Loading chart...
</div>
<br>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<h4><i class="fa fa-television"></i> <span class="yaxis-text">Play count</span> by top 10 platforms <small>Last <span class="days">30</span> days</small></h4>
<p class="help-block">
The combined total of tv, movies, and music played by top 10 most active platforms.
</p>
<div class="graphs-instance">
<div class="watch-chart" id="chart_div_plays_by_platform" style="float: left;">
<div class="graphs-load">
<i class="fa fa-refresh fa-spin"></i> Loading chart...
</div>
<br>
</div>
</div>
</div>
<div class="col-md-6">
<h4><i class="fa fa-user"></i> <span class="yaxis-text">Play count</span> by top 10 users <small>Last <span class="days">30</span> days</small></h4>
<p class="help-block">
The combined total of tv, movies, and music played by top 10 most active users.
</p>
<div class="graphs-instance">
<div class="watch-chart" id="chart_div_plays_by_user">
<div class="graphs-load">
<i class="fa fa-refresh fa-spin"></i> Loading chart...
</div>
<br>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<h4><i class="fa fa-calendar"></i> <span class="yaxis-text">Play count</span> by day of week <small>Last <span class="days">30</span> days</small></h4>
<p class="help-block">
The combined total of movies and tv played per day of the week.
</p>
<div class="graphs-instance">
<div class="watch-chart" id="chart_div_plays_by_dayofweek" style="float: left;">
<div class="graphs-load"><i class="fa fa-refresh fa-spin"></i> Loading chart...
</div>
<br>
</div>
</div>
</div>
<div class="col-md-6">
<h4><i class="fa fa-clock-o"></i> <span class="yaxis-text">Play count</span> by hour of day <small>Last <span class="days">30</span> days</small></h4>
<p class="help-block">
The combined total of movies and tv played per hour of the day.
</p>
<div class="graphs-instance">
<div class="watch-chart" id="chart_div_plays_by_hourofday">
<div class="graphs-load"><i class="fa fa-refresh fa-spin"></i> Loading chart...
</div>
<br>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<h4><i class="fa fa-television"></i> <span class="yaxis-text">Play count</span> by top 10 platforms <small>Last <span class="days">30</span> days</small></h4>
<p class="help-block">
The combined total of movies and tv played by top 10 most active platforms.
</p>
<div class="graphs-instance">
<div class="watch-chart" id="chart_div_plays_by_platform" style="float: left;">
<div class="graphs-load"><i class="fa fa-refresh fa-spin"></i> Loading chart...
</div>
<br>
</div>
</div>
</div>
<div class="col-md-6">
<h4><i class="fa fa-user"></i> <span class="yaxis-text">Play count</span> by top 10 users <small>Last <span class="days">30</span> days</small></h4>
<p class="help-block">
The combined total of movies and tv played by top 10 most active users.
</p>
<div class="graphs-instance">
<div class="watch-chart" id="chart_div_plays_by_user">
<div class="graphs-load"><i class="fa fa-refresh fa-spin"></i> Loading chart...
</div>
<br>
</div>
</div>
</div>
</div>
</div>
% if config['graph_tab'] == 'tabs-2':
<div role="tabpanel" class="tab-pane active" id="tabs-2">
% else:
<div role="tabpanel" class="tab-pane" id="tabs-2">
% endif
<div class="row">
<div class="col-md-12">
<h4><i class="fa fa-video-camera"></i> Daily Stream type breakdown <small>Last <span class="days">30</span> days</small></h4>
<p class="help-block">
The total play count or duration of movies and tv by the transcode decision. Click a graph point to open up a list of items played for that specific date.
The total play count or duration of tv, movies, and music by the transcode decision. Click a graph point to open up a list of items played for that specific date.
</p>
<div class="graphs-instance">
<div class="watch-chart" id="chart_div_plays_by_stream_type">
@@ -132,7 +157,7 @@
<div class="col-md-6">
<h4><i class="fa fa-expand"></i> <span class="yaxis-text">Play count</span> by source resolution <small>Last <span class="days">30</span> days</small></h4>
<p class="help-block">
The combined total of movies and tv by their original resolution (pre-transcoding).
The combined total of tv and movies by their original resolution (pre-transcoding).
</p>
<div class="graphs-instance">
<div class="watch-chart" id="chart_div_plays_by_source_resolution" style="float: left;">
@@ -145,7 +170,7 @@
<div class="col-md-6">
<h4><i class="fa fa-expand"></i> <span class="yaxis-text">Play count</span> by stream resolution <small>Last <span class="days">30</span> days</small></h4>
<p class="help-block">
The combined total of movies and tv by their streamed resolution (post-transcoding).
The combined total of tv and movies by their streamed resolution (post-transcoding).
</p>
<div class="graphs-instance">
<div class="watch-chart" id="chart_div_plays_by_stream_resolution">
@@ -160,7 +185,7 @@
<div class="col-md-6">
<h4><i class="fa fa-television"></i> <span class="yaxis-text">Play count</span> by platform and stream type <small>Last <span class="days">30</span> days</small></h4>
<p class="help-block">
The combined total of movies and tv by platform and stream type.
The combined total of tv, movies, and music by platform and stream type.
</p>
<div class="graphs-instance">
<div class="watch-chart" id="chart_div_plays_by_platform_by_stream_type" style="float: left;">
@@ -173,7 +198,7 @@
<div class="col-md-6">
<h4><i class="fa fa-user"></i> <span class="yaxis-text">Play count</span> by user and stream type <small>Last <span class="days">30</span> days</small></h4>
<p class="help-block">
The combined total of movies and tv by user and stream type.
The combined total of tv, movies, and music by user and stream type.
</p>
<div class="graphs-instance">
<div class="watch-chart" id="chart_div_plays_by_user_by_stream_type" style="float: left;">
@@ -186,12 +211,16 @@
</div>
</div>
% if config['graph_tab'] == 'tabs-3':
<div role="tabpanel" class="tab-pane active" id="tabs-3">
% else:
<div role="tabpanel" class="tab-pane" id="tabs-3">
% endif
<div class="row">
<div class="col-md-12">
<h4><i class="fa fa-calendar"></i> Plays by Month <small>Last 12 months</small></h4>
<p class="help-block">
The combined total of movies and tv by month.
The combined total of tv, movies, and music by month.
</p>
<div class="graphs-instance">
<div class="watch-chart" id="chart_div_plays_by_month">
@@ -260,9 +289,14 @@
<script>
$(document).ready(function () {
var current_range = 30;
var yaxis = 'plays';
var current_tab = '#tabs-1';
// Initial values for graph from config
var yaxis = "${config['graph_type']}";
var current_range = ${config['graph_days']};
var current_tab = "${'#' + config['graph_tab']}";
$('.days').html(current_range);
var music_visible = (${config['music_logging_enable']} == 1 ? true : false);
function loadGraphsTab1(time_range, yaxis) {
setGraphFormat(yaxis);
@@ -280,8 +314,8 @@
if ((moment(data.categories[i], 'YYYY-MM-DD').format('ddd') == 'Sat') ||
(moment(data.categories[i], 'YYYY-MM-DD').format('ddd') == 'Sun')) {
hc_plays_by_day_options.xAxis.plotBands.push({
from: i,
to: i+1,
from: i-0.5,
to: i+0.5,
color: 'rgba(80,80,80,0.3)'
});
}
@@ -289,6 +323,7 @@
hc_plays_by_day_options.yAxis.min = 0;
hc_plays_by_day_options.xAxis.categories = dateArray;
hc_plays_by_day_options.series = data.series;
hc_plays_by_day_options.series[2].visible = music_visible;
var hc_plays_by_day = new Highcharts.Chart(hc_plays_by_day_options);
}
});
@@ -301,6 +336,7 @@
success: function(data) {
hc_plays_by_dayofweek_options.xAxis.categories = data.categories;
hc_plays_by_dayofweek_options.series = data.series;
hc_plays_by_dayofweek_options.series[2].visible = music_visible;
var hc_plays_by_dayofweek = new Highcharts.Chart(hc_plays_by_dayofweek_options);
}
});
@@ -313,6 +349,7 @@
success: function(data) {
hc_plays_by_hourofday_options.xAxis.categories = data.categories;
hc_plays_by_hourofday_options.series = data.series;
hc_plays_by_hourofday_options.series[2].visible = music_visible;
var hc_plays_by_hourofday = new Highcharts.Chart(hc_plays_by_hourofday_options);
}
});
@@ -325,6 +362,7 @@
success: function(data) {
hc_plays_by_platform_options.xAxis.categories = data.categories;
hc_plays_by_platform_options.series = data.series;
hc_plays_by_platform_options.series[2].visible = music_visible;
var hc_plays_by_platform = new Highcharts.Chart(hc_plays_by_platform_options);
}
});
@@ -337,6 +375,7 @@
success: function(data) {
hc_plays_by_user_options.xAxis.categories = data.categories;
hc_plays_by_user_options.series = data.series;
hc_plays_by_user_options.series[2].visible = music_visible;
var hc_plays_by_user = new Highcharts.Chart(hc_plays_by_user_options);
}
});
@@ -358,8 +397,8 @@
if ((moment(data.categories[i], 'YYYY-MM-DD').format('ddd') == 'Sat') ||
(moment(data.categories[i], 'YYYY-MM-DD').format('ddd') == 'Sun')) {
hc_plays_by_stream_type_options.xAxis.plotBands.push({
from: i,
to: i+1,
from: i-0.5,
to: i+0.5,
color: 'rgba(80,80,80,0.3)'
});
}
@@ -429,53 +468,71 @@
data: { y_axis: yaxis },
dataType: "json",
success: function(data) {
var dateArray = [];
for (var i = 0; i < data.categories.length; i++) {
dateArray.push(moment(data.categories[i], 'YYYY-MM').format('MMM YYYY'));
}
hc_plays_by_month_options.yAxis.min = 0;
hc_plays_by_month_options.xAxis.categories = dateArray;
hc_plays_by_month_options.xAxis.categories = data.categories;
hc_plays_by_month_options.series = data.series;
hc_plays_by_month_options.series[2].visible = music_visible;
var hc_plays_by_month = new Highcharts.Chart(hc_plays_by_month_options);
}
});
}
// Set initial state
loadGraphsTab1(current_range, yaxis);
if (current_tab == '#tabs-1') { loadGraphsTab1(current_range, yaxis); }
if (current_tab == '#tabs-2') { loadGraphsTab2(current_range, yaxis); }
if (current_tab == '#tabs-3') { loadGraphsTab3(yaxis); }
// Tab1 opened
$('#graph-tabs a[href="#tabs-1"]').on('shown.bs.tab', function (e) {
e.preventDefault();
current_tab = $(this).attr('href');
$('#days-selection').show();
loadGraphsTab1(current_range, yaxis);
$.ajax({
url: 'set_graph_config',
data: { graph_tab: current_tab.replace('#','') },
async: true
});
})
// Tab2 opened
$('#graph-tabs a[href="#tabs-2"]').on('shown.bs.tab', function (e) {
e.preventDefault();
current_tab = $(this).attr('href');
$('#days-selection').show();
loadGraphsTab2(current_range, yaxis);
$.ajax({
url: 'set_graph_config',
data: { graph_tab: current_tab.replace('#','') },
async: true
});
})
// Tab3 opened
$('#graph-tabs a[href="#tabs-3"]').on('shown.bs.tab', function (e) {
e.preventDefault();
current_tab = $(this).attr('href');
$('#days-selection').hide();
console.log('loading....');
loadGraphsTab3(yaxis);
$.ajax({
url: 'set_graph_config',
data: { graph_tab: current_tab.replace('#','') },
async: true
});
})
// Date range changed
$('#days-selection').on('change', function() {
current_range = $('input[name=date-options]:checked', '#days-selection').val();
$('#graph-days').on('change', function() {
current_range = $(this).val();
if (current_range < 1) {
$(this).val(7);
current_range = 7;
}
if (current_tab == '#tabs-1') { loadGraphsTab1(current_range, yaxis); }
if (current_tab == '#tabs-2') { loadGraphsTab2(current_range, yaxis); }
$('.days').html(current_range);
$.ajax({
url: 'set_graph_config',
data: { graph_days: current_range},
async: true
});
});
// Y-axis changed
@@ -484,6 +541,11 @@
if (current_tab == '#tabs-1') { loadGraphsTab1(current_range, yaxis); }
if (current_tab == '#tabs-2') { loadGraphsTab2(current_range, yaxis); }
if (current_tab == '#tabs-3') { loadGraphsTab3(yaxis); }
$.ajax({
url: 'set_graph_config',
data: { graph_type: yaxis},
async: true
});
});
function setGraphFormat(type) {

View File

@@ -13,23 +13,30 @@
<div class="header-bar">
<span><i class="fa fa-history"></i> History</span>
</div>
<div class="colvis-button-bar hidden-xs">
<div class="button-bar">
<div class="colvis-button-bar hidden-xs"></div>
<button class="btn btn-danger btn-edit" data-toggle="button" aria-pressed="false" autocomplete="off" id="row-edit-mode">
<i class="fa fa-trash-o"></i> Delete mode
</button>
<div class="alert alert-danger alert-edit" role="alert" id="row-edit-mode-alert"><i class="fa fa-exclamation-triangle"></i>&nbspSelect rows to delete. Data is deleted upon exiting delete mode.</div>
</div>
</div>
<div class='table-card-back'>
<table class="display" id="history_table" width="100%">
<thead>
<tr>
<th align='left' id="time">Time</th>
<th align='left' id="friendly_name">User</th>
<th align='left' id="platform">Platform</th>
<th align='left' id="ip_address">IP Address</th>
<th align='left' id="title">Title</th>
<th align='left' id="started">Started</th>
<th align='left' id="paused_counter">Paused</th>
<th align='left' id="stopped">Stopped</th>
<th align='left' id="duration">Duration</th>
<th align='left' id="percent_complete">Watched</th>
<th align="left" id="delete_row">Delete</th>
<th align="left" id="time">Time</th>
<th align="left" id="friendly_name">User</th>
<th align="left" id="ip_address">IP Address</th>
<th align="left" id="platform">Platform</th>
<th align="left" id="device">Player</th>
<th align="left" id="title">Title</th>
<th align="left" id="started">Started</th>
<th align="left" id="paused_counter">Paused</th>
<th align="left" id="stopped">Stopped</th>
<th align="left" id="duration">Duration</th>
<th align="left" id="percent_complete"></th>
</tr>
</thead>
<tbody>
@@ -39,6 +46,24 @@
</div>
<div class="modal fade" id="ip-info-modal" tabindex="-1" role="dialog" aria-labelledby="ip-info-modal">
</div>
<div class="modal fade" id="confirm-modal" tabindex="-1" role="dialog" aria-labelledby="confirm-modal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-remove"></i></button>
<h4 class="modal-title" id="myModalLabel">Confirm Delete</h4>
</div>
<div class="modal-body" style="text-align: center;">
<p>Are you REALLY sure you want to delete <strong><span id="deleteCount"></span></strong> history item(s)?</p>
<p>This is permanent and cannot be undone!</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-dark" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-danger btn-ok" data-dismiss="modal" id="confirm-delete">Delete</button>
</div>
</div>
</div>
</div>
</div>
</div>
</%def>
@@ -51,18 +76,87 @@
<script src="interfaces/default/js/moment-with-locale.js"></script>
<script src="interfaces/default/js/tables/history_table.js"></script>
<script>
$(document).ready(function() {
history_table_options.ajax = {
"url": "get_history",
type: "post",
data: function ( d ) {
return { 'json_data': JSON.stringify( d ) };
$(document).ready(function () {
function loadHistoryTable(media_type) {
history_table_options.ajax = {
url: 'get_history',
type: 'post',
data: function (d) {
return {
json_data: JSON.stringify(d),
media_type: media_type
};
}
}
}
history_table = $('#history_table').DataTable(history_table_options);
var colvis = new $.fn.dataTable.ColVis(history_table, { buttonText: 'Select columns', buttonClass: 'btn btn-dark' });
$(colvis.button()).appendTo('div.colvis-button-bar');
});
history_table = $('#history_table').DataTable(history_table_options);
var colvis = new $.fn.dataTable.ColVis(history_table, { buttonText: '<i class="fa fa-columns"></i> Select columns', buttonClass: 'btn btn-dark', exclude: [0, 11] });
$(colvis.button()).appendTo('div.colvis-button-bar');
clearSearchButton('history_table', history_table);
$('#history_table_filter').prepend('<div class="btn-group" data-toggle="buttons" id="media_type-selection" style="padding-right: 15px;"> \
<label class="btn btn-dark active"> \
<input type="radio" name="media_type-filter" id="history-all" value="all" autocomplete="off"> All \
</label> \
<label class="btn btn-dark"> \
<input type="radio" name="media_type-filter" id="history-movies" value="movie" autocomplete="off"> Movies \
</label> \
<label class="btn btn-dark"> \
<input type="radio" name="media_type-filter" id="history-tv_shows" value="episode" autocomplete="off"> TV Shows \
</label> \
<label class="btn btn-dark"> \
<input type="radio" name="media_type-filter" id="history-music" value="track" autocomplete="off"> Music \
</label> \
</div>');
$('#media_type-selection').on('change', function () {
$('#media_type-selection > label').removeClass('active');
selected_filter = $('input[name=media_type-filter]:checked', '#media_type-selection');
$(selected_filter).closest('label').addClass('active');
media_type = $(selected_filter).val();
history_table.draw();
});
}
var media_type = 'all';
loadHistoryTable(media_type);
$('#row-edit-mode').on('click', function() {
$('#row-edit-mode-alert').fadeIn(200);
if ($(this).hasClass('active')) {
if (history_to_delete.length > 0) {
$('#deleteCount').text(history_to_delete.length);
$('#confirm-modal').modal();
$('#confirm-modal').one('click', '#confirm-delete', function () {
for (var i = 0; i < history_to_delete.length; i++) {
$.ajax({
url: 'delete_history_rows',
data: { row_id: history_to_delete[i] },
async: true,
success: function (data) {
var msg = "History deleted";
showMsg(msg, false, true, 2000);
}
});
}
history_table.draw();
});
}
$('.delete-control').each(function () {
$(this).addClass('hidden');
$('#row-edit-mode-alert').fadeOut(200);
});
} else {
history_to_delete = [];
$('.delete-control').each(function() {
$(this).find('button.btn-danger').toggleClass('btn-warning').toggleClass('btn-danger');
$(this).removeClass('hidden');
});
}
});
});
</script>
</%def>

View File

@@ -13,11 +13,11 @@
<table class="display" id="history_table" width="100%">
<thead>
<tr>
<th align='left' id="started">Started</th>
<th align='left' id="stopped">Stopped</th>
<th align='left' id="friendly_name">User</th>
<th align='left' id="platform">Platform</th>
<th align='left' id="title">Title</th>
<th align="left" id="started">Started</th>
<th align="left" id="stopped">Stopped</th>
<th align="left" id="friendly_name">User</th>
<th align="left" id="player">Player</th>
<th align="left" id="title">Title</th>
</tr>
</thead>
<tbody>
@@ -27,22 +27,53 @@
<div class="modal-footer"></div>
</div>
</div>
<div class="modal fade" id="info-modal" tabindex="-1" role="dialog" aria-labelledby="info-modal">
</div>
<script src="interfaces/default/js/tables/history_table_modal.js"></script>
<script>
$(document).ready(function() {
$('#date-header').html(moment('${data}','YYYY-MM-DD').format('ddd MMM Do YYYY'));
history_table_modal_options.ajax = {
"url": "get_history",
type: "post",
url: 'get_history',
type: 'post',
data: function ( d ) {
return { 'json_data': JSON.stringify( d ),
'start_date': '${data}'
};
return {
json_data: JSON.stringify(d),
grouping: false,
start_date: '${data}'
};
}
}
history_table = $('#history_table').DataTable(history_table_modal_options);
clearSearchButton('history_table', history_table);
// Move #info-modal to parent container
if (!($('#history-modal').next().is('#info-modal'))) {
$('#info-modal').appendTo($('#history-modal').parent());
}
$('#history-modal > #info-modal').remove();
$('#history-modal').css('z-index', '1050');
$('.modal-backdrop').not('.modal-backdrop-stack').css('z-index', '1049');
$('.modal-backdrop').not('.modal-backdrop-stack').addClass('modal-backdrop-stack');
$('#info-modal').on('show.bs.modal', function () {
// Fix position to match parent modal
var currentPadding = parseInt($('body').css('padding-right'));
$(this).children('.modal-dialog').css('left', -currentPadding / 2);
$('#history-modal').css('overflow-y', 'hidden');
setTimeout(function () {
$('#info-modal').css('z-index', '1060');
$('.modal-backdrop').not('.modal-backdrop-stack').css('z-index', '1059');
$('.modal-backdrop').not('.modal-backdrop-stack').addClass('modal-backdrop-stack');
}, 0);
});
$('#info-modal').on('hidden.bs.modal', function () {
$('body').addClass('modal-open');
$('#history-modal').css('overflow-y', 'auto');
});
});
</script>
% else:

View File

@@ -9,152 +9,866 @@ Variable names: data [array]
data[array_index] :: Usable parameters
data['stat_id'] Returns the name of the stat. Either 'top_tv', 'popular_tv', 'top_user' or 'top_platform'
data['stat_id'] Returns the name of the stat. Either 'top_tv', 'top_movies', 'popular_tv', 'popular_movies', 'top_user' or 'top_platform'
data['stat_type'] Returns the type of the stat. Either 'total_plays' or 'total_duration'
data['rows'] Returns an array containing stat data
data[array_index]['rows'] :: Usable parameters
row_id Return the db row id for a metadata item if one exists
== Only if 'stat_id' is 'top_tv' or 'popular_tv' ==
== Only if 'stat_id' is 'top_tv' or 'popular_tv' or 'top_movies' or 'popular_movies' or 'top_music' or 'popular_music' or 'last_watched' ==
thumb Return the thumb for the media item.
== Only if 'stat_id' is 'top_tv' or 'popular_tv' or 'top_music' or 'popular_music' ==
grandparent_thumb Returns location of the item's thumbnail. Use with pms_image_proxy.
rating_key Returns the unique identifier for the media item.
title Returns the title for the associated stat.
== Only if 'stat_id' is 'top_tv' or 'top_user' or 'top_platform' ==
== Only if 'stat_id' is 'top_tv' or 'top_movies' or 'top_music' or 'top_user' or 'top_platform' ==
total_plays Returns the count for the associated stat.
total_duration Returns the total duration for the associated stat.
== Only of 'stat_id' is 'popular_tv' ==
== Only of 'stat_id' is 'popular_tv' or 'popular_movies' or 'popular_music' ==
users_watched Returns the count for the associated stat.
== Only if 'stat_id' is 'top_user' ==
thumb Returns url of the user's gravatar. Returns '' if none exists.
== Only if 'stat_id' is 'top_user' or 'last_watched' ==
user_thumb Returns url of the user's gravatar. Returns '' if none exists.
user Returns the username for the associated stat.
user_id Returns the user id for the associated stat.
friendly_name Returns the friendly name of the user for the associated stat.
== Only if 'stat_id' is 'top_platform' ==
platform_type Returns the platform name for the associated stat.
== Only if 'stat_id' is 'top_platform' or 'last_watched' ==
player Returns the player name for the associated stat.
== Only if 'stat_id' is 'last_watched' ==
last_watch Returns the time the media item was last watched.
== Only if 'stat_id' is 'most_concurrent' ==
count Returns the count of the most concurrent streams.
started Returns the start time of the most concurrent streams.
stopped Returns the stop time of the most concurrent streams.
DOCUMENTATION :: END
</%doc>
% if data != None:
% if data[0]['rows']:
<%!
from plexpy import helpers
# Human readable duration
def hd(seconds):
minutes = helpers.cast_to_float(seconds) / 60
if minutes > 60:
hours = int(minutes / 60)
minutes = int(minutes % 60)
if minutes > 0:
return "<h3>" + str(hours) + "</h3><p>hrs</p><h3>" + str(minutes) + "</h3><p>mins</p>"
else:
return "<h3>" + str(hours) + "</h3><p>hrs</p>"
else:
return "<h3>" + str(int(minutes)) + "</h3><p>mins</p>"
%>
% if data:
<ul class="list-unstyled">
% for a in data:
% if a['stat_id'] == 'top_tv':
% if any(top_stat['rows'] for top_stat in data):
% for top_stat in data:
% if top_stat['stat_id'] == 'top_tv' and top_stat['rows']:
<div class="home-platforms-instance">
<li>
<span>
<a href="info?item_id=${a['rows'][0]['rating_key']}">
% if a['rows'][0]['grandparent_thumb']:
<img class="home-platforms-instance-poster"
src="pms_image_proxy?img=${a['rows'][0]['grandparent_thumb']}&width=162&height=240&fallback=poster">
<div class="home-platforms-instance-info">
<div class="home-platforms-instance-name">
<h4>Most Watched TV</h4>
</div>
<div class="home-platforms-instance-playcount">
<h4>
<a href="info?rating_key=${top_stat['rows'][0]['rating_key']}" title="${top_stat['rows'][0]['title']}">
${top_stat['rows'][0]['title']}
</a>
</h4>
% if top_stat['stat_type'] == 'total_plays':
<h3>${top_stat['rows'][0]['total_plays']}</h3>
<p> plays</p>
% else:
<img class="home-platforms-instance-poster" src="interfaces/default/images/poster.png">
${top_stat['rows'][0]['total_duration'] | hd}
% endif
</a>
</span>
<div class="home-platforms-instance-name">
<h4>Most Watched TV</h4>
<h5><a href="info?item_id=${a['rows'][0]['rating_key']}">
${a['rows'][0]['title']}
</a></h5>
</div>
</div>
<div class="user-platforms-instance-playcount">
<h3>${a['rows'][0]['total_plays']}</h3>
<p> plays</p>
</div>
</li>
</div>
% elif a['stat_id'] == 'popular_tv':
<div class="home-platforms-instance">
<li>
<span>
<a href="info?item_id=${a['rows'][0]['rating_key']}">
% if a['rows'][0]['grandparent_thumb'] != '':
<img class="home-platforms-instance-poster"
src="pms_image_proxy?img=${a['rows'][0]['grandparent_thumb']}&width=162&height=240&fallback=poster">
% else:
<img class="home-platforms-instance-poster" src="interfaces/default/images/poster.png">
% endif
</a>
</span>
<div class="home-platforms-instance-name">
<h4>Most Popular TV</h4>
<h5><a href="info?item_id=${a['rows'][0]['rating_key']}">
${a['rows'][0]['title']}
</a></h5>
</div>
<div class="user-platforms-instance-playcount">
<h3>${a['rows'][0]['users_watched']}</h3>
<p> users</p>
</div>
</li>
</div>
% elif a['stat_id'] == 'top_users':
<div class="home-platforms-instance">
<li>
<span>
% if a['rows'][0]['user_id']:
<a href="user?user_id=${a['rows'][0]['user_id']}">
% else:
<a href="user?user=${a['rows'][0]['user']}">
<a href="info?rating_key=${top_stat['rows'][0]['rating_key']}" title="${top_stat['rows'][0]['title']}">
% if top_stat['rows'][0]['grandparent_thumb']:
<div class="home-platforms-instance-poster">
<div class="home-platforms-poster-face" style="background-image: url(pms_image_proxy?img=${top_stat['rows'][0]['grandparent_thumb']}&width=300&height=450&fallback=poster);"></div>
</div>
% else:
<div class="home-platforms-instance-poster">
<div class="home-platforms-poster-face" style="background-image: url(interfaces/default/images/poster.png);"></div>
</div>
% endif
</a>
% if len(top_stat['rows']) > 1:
<div class="home-platforms-instance-list-chevron"><i class="fa fa-chevron-down"></i></div>
<ul class="list-unstyled">
<div class="slider">
<div class="home-platforms-instance-list">
% for row in top_stat['rows']:
% if loop.index > 0:
<li>
<div class="home-platforms-instance-list-info">
<div class="home-platforms-instance-list-name">
<h5>
<a href="info?rating_key=${top_stat['rows'][loop.index]['rating_key']}" title="${top_stat['rows'][loop.index]['title']}">
${top_stat['rows'][loop.index]['title']}
</a>
</h5>
</div>
<div class="home-platforms-instance-list-playcount">
% if top_stat['stat_type'] == 'total_plays':
<h3>${top_stat['rows'][loop.index]['total_plays']}</h3>
<p> plays</p>
% else:
${top_stat['rows'][loop.index]['total_duration'] | hd}
% endif
</div>
</div>
<a href="info?rating_key=${top_stat['rows'][loop.index]['rating_key']}" title="${top_stat['rows'][loop.index]['title']}">
% if top_stat['rows'][loop.index]['grandparent_thumb']:
<div class="home-platforms-instance-list-poster">
<div class="home-platforms-list-poster-face" style="background-image: url(pms_image_proxy?img=${top_stat['rows'][loop.index]['grandparent_thumb']}&width=300&height=450&fallback=poster);"></div>
</div>
% else:
<div class="home-platforms-instance-poster2">
<div class="home-platforms-list-poster-face" style="background-image: url(interfaces/default/images/poster.png);"></div>
</div>
% endif
</a>
<div class="home-platforms-instance-list-number">
<h4>${loop.index + 1}</h4>
</div>
</li>
% endif
% if a['rows'][0]['thumb'] != '':
<img class="home-platforms-instance-oval" src="${a['rows'][0]['thumb']}"
class="poster-face">
% endfor
</div>
</div>
</ul>
% endif
</li>
</div>
% elif top_stat['stat_id'] == 'popular_tv' and top_stat['rows']:
<div class="home-platforms-instance">
<li>
<div class="home-platforms-instance-info">
<div class="home-platforms-instance-name">
<h4>Most Popular TV</h4>
</div>
<div class="home-platforms-instance-playcount">
<h4>
<a href="info?rating_key=${top_stat['rows'][0]['rating_key']}" title="${top_stat['rows'][0]['title']}">
${top_stat['rows'][0]['title']}
</a>
</h4>
<h3>${top_stat['rows'][0]['users_watched']}</h3>
<p> users</p>
</div>
</div>
<a href="info?rating_key=${top_stat['rows'][0]['rating_key']}" title="${top_stat['rows'][0]['title']}">
% if top_stat['rows'][0]['grandparent_thumb'] != '':
<div class="home-platforms-instance-poster">
<div class="home-platforms-poster-face" style="background-image: url(pms_image_proxy?img=${top_stat['rows'][0]['grandparent_thumb']}&width=300&height=450&fallback=poster);"></div>
</div>
% else:
<div class="home-platforms-instance-poster">
<div class="home-platforms-poster-face" style="background-image: url(interfaces/default/images/poster.png);"></div>
</div>
% endif
</a>
% if len(top_stat['rows']) > 1:
<div class="home-platforms-instance-list-chevron"><i class="fa fa-chevron-down"></i></div>
<ul class="list-unstyled">
<div class="slider">
<div class="home-platforms-instance-list">
% for row in top_stat['rows']:
% if loop.index > 0:
<li>
<div class="home-platforms-instance-list-info">
<div class="home-platforms-instance-list-name">
<h5>
<a href="info?rating_key=${top_stat['rows'][loop.index]['rating_key']}" title="${top_stat['rows'][loop.index]['title']}">
${top_stat['rows'][loop.index]['title']}
</a>
</h5>
</div>
<div class="home-platforms-instance-list-playcount">
<h3>${top_stat['rows'][loop.index]['users_watched']}</h3>
<p> users</p>
</div>
</div>
<a href="info?rating_key=${top_stat['rows'][loop.index]['rating_key']}" title="${top_stat['rows'][loop.index]['title']}">
% if top_stat['rows'][loop.index]['grandparent_thumb']:
<div class="home-platforms-instance-list-poster">
<div class="home-platforms-list-poster-face" style="background-image: url(pms_image_proxy?img=${top_stat['rows'][loop.index]['grandparent_thumb']}&width=300&height=450&fallback=poster);"></div>
</div>
% else:
<div class="home-platforms-instance-poster2">
<div class="home-platforms-list-poster-face" style="background-image: url(interfaces/default/images/poster.png);"></div>
</div>
% endif
</a>
<div class="home-platforms-instance-list-number">
<h4>${loop.index + 1}</h4>
</div>
</li>
% endif
% endfor
</div>
</div>
</ul>
% endif
</li>
</div>
% elif top_stat['stat_id'] == 'top_movies' and top_stat['rows']:
<div class="home-platforms-instance">
<li>
<div class="home-platforms-instance-info">
<div class="home-platforms-instance-name">
<h4>Most Watched Movie</h4>
</div>
<div class="home-platforms-instance-playcount">
<h4>
<a href="info?rating_key=${top_stat['rows'][0]['rating_key']}" title="${top_stat['rows'][0]['title']}">
${top_stat['rows'][0]['title']}
</a>
</h4>
% if top_stat['stat_type'] == 'total_plays':
<h3>${top_stat['rows'][0]['total_plays']}</h3>
<p> plays</p>
% else:
${top_stat['rows'][0]['total_duration'] | hd}
% endif
</div>
</div>
<a href="info?rating_key=${top_stat['rows'][0]['rating_key']}" title="${top_stat['rows'][0]['title']}">
% if top_stat['rows'][0]['thumb']:
<div class="home-platforms-instance-poster">
<div class="home-platforms-poster-face" style="background-image: url(pms_image_proxy?img=${top_stat['rows'][0]['thumb']}&width=300&height=450&fallback=poster);"></div>
</div>
% else:
<div class="home-platforms-instance-poster">
<div class="home-platforms-poster-face" style="background-image: url(interfaces/default/images/poster.png);"></div>
</div>
% endif
</a>
% if len(top_stat['rows']) > 1:
<div class="home-platforms-instance-list-chevron"><i class="fa fa-chevron-down"></i></div>
<ul class="list-unstyled">
<div class="slider">
<div class="home-platforms-instance-list">
% for row in top_stat['rows']:
% if loop.index > 0:
<li>
<div class="home-platforms-instance-list-info">
<div class="home-platforms-instance-list-name">
<h5>
<a href="info?rating_key=${top_stat['rows'][loop.index]['rating_key']}" title="${top_stat['rows'][loop.index]['title']}">
${top_stat['rows'][loop.index]['title']}
</a>
</h5>
</div>
<div class="home-platforms-instance-list-playcount">
% if top_stat['stat_type'] == 'total_plays':
<h3>${top_stat['rows'][loop.index]['total_plays']}</h3>
<p> plays</p>
% else:
${top_stat['rows'][loop.index]['total_duration'] | hd}
% endif
</div>
</div>
<a href="info?rating_key=${top_stat['rows'][loop.index]['rating_key']}" title="${top_stat['rows'][loop.index]['title']}">
% if top_stat['rows'][loop.index]['thumb']:
<div class="home-platforms-instance-list-poster">
<div class="home-platforms-list-poster-face" style="background-image: url(pms_image_proxy?img=${top_stat['rows'][loop.index]['thumb']}&width=300&height=450&fallback=poster);"></div>
</div>
% else:
<div class="home-platforms-instance-poster2">
<div class="home-platforms-list-poster-face" style="background-image: url(interfaces/default/images/poster.png);"></div>
</div>
% endif
</a>
<div class="home-platforms-instance-list-number">
<h4>${loop.index + 1}</h4>
</div>
</li>
% endif
% endfor
</div>
</div>
</ul>
% endif
</li>
</div>
% elif top_stat['stat_id'] == 'popular_movies' and top_stat['rows']:
<div class="home-platforms-instance">
<li>
<div class="home-platforms-instance-info">
<div class="home-platforms-instance-name">
<h4>Most Popular Movie</h4>
</div>
<div class="home-platforms-instance-playcount">
<h4>
<a href="info?rating_key=${top_stat['rows'][0]['rating_key']}" title="${top_stat['rows'][0]['title']}">
${top_stat['rows'][0]['title']}
</a>
</h4>
<h3>${top_stat['rows'][0]['users_watched']}</h3>
<p> users</p>
</div>
</div>
<a href="info?rating_key=${top_stat['rows'][0]['rating_key']}" title="${top_stat['rows'][0]['title']}">
% if top_stat['rows'][0]['thumb']:
<div class="home-platforms-instance-poster">
<div class="home-platforms-poster-face" style="background-image: url(pms_image_proxy?img=${top_stat['rows'][0]['thumb']}&width=300&height=450&fallback=poster);"></div>
</div>
% else:
<div class="home-platforms-instance-poster">
<div class="home-platforms-poster-face" style="background-image: url(interfaces/default/images/poster.png);"></div>
</div>
% endif
</a>
% if len(top_stat['rows']) > 1:
<div class="home-platforms-instance-list-chevron"><i class="fa fa-chevron-down"></i></div>
<ul class="list-unstyled">
<div class="slider">
<div class="home-platforms-instance-list">
% for row in top_stat['rows']:
% if loop.index > 0:
<li>
<div class="home-platforms-instance-list-info">
<div class="home-platforms-instance-list-name">
<h5>
<a href="info?rating_key=${top_stat['rows'][loop.index]['rating_key']}" title="${top_stat['rows'][loop.index]['title']}">
${top_stat['rows'][loop.index]['title']}
</a>
</h5>
</div>
<div class="home-platforms-instance-list-playcount">
<h3>${top_stat['rows'][loop.index]['users_watched']}</h3>
<p> users</p>
</div>
</div>
<a href="info?rating_key=${top_stat['rows'][loop.index]['rating_key']}" title="${top_stat['rows'][loop.index]['title']}">
% if top_stat['rows'][loop.index]['thumb']:
<div class="home-platforms-instance-list-poster">
<div class="home-platforms-list-poster-face" style="background-image: url(pms_image_proxy?img=${top_stat['rows'][loop.index]['thumb']}&width=300&height=450&fallback=poster);"></div>
</div>
% else:
<div class="home-platforms-instance-poster2">
<div class="home-platforms-list-poster-face" style="background-image: url(interfaces/default/images/poster.png);"></div>
</div>
% endif
</a>
<div class="home-platforms-instance-list-number">
<h4>${loop.index + 1}</h4>
</div>
</li>
% endif
% endfor
</div>
</div>
</ul>
% endif
</li>
</div>
% elif top_stat['stat_id'] == 'top_music' and top_stat['rows']:
<div class="home-platforms-instance">
<li>
<div class="home-platforms-instance-info">
<div class="home-platforms-instance-name">
<h4>Most Listened to Artist</h4>
</div>
<div class="home-platforms-instance-playcount">
<h4>
<a href="info?rating_key=${top_stat['rows'][0]['rating_key']}" title="${top_stat['rows'][0]['title']}">
${top_stat['rows'][0]['title']}
</a>
</h4>
% if top_stat['stat_type'] == 'total_plays':
<h3>${top_stat['rows'][0]['total_plays']}</h3>
<p> plays</p>
% else:
${top_stat['rows'][0]['total_duration'] | hd}
% endif
</div>
</div>
<a href="info?rating_key=${top_stat['rows'][0]['rating_key']}" title="${top_stat['rows'][0]['title']}">
% if top_stat['rows'][0]['grandparent_thumb']:
<div class="home-platforms-instance-poster">
<div class="home-platforms-poster-face" style="background-image: url(pms_image_proxy?img=${top_stat['rows'][0]['grandparent_thumb']}&width=300&height=300&fallback=poster);"></div>
</div>
% else:
<div class="home-platforms-instance-poster">
<div class="home-platforms-poster-face" style="background-image: url(interfaces/default/images/poster.png);"></div>
</div>
% endif
</a>
% if len(top_stat['rows']) > 1:
<div class="home-platforms-instance-list-chevron"><i class="fa fa-chevron-down"></i></div>
<ul class="list-unstyled">
<div class="slider">
<div class="home-platforms-instance-list">
% for row in top_stat['rows']:
% if loop.index > 0:
<li>
<div class="home-platforms-instance-list-info">
<div class="home-platforms-instance-list-name">
<h5>
<a href="info?rating_key=${top_stat['rows'][loop.index]['rating_key']}" title="${top_stat['rows'][loop.index]['title']}">
${top_stat['rows'][loop.index]['title']}
</a>
</h5>
</div>
<div class="home-platforms-instance-list-playcount">
% if top_stat['stat_type'] == 'total_plays':
<h3>${top_stat['rows'][loop.index]['total_plays']}</h3>
<p> plays</p>
% else:
${top_stat['rows'][loop.index]['total_duration'] | hd}
% endif
</div>
</div>
<a href="info?rating_key=${top_stat['rows'][loop.index]['rating_key']}" title="${top_stat['rows'][loop.index]['title']}">
% if top_stat['rows'][loop.index]['grandparent_thumb']:
<div class="home-platforms-instance-list-poster">
<div class="home-platforms-list-poster-face" style="background-image: url(pms_image_proxy?img=${top_stat['rows'][loop.index]['grandparent_thumb']}&width=300&height=300&fallback=poster);"></div>
</div>
% else:
<div class="home-platforms-instance-poster2">
<div class="home-platforms-list-poster-face" style="background-image: url(interfaces/default/images/poster.png);"></div>
</div>
% endif
</a>
<div class="home-platforms-instance-list-number">
<h4>${loop.index + 1}</h4>
</div>
</li>
% endif
% endfor
</div>
</div>
</ul>
% endif
</li>
</div>
% elif top_stat['stat_id'] == 'popular_music' and top_stat['rows']:
<div class="home-platforms-instance">
<li>
<div class="home-platforms-instance-info">
<div class="home-platforms-instance-name">
<h4>Most Popular Artist</h4>
</div>
<div class="home-platforms-instance-playcount">
<h4>
<a href="info?rating_key=${top_stat['rows'][0]['rating_key']}" title="${top_stat['rows'][0]['title']}">
${top_stat['rows'][0]['title']}
</a>
</h4>
<h3>${top_stat['rows'][0]['users_watched']}</h3>
<p> users</p>
</div>
</div>
<a href="info?rating_key=${top_stat['rows'][0]['rating_key']}" title="${top_stat['rows'][0]['title']}">
% if top_stat['rows'][0]['grandparent_thumb'] != '':
<div class="home-platforms-instance-poster">
<div class="home-platforms-poster-face" style="background-image: url(pms_image_proxy?img=${top_stat['rows'][0]['grandparent_thumb']}&width=300&height=300&fallback=poster);"></div>
</div>
% else:
<div class="home-platforms-instance-poster">
<div class="home-platforms-poster-face" style="background-image: url(interfaces/default/images/poster.png);"></div>
</div>
% endif
</a>
% if len(top_stat['rows']) > 1:
<div class="home-platforms-instance-list-chevron"><i class="fa fa-chevron-down"></i></div>
<ul class="list-unstyled">
<div class="slider">
<div class="home-platforms-instance-list">
% for row in top_stat['rows']:
% if loop.index > 0:
<li>
<div class="home-platforms-instance-list-info">
<div class="home-platforms-instance-list-name">
<h5>
<a href="info?rating_key=${top_stat['rows'][loop.index]['rating_key']}" title="${top_stat['rows'][loop.index]['title']}">
${top_stat['rows'][loop.index]['title']}
</a>
</h5>
</div>
<div class="home-platforms-instance-list-playcount">
<h3>${top_stat['rows'][loop.index]['users_watched']}</h3>
<p> users</p>
</div>
</div>
<a href="info?rating_key=${top_stat['rows'][loop.index]['rating_key']}" title="${top_stat['rows'][loop.index]['title']}">
% if top_stat['rows'][loop.index]['grandparent_thumb']:
<div class="home-platforms-instance-list-poster">
<div class="home-platforms-list-poster-face" style="background-image: url(pms_image_proxy?img=${top_stat['rows'][loop.index]['grandparent_thumb']}&width=300&height=300&fallback=poster);"></div>
</div>
% else:
<div class="home-platforms-instance-poster2">
<div class="home-platforms-list-poster-face" style="background-image: url(interfaces/default/images/poster.png);"></div>
</div>
% endif
</a>
<div class="home-platforms-instance-list-number">
<h4>${loop.index + 1}</h4>
</div>
</li>
% endif
% endfor
</div>
</div>
</ul>
% endif
</li>
</div>
% elif top_stat['stat_id'] == 'top_users' and top_stat['rows']:
<div class="home-platforms-instance">
<li>
<div class="home-platforms-instance-info">
<div class="home-platforms-instance-name">
<h4>Most Active User</h4>
</div>
<div class="home-platforms-instance-playcount">
<h4>
% if top_stat['rows'][0]['user_id']:
<a href="user?user_id=${top_stat['rows'][0]['user_id']}" title="${top_stat['rows'][0]['friendly_name']}">
% else:
<img class="home-platforms-instance-oval"
src="interfaces/default/images/gravatar-default.png">
<a href="user?user=${top_stat['rows'][0]['user']}" title="${top_stat['rows'][0]['friendly_name']}">
% endif
</a>
</span>
<div class="home-platforms-instance-name">
<h4>Most Active User</h4>
<h5>
% if a['rows'][0]['user_id']:
<a href="user?user_id=${a['rows'][0]['user_id']}">
${top_stat['rows'][0]['friendly_name']}
</a>
</h4>
% if top_stat['stat_type'] == 'total_plays':
<h3>${top_stat['rows'][0]['total_plays']}</h3>
<p> plays</p>
% else:
<a href="user?user=${a['rows'][0]['user']}">
${top_stat['rows'][0]['total_duration'] | hd}
% endif
</div>
</div>
% if top_stat['rows'][0]['user_id']:
<a href="user?user_id=${top_stat['rows'][0]['user_id']}" title="${top_stat['rows'][0]['friendly_name']}">
% else:
<a href="user?user=${top_stat['rows'][0]['user']}" title="${top_stat['rows'][0]['friendly_name']}">
% endif
% if top_stat['rows'][0]['user_thumb'] != '':
<div class="home-platforms-instance-poster">
<div class="home-platforms-instance-oval" style="background-image: url(${top_stat['rows'][0]['user_thumb']});"></div>
</div>
% else:
<div class="home-platforms-instance-poster">
<div class="home-platforms-instance-oval" style="background-image: url(interfaces/default/images/gravatar-default.png);"></div>
</div>
% endif
</a>
% if len(top_stat['rows']) > 1:
<div class="home-platforms-instance-list-chevron"><i class="fa fa-chevron-down"></i></div>
<ul class="list-unstyled">
<div class="slider">
<div class="home-platforms-instance-list">
% for row in top_stat['rows']:
% if loop.index > 0:
<li>
<div class="home-platforms-instance-list-info">
<div class="home-platforms-instance-list-name">
<h5>
% if top_stat['rows'][loop.index]['user_id']:
<a href="user?user_id=${top_stat['rows'][loop.index]['user_id']}" title="${top_stat['rows'][loop.index]['friendly_name']}">
% else:
<a href="user?user=${top_stat['rows'][loop.index]['user']}" title="${top_stat['rows'][loop.index]['friendly_name']}">
% endif
${top_stat['rows'][loop.index]['friendly_name']}
</a>
</h5>
</div>
<div class="home-platforms-instance-list-playcount">
% if top_stat['stat_type'] == 'total_plays':
<h3>${top_stat['rows'][loop.index]['total_plays']}</h3>
<p> plays</p>
% else:
${top_stat['rows'][loop.index]['total_duration'] | hd}
% endif
</div>
</div>
% if top_stat['rows'][loop.index]['user_id']:
<a href="user?user_id=${top_stat['rows'][loop.index]['user_id']}" title="${top_stat['rows'][loop.index]['friendly_name']}">
% else:
<a href="user?user=${top_stat['rows'][loop.index]['user']}" title="${top_stat['rows'][loop.index]['friendly_name']}">
% endif
% if top_stat['rows'][loop.index]['user_thumb'] != '':
<div class="home-platforms-instance-poster">
<div class="home-platforms-instance-list-oval" style="background-image: url(${top_stat['rows'][loop.index]['user_thumb']});"></div>
</div>
% else:
<div class="home-platforms-instance-poster">
<div class="home-platforms-instance-list-oval" style="background-image: url(interfaces/default/images/gravatar-default.png);"></div>
</div>
% endif
</a>
<div class="home-platforms-instance-list-number">
<h4>${loop.index + 1}</h4>
</div>
</li>
% endif
${a['rows'][0]['friendly_name']}
</a>
</h5>
</div>
<div class="user-platforms-instance-playcount">
<h3>${a['rows'][0]['total_plays']}</h3>
<p> plays</p>
</div>
% endfor
</div>
</div>
</ul>
% endif
</li>
</div>
% elif a['stat_id'] == 'top_platforms':
% elif top_stat['stat_id'] == 'top_platforms' and top_stat['rows']:
<div class="home-platforms-instance">
<li>
<div id="platform-stat">
<img class="home-platforms-instance-box" src="interfaces/default/images/platforms/default.png">
<div class="home-platforms-instance-info">
<div class="home-platforms-instance-name">
<h4>Most Active Platform</h4>
</div>
<div class="home-platforms-instance-playcount">
<h4 title="${top_stat['rows'][0]['platform_type']}">${top_stat['rows'][0]['platform_type']}</h4>
% if top_stat['stat_type'] == 'total_plays':
<h3>${top_stat['rows'][0]['total_plays']}</h3>
<p> plays</p>
% else:
${top_stat['rows'][0]['total_duration'] | hd}
% endif
</div>
</div>
<div class="home-platforms-instance-name">
<h4>Most Active Platform</h4>
<h5>${a['rows'][0]['platform_type']}</h5>
</div>
<div class="user-platforms-instance-playcount">
<h3>${a['rows'][0]['total_plays']}</h3>
<p> plays</p>
<div id="platform-stat" class="home-platforms-instance-poster" title="${top_stat['rows'][0]['platform_type']}">
<script>
$("#platform-stat").html("<div class='home-platforms-instance-box' style='background-image: url(" + getPlatformImagePath('${top_stat['rows'][0]['platform_type']}') + ");'>");
</script>
</div>
% if len(top_stat['rows']) > 1:
<div class="home-platforms-instance-list-chevron"><i class="fa fa-chevron-down"></i></div>
<ul class="list-unstyled">
<div class="slider">
<div class="home-platforms-instance-list">
% for row in top_stat['rows']:
% if loop.index > 0:
<li>
<div class="home-platforms-instance-list-info">
<div class="home-platforms-instance-list-name">
<h5 title="${top_stat['rows'][loop.index]['platform_type']}">
${top_stat['rows'][loop.index]['platform_type']}
</h5>
</div>
<div class="home-platforms-instance-list-playcount">
% if top_stat['stat_type'] == 'total_plays':
<h3>${top_stat['rows'][loop.index]['total_plays']}</h3>
<p> plays</p>
% else:
${top_stat['rows'][loop.index]['total_duration'] | hd}
% endif
</div>
</div>
<div class="home-platforms-instance-poster" id="home-platforms-instance-poster-${loop.index + 1}" title="${top_stat['rows'][loop.index]['platform_type']}">
<script>
$("#home-platforms-instance-poster-${loop.index + 1}").html("<div class='home-platforms-instance-list-box' style='background-image: url(" + getPlatformImagePath('${top_stat['rows'][loop.index]['platform_type']}') + ");'>");
</script>
</div>
<div class="home-platforms-instance-list-number">
<h4>${loop.index + 1}</h4>
</div>
</li>
% endif
% endfor
</div>
</div>
</ul>
% endif
</li>
</div>
% elif top_stat['stat_id'] == 'last_watched' and top_stat['rows']:
<div class="home-platforms-instance">
<li>
<div class="home-platforms-instance-info">
<div class="home-platforms-instance-name">
<h4>Last Played</h4>
</div>
<div class="home-platforms-instance-last-user">
<h4>
<a href="info?source=history&rating_key=${top_stat['rows'][0]['rating_key']}" title="${top_stat['rows'][0]['title']}">
${top_stat['rows'][0]['title']}
</a>
</h4>
<h5>
% if top_stat['rows'][0]['user_id']:
<a href="user?user_id=${top_stat['rows'][0]['user_id']}" title="${top_stat['rows'][0]['friendly_name']}">
% else:
<a href="user?user=${top_stat['rows'][0]['user']}" title="${top_stat['rows'][0]['friendly_name']}">
% endif
${top_stat['rows'][0]['friendly_name']}
</a>
</h5>
<p>
<span id="last-watch-stat">
<script>
$('#last-watch-stat').text(moment(${top_stat['rows'][0]['last_watch']},"X").format(date_format));
</script>
</span> - ${top_stat['rows'][0]['player']}
</p>
</div>
</div>
<a href="info?source=history&rating_key=${top_stat['rows'][0]['rating_key']}" title="${top_stat['rows'][0]['title']}">
% if top_stat['rows'][0]['thumb']:
<div class="home-platforms-instance-poster">
<div class="home-platforms-poster-face" style="background-image: url(pms_image_proxy?img=${top_stat['rows'][0]['thumb']}&width=300&height=450&fallback=poster);"></div>
</div>
% else:
<div class="home-platforms-instance-poster">
<div class="home-platforms-poster-face" style="background-image: url(interfaces/default/images/poster.png);"></div>
</div>
% endif
</a>
% if len(top_stat['rows']) > 1:
<div class="home-platforms-instance-list-chevron"><i class="fa fa-chevron-down"></i></div>
<ul class="list-unstyled">
<div class="slider">
<div class="home-platforms-instance-list">
% for row in top_stat['rows']:
% if loop.index > 0:
<li>
<div class="home-platforms-instance-list-info">
<div class="home-platforms-instance-list-name">
<h5>
<a href="info?source=history&rating_key=${top_stat['rows'][loop.index]['rating_key']}" title="${top_stat['rows'][loop.index]['title']}">
${top_stat['rows'][loop.index]['title']}
</a>
</h5>
</div>
<div class="home-platforms-instance-list-last-user">
<h5>
% if top_stat['rows'][loop.index]['user_id']:
<a href="user?user_id=${top_stat['rows'][loop.index]['user_id']}" title="${top_stat['rows'][loop.index]['friendly_name']}">
% else:
<a href="user?user=${top_stat['rows'][loop.index]['user']}" title="${top_stat['rows'][loop.index]['friendly_name']}">
% endif
${top_stat['rows'][loop.index]['friendly_name']}
</a>
</h5>
<p>
<span id="home-platforms-instance-list-last-watch-${loop.index + 1}">
<script>
$('#home-platforms-instance-list-last-watch-${loop.index + 1}').text(moment(${top_stat['rows'][loop.index]['last_watch']},"X").format(date_format));
</script>
</span> - ${top_stat['rows'][loop.index]['player']}
</p>
</div>
</div>
<a href="info?source=history&rating_key=${top_stat['rows'][loop.index]['rating_key']}" title="${top_stat['rows'][loop.index]['title']}">
% if top_stat['rows'][loop.index]['thumb']:
<div class="home-platforms-instance-list-poster">
<div class="home-platforms-list-poster-face" style="background-image: url(pms_image_proxy?img=${top_stat['rows'][loop.index]['thumb']}&width=300&height=450&fallback=poster);"></div>
</div>
% else:
<div class="home-platforms-instance-list-poster">
<div class="home-platforms-list-poster-face" style="background-image: url(interfaces/default/images/poster.png);"></div>
</div>
% endif
</a>
<div class="home-platforms-instance-list-number">
<h4>${loop.index + 1}</h4>
</div>
</li>
% endif
% endfor
</div>
</div>
</ul>
% endif
</li>
</div>
% elif top_stat['stat_id'] == 'most_concurrent' and top_stat['rows']:
<div class="home-platforms-instance">
<li>
<div class="home-platforms-instance-info">
<div class="home-platforms-instance-name">
<h4>Most Concurrent Streams</h4>
</div>
<div class="home-platforms-instance-playcount">
<h4>
<span id="most-concurrent-start">
<script>
$('#most-concurrent-start').text(moment(${top_stat['rows'][0]['started']},"X").format(date_format + ' ' + time_format));
</script>
</span>
</h4>
<h3>${top_stat['rows'][0]['count']}</h3>
<p> streams</p>
</div>
</div>
<div class="home-platforms-instance-poster">
<div class="home-platforms-instance-box" style="background-image: url(interfaces/default/images/home-stat_most-concurrent.png);"></div>
</div>
% if len(top_stat['rows']) > 1:
<div class="home-platforms-instance-list-chevron"><i class="fa fa-chevron-down"></i></div>
<ul class="list-unstyled">
<div class="slider">
<div class="home-platforms-instance-list">
% for row in top_stat['rows']:
% if loop.index > 0:
<li>
<div class="home-platforms-instance-list-info">
<div class="home-platforms-instance-list-name">
<h5>
${top_stat['rows'][loop.index]['title']}
</h5>
</div>
<div class="home-platforms-instance-list-playcount">
<h3>${top_stat['rows'][loop.index]['count']}</h3>
<p> streams
% if top_stat['rows'][loop.index]['started']:
- <span id="most-concurrent-start-${loop.index + 1}">
<script>
$('#most-concurrent-start-${loop.index + 1}').text(moment(${top_stat['rows'][loop.index]['started']},"X").format(date_format + ' ' + time_format));
</script>
</span>
% else:
- N/A
% endif
</p>
</div>
</div>
<div class="home-platforms-instance-poster">
<div class="home-platforms-instance-list-box" style="background-image: url(interfaces/default/images/home-stat_most-concurrent.png);"></div>
</div>
</li>
% endif
% endfor
</div>
</div>
</ul>
% endif
</li>
</div>
<script>
$("#platform-stat").html("<img class='home-platforms-instance-box' src='" + getPlatformImagePath('${a['rows'][0]['platform_type']}') + "'>");
</script>
% endif
% endfor
% else:
<div class="text-muted">No stats to show for the selected period.</div><br>
% endif
</ul>
<script>
var topZIndex = 2;
$('.home-platforms-instance-list-chevron').on('click', function() {
var instanceBoxChevron = $(this);
var instanceBox = $(this).parents('.home-platforms-instance');
var instanceBoxSlider = instanceBox.find('.slider');
topZIndex++;
instanceBoxChevron.toggleClass('active');
instanceBoxSlider.css('z-index', topZIndex);
instanceBoxSlider.stop().slideToggle(500);
});
</script>
% else:
<div class="text-muted">No stats for selected period.</div><br>
% endif
% else:
<div class="text-muted">Unable to retrieve data from database. Please check your <a href="settings">settings</a>.
</div><br>
<div class="text-muted">No stats to show for the selected period.</div><br>
% endif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 926 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 662 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 873 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 671 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 671 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 757 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 527 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 523 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 827 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 778 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 928 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 931 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1017 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 821 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 990 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 539 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Some files were not shown because too many files have changed in this diff Show More