Skip to content

Commit 86ba4f2

Browse files
Merge pull request #155 from Boerderij/develop
v1.7.4 Merge
2 parents f3286ca + e8ef70b commit 86ba4f2

File tree

6 files changed

+50
-11
lines changed

6 files changed

+50
-11
lines changed

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ latest:
119119
"$CI_PROJECT_PATH":"$TAG-arm"
120120
- docker manifest push -p "$CI_PROJECT_PATH":latest
121121

122-
.github:
122+
github:
123123
<<: *common_release
124124
stage: release
125125
script:

CHANGELOG.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
# Change Log
22

3-
## [v1.7.3](https://github.com/Boerderij/Varken/tree/v1.7.3) (2019-08-09)
4-
[Full Changelog](https://github.com/Boerderij/Varken/compare/1.7.2...v1.7.3)
3+
## [v1.7.4](https://github.com/Boerderij/Varken/tree/v1.7.4) (2019-10-07)
4+
[Full Changelog](https://github.com/Boerderij/Varken/compare/1.7.3...v1.7.4)
5+
6+
**Implemented enhancements:**
7+
8+
- \[Enhancement\] Update Tautulli structures to include grandparent\_guid and parent\_guid [\#154](https://github.com/Boerderij/Varken/issues/154)
9+
- \[Enhancement\] Update Tautulli structures to reflect recent changes [\#153](https://github.com/Boerderij/Varken/issues/153)
10+
11+
**Merged pull requests:**
12+
13+
- v1.7.4 Merge [\#155](https://github.com/Boerderij/Varken/pull/155) ([DirtyCajunRice](https://github.com/DirtyCajunRice))
14+
15+
## [1.7.3](https://github.com/Boerderij/Varken/tree/1.7.3) (2019-08-09)
16+
[Full Changelog](https://github.com/Boerderij/Varken/compare/1.7.2...1.7.3)
517

618
**Implemented enhancements:**
719

@@ -311,4 +323,4 @@
311323
- Create crontabs [\#6](https://github.com/Boerderij/Varken/pull/6) ([ghost](https://github.com/ghost))
312324
- update plex\_dashboard.json [\#5](https://github.com/Boerderij/Varken/pull/5) ([ghost](https://github.com/ghost))
313325
- Update README.md [\#4](https://github.com/Boerderij/Varken/pull/4) ([ghost](https://github.com/ghost))
314-
- added sickrage portion [\#3](https://github.com/Boerderij/Varken/pull/3) ([ghost](https://github.com/ghost))
326+
- added sickrage portion [\#3](https://github.com/Boerderij/Varken/pull/3) ([ghost](https://github.com/ghost))

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[![Discord](https://img.shields.io/discord/518970285773422592.svg?colorB=7289DA&label=Discord&logo=Discord&logoColor=7289DA&style=flat-square)](https://discord.gg/VjZ6qSM)
77
[![ko-fi](https://img.shields.io/badge/Buy%20Us%20A%20Coffee-Donate-ff813f.svg?logo=CoffeeScript&style=flat-square)](https://ko-fi.com/varken)
88
[![Docker-Layers](https://images.microbadger.com/badges/image/boerderij/varken.svg)](https://microbadger.com/images/boerderij/varken)
9-
[![Release](https://img.shields.io/github/release/boerderij/varken.svg?style=flat-square)](https://microbadger.com/images/boerderij/varken)
9+
[![Release](https://img.shields.io/github/release/boerderij/varken.svg?style=flat-square)](https://github.com/Boerderij/Varken/releases/latest)
1010
[![Docker Pulls](https://img.shields.io/docker/pulls/boerderij/varken.svg)](https://hub.docker.com/r/boerderij/varken/)
1111

1212
Dutch for PIG. PIG is an Acronym for Plex/InfluxDB/Grafana

varken/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
VERSION = "1.7.3"
1+
VERSION = "1.7.4"
22
BRANCH = 'master'

varken/structures.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ class TautulliStream(NamedTuple):
306306
friendly_name: str = None
307307
full_title: str = None
308308
genres: list = None
309+
grandparent_guid: str = None
309310
grandparent_rating_key: str = None
310311
grandparent_thumb: str = None
311312
grandparent_title: str = None
@@ -337,6 +338,7 @@ class TautulliStream(NamedTuple):
337338
optimized_version_title: str = None
338339
original_title: str = None
339340
originally_available_at: str = None
341+
parent_guid: str = None
340342
parent_media_index: str = None
341343
parent_rating_key: str = None
342344
parent_thumb: str = None
@@ -398,11 +400,13 @@ class TautulliStream(NamedTuple):
398400
stream_video_codec_level: str = None
399401
stream_video_decision: str = None
400402
stream_video_framerate: str = None
403+
stream_video_full_resolution: str = None
401404
stream_video_height: str = None
402405
stream_video_language: str = None
403406
stream_video_language_code: str = None
404407
stream_video_ref_frames: str = None
405408
stream_video_resolution: str = None
409+
stream_video_scan_type: str = None
406410
stream_video_width: str = None
407411
studio: str = None
408412
sub_type: str = None
@@ -456,12 +460,14 @@ class TautulliStream(NamedTuple):
456460
video_decision: str = None
457461
video_frame_rate: str = None
458462
video_framerate: str = None
463+
video_full_resolution: str = None
459464
video_height: str = None
460465
video_language: str = None
461466
video_language_code: str = None
462467
video_profile: str = None
463468
video_ref_frames: str = None
464469
video_resolution: str = None
470+
video_scan_type: str = None
465471
video_width: str = None
466472
view_offset: str = None
467473
watched_status: int = None

varken/tautulli.py

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ def get_activity(self):
101101
quality = session.container.upper()
102102
elif quality in ('SD', 'sd', '4k'):
103103
quality = session.stream_video_resolution.upper()
104+
elif session.stream_video_full_resolution:
105+
quality = session.stream_video_full_resolution
104106
else:
105107
quality = session.stream_video_resolution + 'p'
106108

@@ -112,10 +114,18 @@ def get_activity(self):
112114
elif player_state == 'buffering':
113115
player_state = 3
114116

117+
# Platform Version Overrides
115118
product_version = session.product_version
116-
if session.platform == 'Roku':
119+
if session.platform in ('Roku', 'osx', 'windows'):
117120
product_version = session.product_version.split('-')[0]
118121

122+
# Platform Overrides
123+
platform_name = session.platform
124+
if platform_name in 'osx':
125+
platform_name = 'macOS'
126+
if platform_name in 'windows':
127+
platform_name = 'Windows'
128+
119129
hash_id = hashit(f'{session.session_id}{session.session_key}{session.username}{session.full_title}')
120130
influx_payload.append(
121131
{
@@ -126,7 +136,8 @@ def get_activity(self):
126136
"friendly_name": session.friendly_name,
127137
"username": session.username,
128138
"title": session.full_title,
129-
"platform": session.platform,
139+
"product": session.product,
140+
"platform": platform_name,
130141
"product_version": product_version,
131142
"quality": quality,
132143
"video_decision": video_decision.title(),
@@ -145,7 +156,7 @@ def get_activity(self):
145156
"latitude": latitude,
146157
"longitude": longitude,
147158
"player_state": player_state,
148-
"device_type": session.platform,
159+
"device_type": platform_name,
149160
"relayed": session.relayed,
150161
"secure": session.secure,
151162
"server": self.server.id
@@ -298,9 +309,18 @@ def get_historical(self, days=30):
298309
quality = session.container.upper()
299310
elif quality in ('SD', 'sd', '4k'):
300311
quality = session.stream_video_resolution.upper()
312+
elif session.stream_video_full_resolution:
313+
quality = session.stream_video_full_resolution
301314
else:
302315
quality = session.stream_video_resolution + 'p'
303316

317+
# Platform Overrides
318+
platform_name = session.platform
319+
if platform_name in 'osx':
320+
platform_name = 'Plex Mac OS'
321+
if platform_name in 'windows':
322+
platform_name = 'Plex Windows'
323+
304324
player_state = 100
305325

306326
hash_id = hashit(f'{session.id}{session.session_key}{session.user}{session.full_title}')
@@ -313,7 +333,8 @@ def get_historical(self, days=30):
313333
"friendly_name": session.friendly_name,
314334
"username": session.user,
315335
"title": session.full_title,
316-
"platform": session.platform,
336+
"product": session.product,
337+
"platform": platform_name,
317338
"quality": quality,
318339
"video_decision": video_decision.title(),
319340
"transcode_decision": decision.title(),
@@ -330,7 +351,7 @@ def get_historical(self, days=30):
330351
"latitude": latitude,
331352
"longitude": longitude,
332353
"player_state": player_state,
333-
"device_type": session.platform,
354+
"device_type": platform_name,
334355
"relayed": session.relayed,
335356
"secure": session.secure,
336357
"server": self.server.id

0 commit comments

Comments
 (0)