Default blank session value when writing session history
This commit is contained in:
@@ -13,6 +13,7 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with Tautulli. If not, see <http://www.gnu.org/licenses/>.
|
# along with Tautulli. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from collections import defaultdict
|
||||||
import json
|
import json
|
||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
@@ -153,9 +154,11 @@ class ActivityProcessor(object):
|
|||||||
logging_enabled = False
|
logging_enabled = False
|
||||||
|
|
||||||
# Reload json from raw stream info
|
# Reload json from raw stream info
|
||||||
if 'raw_stream_info' in session:
|
if session.get('raw_stream_info'):
|
||||||
session.update(json.loads(session['raw_stream_info']))
|
session.update(json.loads(session['raw_stream_info']))
|
||||||
|
|
||||||
|
session = defaultdict(str, session)
|
||||||
|
|
||||||
if is_import:
|
if is_import:
|
||||||
if str(session['stopped']).isdigit():
|
if str(session['stopped']).isdigit():
|
||||||
stopped = int(session['stopped'])
|
stopped = int(session['stopped'])
|
||||||
|
Reference in New Issue
Block a user