mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-19 21:03:21 -07:00
Merge branch 'dev'
This commit is contained in:
commit
8902b93a26
11 changed files with 38 additions and 33 deletions
15
CHANGELOG.md
15
CHANGELOG.md
|
@ -1,9 +1,16 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 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)
|
## v1.3.2 (2016-01-24)
|
||||||
|
|
||||||
* Fix: 'datestamp' and 'timestamp' for server notifications
|
* Fix: 'datestamp' and 'timestamp' for server notifications.
|
||||||
* Change: New method for updating library data in database
|
* Change: New method for updating library data in database.
|
||||||
|
|
||||||
|
|
||||||
## v1.3.1 (2016-01-23)
|
## v1.3.1 (2016-01-23)
|
||||||
|
@ -13,8 +20,8 @@
|
||||||
* Fix: Star rating overlapping text.
|
* Fix: Star rating overlapping text.
|
||||||
* Fix: Unable to startup when library refresh fails.
|
* Fix: Unable to startup when library refresh fails.
|
||||||
* Fix: Unable to parse 'datestamp' and 'timestamp' format.
|
* Fix: Unable to parse 'datestamp' and 'timestamp' format.
|
||||||
* Change: Rename "Last Watched" to "Last Played"
|
* Change: Rename "Last Watched" to "Last Played".
|
||||||
* Change: More descriptive libraries updating message
|
* Change: More descriptive libraries updating message.
|
||||||
|
|
||||||
|
|
||||||
## v1.3.0 (2016-01-23)
|
## v1.3.0 (2016-01-23)
|
||||||
|
|
|
@ -22,7 +22,7 @@ history_table_options = {
|
||||||
"emptyTable": "No data in table"
|
"emptyTable": "No data in table"
|
||||||
},
|
},
|
||||||
"pagingType": "bootstrap",
|
"pagingType": "bootstrap",
|
||||||
"stateSave": true,
|
"stateSave": false,
|
||||||
"processing": false,
|
"processing": false,
|
||||||
"serverSide": true,
|
"serverSide": true,
|
||||||
"pageLength": 25,
|
"pageLength": 25,
|
||||||
|
|
|
@ -16,7 +16,7 @@ libraries_list_table_options = {
|
||||||
"pageLength": 10,
|
"pageLength": 10,
|
||||||
"order": [ 2, 'asc'],
|
"order": [ 2, 'asc'],
|
||||||
"autoWidth": true,
|
"autoWidth": true,
|
||||||
"stateSave": true,
|
"stateSave": false,
|
||||||
"pagingType": "bootstrap",
|
"pagingType": "bootstrap",
|
||||||
"columnDefs": [
|
"columnDefs": [
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,7 +5,7 @@ var log_table_options = {
|
||||||
"pagingType": "bootstrap",
|
"pagingType": "bootstrap",
|
||||||
"order": [ 0, 'desc'],
|
"order": [ 0, 'desc'],
|
||||||
"pageLength": 50,
|
"pageLength": 50,
|
||||||
"stateSave": true,
|
"stateSave": false,
|
||||||
"language": {
|
"language": {
|
||||||
"search":"Search: ",
|
"search":"Search: ",
|
||||||
"lengthMenu":"Show _MENU_ lines per page",
|
"lengthMenu":"Show _MENU_ lines per page",
|
||||||
|
|
|
@ -5,7 +5,7 @@ var plex_log_table_options = {
|
||||||
"pagingType": "bootstrap",
|
"pagingType": "bootstrap",
|
||||||
"order": [ 0, 'desc'],
|
"order": [ 0, 'desc'],
|
||||||
"pageLength": 50,
|
"pageLength": 50,
|
||||||
"stateSave": true,
|
"stateSave": false,
|
||||||
"language": {
|
"language": {
|
||||||
"search":"Search: ",
|
"search":"Search: ",
|
||||||
"lengthMenu":"Show _MENU_ lines per page",
|
"lengthMenu":"Show _MENU_ lines per page",
|
||||||
|
|
|
@ -4,7 +4,7 @@ sync_table_options = {
|
||||||
"pagingType": "bootstrap",
|
"pagingType": "bootstrap",
|
||||||
"order": [ [ 0, 'desc'], [ 1, 'asc'], [2, 'asc'] ],
|
"order": [ [ 0, 'desc'], [ 1, 'asc'], [2, 'asc'] ],
|
||||||
"pageLength": 25,
|
"pageLength": 25,
|
||||||
"stateSave": true,
|
"stateSave": false,
|
||||||
"language": {
|
"language": {
|
||||||
"search":"Search: ",
|
"search":"Search: ",
|
||||||
"lengthMenu":"Show _MENU_ lines per page",
|
"lengthMenu":"Show _MENU_ lines per page",
|
||||||
|
|
|
@ -8,7 +8,7 @@ user_ip_table_options = {
|
||||||
"infoFiltered":"(filtered from _MAX_ total entries)",
|
"infoFiltered":"(filtered from _MAX_ total entries)",
|
||||||
"emptyTable": "No data in table",
|
"emptyTable": "No data in table",
|
||||||
},
|
},
|
||||||
"stateSave": true,
|
"stateSave": false,
|
||||||
"pagingType": "bootstrap",
|
"pagingType": "bootstrap",
|
||||||
"processing": false,
|
"processing": false,
|
||||||
"serverSide": true,
|
"serverSide": true,
|
||||||
|
|
|
@ -16,7 +16,7 @@ users_list_table_options = {
|
||||||
"pageLength": 10,
|
"pageLength": 10,
|
||||||
"order": [ 2, 'asc'],
|
"order": [ 2, 'asc'],
|
||||||
"autoWidth": true,
|
"autoWidth": true,
|
||||||
"stateSave": true,
|
"stateSave": false,
|
||||||
"pagingType": "bootstrap",
|
"pagingType": "bootstrap",
|
||||||
"columnDefs": [
|
"columnDefs": [
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,9 +14,9 @@
|
||||||
# along with PlexPy. If not, see <http://www.gnu.org/licenses/>.
|
# along with PlexPy. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from plexpy import logger, database, helpers, common
|
from plexpy import logger, database, helpers, common
|
||||||
|
import plexpy
|
||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
import locale
|
|
||||||
|
|
||||||
|
|
||||||
class Graphs(object):
|
class Graphs(object):
|
||||||
|
@ -321,7 +321,7 @@ class Graphs(object):
|
||||||
dt = datetime.datetime(*month_item[:6])
|
dt = datetime.datetime(*month_item[:6])
|
||||||
date_string = dt.strftime('%Y-%m')
|
date_string = dt.strftime('%Y-%m')
|
||||||
|
|
||||||
categories.append(dt.strftime('%b %Y').decode(locale.getlocale()[1]))
|
categories.append(dt.strftime('%b %Y').decode(plexpy.SYS_ENCODING, 'replace'))
|
||||||
series_1_value = 0
|
series_1_value = 0
|
||||||
series_2_value = 0
|
series_2_value = 0
|
||||||
series_3_value = 0
|
series_3_value = 0
|
||||||
|
|
|
@ -35,7 +35,8 @@ def update_section_ids():
|
||||||
monitor_db = database.MonitorDatabase()
|
monitor_db = database.MonitorDatabase()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
query = 'SELECT id, rating_key FROM session_history_metadata WHERE section_id IS NULL'
|
query = 'SELECT id, rating_key, grandparent_rating_key, media_type ' \
|
||||||
|
'FROM session_history_metadata WHERE section_id IS NULL'
|
||||||
history_results = monitor_db.select(query=query)
|
history_results = monitor_db.select(query=query)
|
||||||
query = 'SELECT section_id, section_type FROM library_sections'
|
query = 'SELECT section_id, section_type FROM library_sections'
|
||||||
library_results = monitor_db.select(query=query)
|
library_results = monitor_db.select(query=query)
|
||||||
|
@ -58,38 +59,35 @@ def update_section_ids():
|
||||||
|
|
||||||
# Get rating_key: section_id mapping pairs
|
# Get rating_key: section_id mapping pairs
|
||||||
key_mappings = {}
|
key_mappings = {}
|
||||||
section_type_child = {'movie': 'movie',
|
|
||||||
'show': 'episode',
|
|
||||||
'artist': 'track'}
|
|
||||||
|
|
||||||
pms_connect = pmsconnect.PmsConnect()
|
pms_connect = pmsconnect.PmsConnect()
|
||||||
for library in library_results:
|
for library in library_results:
|
||||||
section_id = library['section_id']
|
section_id = library['section_id']
|
||||||
section_type = section_type_child.get(library['section_type'], None)
|
section_type = library['section_type']
|
||||||
|
|
||||||
if section_type:
|
if section_type != 'photo':
|
||||||
library_children = pms_connect.get_library_children_details(section_id=section_id,
|
library_children = pms_connect.get_library_children_details(section_id=section_id,
|
||||||
section_type=section_type)
|
section_type=section_type)
|
||||||
else:
|
if library_children:
|
||||||
continue
|
children_list = library_children['childern_list']
|
||||||
|
key_mappings.update({child['rating_key']:child['section_id'] for child in children_list})
|
||||||
if library_children:
|
else:
|
||||||
children_list = library_children['childern_list']
|
logger.warn(u"PlexPy Libraries :: Unable to get a list of library items for section_id %s." % section_id)
|
||||||
key_mappings.update({child['rating_key']:child['section_id'] for child in children_list})
|
|
||||||
else:
|
|
||||||
logger.warn(u"PlexPy Libraries :: Unable to get a list of library items for section_id %s." % section_id)
|
|
||||||
|
|
||||||
error_keys = set()
|
error_keys = set()
|
||||||
for item in history_results:
|
for item in history_results:
|
||||||
rating_key = item['rating_key']
|
rating_key = item['grandparent_rating_key'] if item['media_type'] != 'movie' else item['rating_key']
|
||||||
section_id = key_mappings.get(str(rating_key), None)
|
section_id = key_mappings.get(str(rating_key), None)
|
||||||
|
|
||||||
if section_id:
|
if section_id:
|
||||||
section_keys = {'id': item['id']}
|
try:
|
||||||
section_values = {'section_id': section_id}
|
section_keys = {'id': item['id']}
|
||||||
monitor_db.upsert('session_history_metadata', key_dict=section_keys, value_dict=section_values)
|
section_values = {'section_id': section_id}
|
||||||
|
monitor_db.upsert('session_history_metadata', key_dict=section_keys, value_dict=section_values)
|
||||||
|
except:
|
||||||
|
error_keys.add(item['rating_key'])
|
||||||
else:
|
else:
|
||||||
error_keys.add(rating_key)
|
error_keys.add(item['rating_key'])
|
||||||
|
|
||||||
# Remove thread filter from the logger
|
# Remove thread filter from the logger
|
||||||
#for handler in logger.logger.handlers:
|
#for handler in logger.logger.handlers:
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
PLEXPY_VERSION = "master"
|
PLEXPY_VERSION = "master"
|
||||||
PLEXPY_RELEASE_VERSION = "1.3.2"
|
PLEXPY_RELEASE_VERSION = "1.3.3"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue