diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..1749b2d4 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,17 @@ +root = true + +[*] +indent_style = space +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = false +insert_final_newline = false + +[*.yaml] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true \ No newline at end of file diff --git a/.gitignore b/.gitignore index e55fd0af..c868b447 100644 --- a/.gitignore +++ b/.gitignore @@ -81,3 +81,16 @@ _ReSharper*/ #Ignore files generated by pyinstaller /build /dist + +#snapcraft specifics +/parts/ +/stage/ +/prime/ + +*.snap + +.snapcraft +__pycache__ +*.pyc +*_source.tar.bz2 +snap/.snapcraft \ No newline at end of file diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml new file mode 100644 index 00000000..94e7c119 --- /dev/null +++ b/snap/snapcraft.yaml @@ -0,0 +1,28 @@ +name: tautulli +version: 'git' +summary: A Python based monitoring and tracking tool for Plex Media Server. # 79 char long summary +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 + +parts: + tautulli: + plugin: dump + source: . + stage-packages: [python3, python3-setuptools] + 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|||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 +apps: + tautulli: + command: python3 $SNAP/Tautulli.py --datadir $SNAP_COMMON/Tautulli --config $SNAP_COMMON/Tautulli/config.ini --quiet --nolaunch + daemon: simple + plugs: [network, network-bind] \ No newline at end of file