Skip to content

Commit

Permalink
Merge pull request #155 from Boerderij/develop
Browse files Browse the repository at this point in the history
v1.7.4 Merge
  • Loading branch information
dirtycajunrice committed Oct 7, 2019
2 parents f3286ca + e8ef70b commit 86ba4f2
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ latest:
"$CI_PROJECT_PATH":"$TAG-arm"
- docker manifest push -p "$CI_PROJECT_PATH":latest

.github:
github:
<<: *common_release
stage: release
script:
Expand Down
18 changes: 15 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
# Change Log

## [v1.7.3](https://github.com/Boerderij/Varken/tree/v1.7.3) (2019-08-09)
[Full Changelog](https://github.com/Boerderij/Varken/compare/1.7.2...v1.7.3)
## [v1.7.4](https://github.com/Boerderij/Varken/tree/v1.7.4) (2019-10-07)
[Full Changelog](https://github.com/Boerderij/Varken/compare/1.7.3...v1.7.4)

**Implemented enhancements:**

- \[Enhancement\] Update Tautulli structures to include grandparent\_guid and parent\_guid [\#154](https://github.com/Boerderij/Varken/issues/154)
- \[Enhancement\] Update Tautulli structures to reflect recent changes [\#153](https://github.com/Boerderij/Varken/issues/153)

**Merged pull requests:**

- v1.7.4 Merge [\#155](https://github.com/Boerderij/Varken/pull/155) ([DirtyCajunRice](https://github.com/DirtyCajunRice))

## [1.7.3](https://github.com/Boerderij/Varken/tree/1.7.3) (2019-08-09)
[Full Changelog](https://github.com/Boerderij/Varken/compare/1.7.2...1.7.3)

**Implemented enhancements:**

Expand Down Expand Up @@ -311,4 +323,4 @@
- Create crontabs [\#6](https://github.com/Boerderij/Varken/pull/6) ([ghost](https://github.com/ghost))
- update plex\_dashboard.json [\#5](https://github.com/Boerderij/Varken/pull/5) ([ghost](https://github.com/ghost))
- Update README.md [\#4](https://github.com/Boerderij/Varken/pull/4) ([ghost](https://github.com/ghost))
- added sickrage portion [\#3](https://github.com/Boerderij/Varken/pull/3) ([ghost](https://github.com/ghost))
- added sickrage portion [\#3](https://github.com/Boerderij/Varken/pull/3) ([ghost](https://github.com/ghost))
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![Discord](https://img.shields.io/discord/518970285773422592.svg?colorB=7289DA&label=Discord&logo=Discord&logoColor=7289DA&style=flat-square)](https://discord.gg/VjZ6qSM)
[![ko-fi](https://img.shields.io/badge/Buy%20Us%20A%20Coffee-Donate-ff813f.svg?logo=CoffeeScript&style=flat-square)](https://ko-fi.com/varken)
[![Docker-Layers](https://images.microbadger.com/badges/image/boerderij/varken.svg)](https://microbadger.com/images/boerderij/varken)
[![Release](https://img.shields.io/github/release/boerderij/varken.svg?style=flat-square)](https://microbadger.com/images/boerderij/varken)
[![Release](https://img.shields.io/github/release/boerderij/varken.svg?style=flat-square)](https://github.com/Boerderij/Varken/releases/latest)
[![Docker Pulls](https://img.shields.io/docker/pulls/boerderij/varken.svg)](https://hub.docker.com/r/boerderij/varken/)

Dutch for PIG. PIG is an Acronym for Plex/InfluxDB/Grafana
Expand Down
2 changes: 1 addition & 1 deletion varken/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
VERSION = "1.7.3"
VERSION = "1.7.4"
BRANCH = 'master'
6 changes: 6 additions & 0 deletions varken/structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ class TautulliStream(NamedTuple):
friendly_name: str = None
full_title: str = None
genres: list = None
grandparent_guid: str = None
grandparent_rating_key: str = None
grandparent_thumb: str = None
grandparent_title: str = None
Expand Down Expand Up @@ -337,6 +338,7 @@ class TautulliStream(NamedTuple):
optimized_version_title: str = None
original_title: str = None
originally_available_at: str = None
parent_guid: str = None
parent_media_index: str = None
parent_rating_key: str = None
parent_thumb: str = None
Expand Down Expand Up @@ -398,11 +400,13 @@ class TautulliStream(NamedTuple):
stream_video_codec_level: str = None
stream_video_decision: str = None
stream_video_framerate: str = None
stream_video_full_resolution: str = None
stream_video_height: str = None
stream_video_language: str = None
stream_video_language_code: str = None
stream_video_ref_frames: str = None
stream_video_resolution: str = None
stream_video_scan_type: str = None
stream_video_width: str = None
studio: str = None
sub_type: str = None
Expand Down Expand Up @@ -456,12 +460,14 @@ class TautulliStream(NamedTuple):
video_decision: str = None
video_frame_rate: str = None
video_framerate: str = None
video_full_resolution: str = None
video_height: str = None
video_language: str = None
video_language_code: str = None
video_profile: str = None
video_ref_frames: str = None
video_resolution: str = None
video_scan_type: str = None
video_width: str = None
view_offset: str = None
watched_status: int = None
Expand Down
31 changes: 26 additions & 5 deletions varken/tautulli.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ def get_activity(self):
quality = session.container.upper()
elif quality in ('SD', 'sd', '4k'):
quality = session.stream_video_resolution.upper()
elif session.stream_video_full_resolution:
quality = session.stream_video_full_resolution
else:
quality = session.stream_video_resolution + 'p'

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

# Platform Version Overrides
product_version = session.product_version
if session.platform == 'Roku':
if session.platform in ('Roku', 'osx', 'windows'):
product_version = session.product_version.split('-')[0]

# Platform Overrides
platform_name = session.platform
if platform_name in 'osx':
platform_name = 'macOS'
if platform_name in 'windows':
platform_name = 'Windows'

hash_id = hashit(f'{session.session_id}{session.session_key}{session.username}{session.full_title}')
influx_payload.append(
{
Expand All @@ -126,7 +136,8 @@ def get_activity(self):
"friendly_name": session.friendly_name,
"username": session.username,
"title": session.full_title,
"platform": session.platform,
"product": session.product,
"platform": platform_name,
"product_version": product_version,
"quality": quality,
"video_decision": video_decision.title(),
Expand All @@ -145,7 +156,7 @@ def get_activity(self):
"latitude": latitude,
"longitude": longitude,
"player_state": player_state,
"device_type": session.platform,
"device_type": platform_name,
"relayed": session.relayed,
"secure": session.secure,
"server": self.server.id
Expand Down Expand Up @@ -298,9 +309,18 @@ def get_historical(self, days=30):
quality = session.container.upper()
elif quality in ('SD', 'sd', '4k'):
quality = session.stream_video_resolution.upper()
elif session.stream_video_full_resolution:
quality = session.stream_video_full_resolution
else:
quality = session.stream_video_resolution + 'p'

# Platform Overrides
platform_name = session.platform
if platform_name in 'osx':
platform_name = 'Plex Mac OS'
if platform_name in 'windows':
platform_name = 'Plex Windows'

player_state = 100

hash_id = hashit(f'{session.id}{session.session_key}{session.user}{session.full_title}')
Expand All @@ -313,7 +333,8 @@ def get_historical(self, days=30):
"friendly_name": session.friendly_name,
"username": session.user,
"title": session.full_title,
"platform": session.platform,
"product": session.product,
"platform": platform_name,
"quality": quality,
"video_decision": video_decision.title(),
"transcode_decision": decision.title(),
Expand All @@ -330,7 +351,7 @@ def get_historical(self, days=30):
"latitude": latitude,
"longitude": longitude,
"player_state": player_state,
"device_type": session.platform,
"device_type": platform_name,
"relayed": session.relayed,
"secure": session.secure,
"server": self.server.id
Expand Down

0 comments on commit 86ba4f2

Please sign in to comment.