Skip to content

Commit 7b71a8a

Browse files
v1.7.5
v1.7.5
2 parents 86ba4f2 + 7ebf3bb commit 7b71a8a

File tree

5 files changed

+25
-12
lines changed

5 files changed

+25
-12
lines changed

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,6 @@ github:
124124
stage: release
125125
script:
126126
- apk add git
127-
- git remote set-url origin "https://$GITHUB_USER:[email protected]/$CI_PROJECT_PATH".git"
127+
- git remote set-url origin "https://$GITHUB_USER:[email protected]/$CI_PROJECT_PATH.git"
128128
- git tag $TAG
129129
- git push --tags

CHANGELOG.md

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

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)
3+
## [v1.7.5](https://github.com/Boerderij/Varken/tree/v1.7.5) (2019-12-11)
4+
[Full Changelog](https://github.com/Boerderij/Varken/compare/1.7.4...v1.7.5)
5+
6+
**Merged pull requests:**
7+
8+
- v1.7.5 Merge [\#162](https://github.com/Boerderij/Varken/pull/162) ([DirtyCajunRice](https://github.com/DirtyCajunRice))
9+
- Add helper itemgetter function for TautulliStream fields [\#157](https://github.com/Boerderij/Varken/pull/157) ([JonnyWong16](https://github.com/JonnyWong16))
10+
- Fix to only use NamedTuple fields from TautulliStream [\#156](https://github.com/Boerderij/Varken/pull/156) ([JonnyWong16](https://github.com/JonnyWong16))
11+
12+
## [1.7.4](https://github.com/Boerderij/Varken/tree/1.7.4) (2019-10-07)
13+
[Full Changelog](https://github.com/Boerderij/Varken/compare/1.7.3...1.7.4)
514

615
**Implemented enhancements:**
716

@@ -24,6 +33,10 @@
2433
- \[BUG\] Varken Crashes when ini is read only [\#146](https://github.com/Boerderij/Varken/issues/146)
2534
- \[BUG\] Missing Available Movies/TV Shows does not take Monitored status into account [\#141](https://github.com/Boerderij/Varken/issues/141)
2635

36+
**Closed issues:**
37+
38+
- \[Feature Request\] Medusa Support [\#148](https://github.com/Boerderij/Varken/issues/148)
39+
2740
**Merged pull requests:**
2841

2942
- v1.7.3 Merge [\#149](https://github.com/Boerderij/Varken/pull/149) ([DirtyCajunRice](https://github.com/DirtyCajunRice))
@@ -323,4 +336,4 @@
323336
- Create crontabs [\#6](https://github.com/Boerderij/Varken/pull/6) ([ghost](https://github.com/ghost))
324337
- update plex\_dashboard.json [\#5](https://github.com/Boerderij/Varken/pull/5) ([ghost](https://github.com/ghost))
325338
- Update README.md [\#4](https://github.com/Boerderij/Varken/pull/4) ([ghost](https://github.com/ghost))
326-
- added sickrage portion [\#3](https://github.com/Boerderij/Varken/pull/3) ([ghost](https://github.com/ghost))
339+
- added sickrage portion [\#3](https://github.com/Boerderij/Varken/pull/3) ([ghost](https://github.com/ghost))

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.4"
1+
VERSION = "1.7.5"
22
BRANCH = 'master'

varken/helpers.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,3 +203,7 @@ def boolcheck(var):
203203
return True
204204
else:
205205
return False
206+
207+
208+
def itemgetter_with_default(**defaults):
209+
return lambda obj: tuple(obj.get(k, v) for k, v in defaults.items())

varken/tautulli.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from influxdb.exceptions import InfluxDBClientError
66

77
from varken.structures import TautulliStream
8-
from varken.helpers import hashit, connection_handler
8+
from varken.helpers import hashit, connection_handler, itemgetter_with_default
99

1010

1111
class TautulliAPI(object):
@@ -34,14 +34,10 @@ def get_activity(self):
3434
return
3535

3636
get = g['response']['data']
37-
38-
# Remove erroneous key from sessions
39-
for session in get['sessions']:
40-
if session.get('_cache_time'):
41-
del session['_cache_time']
37+
fields = itemgetter_with_default(**TautulliStream._field_defaults)
4238

4339
try:
44-
sessions = [TautulliStream(**session) for session in get['sessions']]
40+
sessions = [TautulliStream(*fields(session)) for session in get['sessions']]
4541
except TypeError as e:
4642
self.logger.error('TypeError has occurred : %s while creating TautulliStream structure', e)
4743
return

0 commit comments

Comments
 (0)