Update snapcraft.yaml

This commit is contained in:
JonnyWong16 2020-12-16 17:48:55 -08:00
parent e426b5dd35
commit 7c08b07ef5
No known key found for this signature in database
GPG key ID: B1F1F9807184697A

View file

@ -1,34 +1,48 @@
name: tautulli
version: 'git'
summary: A Python based monitoring and tracking tool for Plex Media Server. # 79 char long summary
description: |
adopt-info: tautulli
summary: A Python based monitoring and tracking tool for Plex Media Server.
description: >
Tautulli is a 3rd party application that you can run alongside your Plex Media Server to monitor activity and track various statistics.
Most importantly, these statistics include what has been watched, who watched it, when and where they watched it, and how it was watched.
The only thing missing is "why they watched it", but who am I to question your 42 plays of Frozen.
All statistics are presented in a nice and clean interface with many tables and graphs, which makes it easy to brag about your server to everyone else.
confinement: strict
grade: stable
base: core18
confinement: strict
parts:
tautulli:
plugin: dump
source: .
stage-packages:
stage-packages:
- python3
- python3-setuptools
- python3-openssl
override-build: |
snapcraftctl build
sed -i "s|'CHECK_GITHUB': (int, 'General', 1),|'CHECK_GITHUB': (int, 'General', 0),|g" $SNAPCRAFT_PART_INSTALL/plexpy/config.py
sed -i "s|'CHECK_GITHUB_ON_STARTUP': (int, 'General', 1),|'CHECK_GITHUB_ON_STARTUP': (int, 'General', 0),|g" $SNAPCRAFT_PART_INSTALL/plexpy/config.py
sed -i 's|<input type="checkbox" name="check_github" id="check_github" value="1" checked>||g' $SNAPCRAFT_PART_INSTALL/data/interfaces/default/welcome.html
sed -i 's|name="plexpy_auto_update" value="1"|name="plexpy_auto_update" value="0"|g' $SNAPCRAFT_PART_INSTALL/data/interfaces/default/settings.html
build-packages:
- git
override-pull: |
snapcraftctl pull
TAG_FULL=$(git describe --tag)
TAG=$(echo $TAG_FULL | grep -oP '(v\d+\.\d+\.\d+(?>-beta)?)')
COMMIT_HASH=$(git rev-parse --short=7 HEAD)
[ "$TAG" = "$TAG_FULL" ] && VERSION=$TAG || VERSION=$COMMIT_HASH
[ "$VERSION" = ${VERSION#v} ] || [ ! "$VERSION" = ${VERSION%-beta} ] && GRADE=devel || GRADE=stable
snapcraftctl set-version "$VERSION"
snapcraftctl set-grade "$GRADE"
apps:
tautulli:
command: python3 $SNAP/Tautulli.py --datadir $SNAP_COMMON/Tautulli --config $SNAP_COMMON/Tautulli/config.ini --quiet --nolaunch
command: >
usr/bin/python3 $SNAP/Tautulli.py
--datadir $SNAP_USER_COMMON/Tautulli
--config $SNAP_USER_COMMON/Tautulli/config.ini
--quiet
--nolaunch
daemon: simple
plugs:
restart-condition: on-abnormal
restart-delay: 5s
plugs:
- network
- network-bind
environment:
TAUTULLI_SNAP: "True"