From f7146ce056af1b452b6c5d290a5190bb01608bca Mon Sep 17 00:00:00 2001 From: MrDoobPG <46342172+MrDoobPG@users.noreply.github.com> Date: Tue, 26 Nov 2019 20:56:45 +0100 Subject: [PATCH] revert --- menu/roles/traktarr/templates/config.json.j2 | 114 -------------- menu/roles/traktarr/templates/desktop.ini | 4 - menu/traktarr/{##old => }/LICENSE | 0 menu/traktarr/{##old => }/config.json.backup | 0 menu/traktarr/{##old => }/config.json.sample | 0 menu/traktarr/{##old => }/gpl3.tracking | 0 menu/traktarr/{##old => }/helpers/misc.py | 0 menu/traktarr/{##old => }/helpers/radarr.py | 0 menu/traktarr/{##old => }/helpers/rating.py | 0 menu/traktarr/{##old => }/helpers/sonarr.py | 0 menu/traktarr/{##old => }/helpers/str.py | 0 menu/traktarr/{##old => }/helpers/trakt.py | 0 menu/traktarr/{##old => }/media/__init__.py | 0 menu/traktarr/{##old => }/media/pvr.py | 0 menu/traktarr/{##old => }/media/radarr.py | 0 menu/traktarr/{##old => }/media/sonarr.py | 0 menu/traktarr/{##old => }/media/trakt.py | 0 menu/traktarr/{##old => }/misc/__init__.py | 0 menu/traktarr/{##old => }/misc/config.py | 0 menu/traktarr/{##old => }/misc/log.py | 0 .../{##old => }/notifications/__init__.py | 0 .../{##old => }/notifications/pushover.py | 0 .../{##old => }/notifications/slack.py | 0 menu/traktarr/{##old => }/requirements.txt | 0 .../{##old => }/systemd/traktarr.service | 0 .../traktarr-list/prefillallow.yml | 0 .../traktarr-list/prefillremove.yml | 0 .../{##old => }/traktarr-list/traktarr.sh | 0 menu/traktarr/{##old => }/traktarr.py | 0 menu/traktarr/traktarr.sh | 149 +++++++++++++----- menu/traktarr/{##old => }/traktarr.yml | 0 31 files changed, 111 insertions(+), 156 deletions(-) delete mode 100644 menu/roles/traktarr/templates/config.json.j2 delete mode 100644 menu/roles/traktarr/templates/desktop.ini rename menu/traktarr/{##old => }/LICENSE (100%) rename menu/traktarr/{##old => }/config.json.backup (100%) rename menu/traktarr/{##old => }/config.json.sample (100%) rename menu/traktarr/{##old => }/gpl3.tracking (100%) rename menu/traktarr/{##old => }/helpers/misc.py (100%) rename menu/traktarr/{##old => }/helpers/radarr.py (100%) rename menu/traktarr/{##old => }/helpers/rating.py (100%) rename menu/traktarr/{##old => }/helpers/sonarr.py (100%) rename menu/traktarr/{##old => }/helpers/str.py (100%) rename menu/traktarr/{##old => }/helpers/trakt.py (100%) rename menu/traktarr/{##old => }/media/__init__.py (100%) rename menu/traktarr/{##old => }/media/pvr.py (100%) rename menu/traktarr/{##old => }/media/radarr.py (100%) rename menu/traktarr/{##old => }/media/sonarr.py (100%) rename menu/traktarr/{##old => }/media/trakt.py (100%) rename menu/traktarr/{##old => }/misc/__init__.py (100%) rename menu/traktarr/{##old => }/misc/config.py (100%) rename menu/traktarr/{##old => }/misc/log.py (100%) rename menu/traktarr/{##old => }/notifications/__init__.py (100%) rename menu/traktarr/{##old => }/notifications/pushover.py (100%) rename menu/traktarr/{##old => }/notifications/slack.py (100%) rename menu/traktarr/{##old => }/requirements.txt (100%) rename menu/traktarr/{##old => }/systemd/traktarr.service (100%) rename menu/traktarr/{##old => }/traktarr-list/prefillallow.yml (100%) rename menu/traktarr/{##old => }/traktarr-list/prefillremove.yml (100%) rename menu/traktarr/{##old => }/traktarr-list/traktarr.sh (100%) rename menu/traktarr/{##old => }/traktarr.py (100%) rename menu/traktarr/{##old => }/traktarr.yml (100%) diff --git a/menu/roles/traktarr/templates/config.json.j2 b/menu/roles/traktarr/templates/config.json.j2 deleted file mode 100644 index 74186972..00000000 --- a/menu/roles/traktarr/templates/config.json.j2 +++ /dev/null @@ -1,114 +0,0 @@ -{ - "automatic": { - "movies": { - "anticipated": 6, - "boxoffice": 20, - "interval": 24, - "popular": 6, - "trending": 4 - }, - "shows": { - "anticipated": 20, - "interval": 24, - "popular": 2, - "trending": 4 - } - }, - "notifications": { - "verbose": false - }, - "filters": { - "shows": { - "allowed_countries": [ - "us", - "gb", - "ca" - ], - "allowed_languages": [], - "blacklisted_min_runtime": 15, - "blacklisted_min_year": 1980, - "blacklisted_max_year": {{year.stdout}}, - "blacklisted_genres": [ - "animation", - "game-show", - "talk-show", - "home-and-garden", - "children", - "reality", - "anime", - "news", - "documentary", - "special-interest" - ], - "blacklisted_networks": [ - "twitch", - "youtube", - "nickelodeon", - "hallmark", - "reelzchannel", - "disney", - "cnn", - "cbbc", - "the movie network", - "teletoon", - "cartoon network", - "espn", - "fox sports", - "yahoo!" - ], - "blacklisted_tvdb_ids": [], - "disabled_for": [] - }, - "movies": { - "allowed_countries": [ - "us", - "gb", - "ca" - ], - "allowed_languages": [], - "blacklisted_genres": [ - "documentary", - "music", - "short", - "sporting-event", - "film-noir", - "fan-film" - ], - "blacklist_title_keywords": [ - "untitled", - "barbie", - "ufc" - ], - "blacklisted_min_runtime": 30, - "blacklisted_min_year": 1980, - "blacklisted_max_year": {{year.stdout}}, - "blacklisted_tmdb_ids": [], - "allowed_countries": [ - "us", - "gb", - "ca" - ], - "disabled_for": [] - } - }, - "core": { - "debug": false - }, - "radarr": { - "api_key": "{{rapi.stdout}}", - "profile": "{{rprofile.stdout}}", - "url": "http://0.0.0.0:7878", - "root_folder": "{{rpath.stdout}}" - }, - "sonarr": { - "api_key": "{{sapi.stdout}}", - "profile": "{{sprofile.stdout}}", - "url": "http://0.0.0.0:8989" - "root_folder": "{{spath.stdout}}", - "tags": {} - }, - "trakt": { - "client_id": "{{client.stdout}}", - "client_secret": "{{secret.stdout}}" - } -} \ No newline at end of file diff --git a/menu/roles/traktarr/templates/desktop.ini b/menu/roles/traktarr/templates/desktop.ini deleted file mode 100644 index d957fd18..00000000 --- a/menu/roles/traktarr/templates/desktop.ini +++ /dev/null @@ -1,4 +0,0 @@ -[ViewState] -Mode= -Vid= -FolderType=Generic diff --git a/menu/traktarr/##old/LICENSE b/menu/traktarr/LICENSE similarity index 100% rename from menu/traktarr/##old/LICENSE rename to menu/traktarr/LICENSE diff --git a/menu/traktarr/##old/config.json.backup b/menu/traktarr/config.json.backup similarity index 100% rename from menu/traktarr/##old/config.json.backup rename to menu/traktarr/config.json.backup diff --git a/menu/traktarr/##old/config.json.sample b/menu/traktarr/config.json.sample similarity index 100% rename from menu/traktarr/##old/config.json.sample rename to menu/traktarr/config.json.sample diff --git a/menu/traktarr/##old/gpl3.tracking b/menu/traktarr/gpl3.tracking similarity index 100% rename from menu/traktarr/##old/gpl3.tracking rename to menu/traktarr/gpl3.tracking diff --git a/menu/traktarr/##old/helpers/misc.py b/menu/traktarr/helpers/misc.py similarity index 100% rename from menu/traktarr/##old/helpers/misc.py rename to menu/traktarr/helpers/misc.py diff --git a/menu/traktarr/##old/helpers/radarr.py b/menu/traktarr/helpers/radarr.py similarity index 100% rename from menu/traktarr/##old/helpers/radarr.py rename to menu/traktarr/helpers/radarr.py diff --git a/menu/traktarr/##old/helpers/rating.py b/menu/traktarr/helpers/rating.py similarity index 100% rename from menu/traktarr/##old/helpers/rating.py rename to menu/traktarr/helpers/rating.py diff --git a/menu/traktarr/##old/helpers/sonarr.py b/menu/traktarr/helpers/sonarr.py similarity index 100% rename from menu/traktarr/##old/helpers/sonarr.py rename to menu/traktarr/helpers/sonarr.py diff --git a/menu/traktarr/##old/helpers/str.py b/menu/traktarr/helpers/str.py similarity index 100% rename from menu/traktarr/##old/helpers/str.py rename to menu/traktarr/helpers/str.py diff --git a/menu/traktarr/##old/helpers/trakt.py b/menu/traktarr/helpers/trakt.py similarity index 100% rename from menu/traktarr/##old/helpers/trakt.py rename to menu/traktarr/helpers/trakt.py diff --git a/menu/traktarr/##old/media/__init__.py b/menu/traktarr/media/__init__.py similarity index 100% rename from menu/traktarr/##old/media/__init__.py rename to menu/traktarr/media/__init__.py diff --git a/menu/traktarr/##old/media/pvr.py b/menu/traktarr/media/pvr.py similarity index 100% rename from menu/traktarr/##old/media/pvr.py rename to menu/traktarr/media/pvr.py diff --git a/menu/traktarr/##old/media/radarr.py b/menu/traktarr/media/radarr.py similarity index 100% rename from menu/traktarr/##old/media/radarr.py rename to menu/traktarr/media/radarr.py diff --git a/menu/traktarr/##old/media/sonarr.py b/menu/traktarr/media/sonarr.py similarity index 100% rename from menu/traktarr/##old/media/sonarr.py rename to menu/traktarr/media/sonarr.py diff --git a/menu/traktarr/##old/media/trakt.py b/menu/traktarr/media/trakt.py similarity index 100% rename from menu/traktarr/##old/media/trakt.py rename to menu/traktarr/media/trakt.py diff --git a/menu/traktarr/##old/misc/__init__.py b/menu/traktarr/misc/__init__.py similarity index 100% rename from menu/traktarr/##old/misc/__init__.py rename to menu/traktarr/misc/__init__.py diff --git a/menu/traktarr/##old/misc/config.py b/menu/traktarr/misc/config.py similarity index 100% rename from menu/traktarr/##old/misc/config.py rename to menu/traktarr/misc/config.py diff --git a/menu/traktarr/##old/misc/log.py b/menu/traktarr/misc/log.py similarity index 100% rename from menu/traktarr/##old/misc/log.py rename to menu/traktarr/misc/log.py diff --git a/menu/traktarr/##old/notifications/__init__.py b/menu/traktarr/notifications/__init__.py similarity index 100% rename from menu/traktarr/##old/notifications/__init__.py rename to menu/traktarr/notifications/__init__.py diff --git a/menu/traktarr/##old/notifications/pushover.py b/menu/traktarr/notifications/pushover.py similarity index 100% rename from menu/traktarr/##old/notifications/pushover.py rename to menu/traktarr/notifications/pushover.py diff --git a/menu/traktarr/##old/notifications/slack.py b/menu/traktarr/notifications/slack.py similarity index 100% rename from menu/traktarr/##old/notifications/slack.py rename to menu/traktarr/notifications/slack.py diff --git a/menu/traktarr/##old/requirements.txt b/menu/traktarr/requirements.txt similarity index 100% rename from menu/traktarr/##old/requirements.txt rename to menu/traktarr/requirements.txt diff --git a/menu/traktarr/##old/systemd/traktarr.service b/menu/traktarr/systemd/traktarr.service similarity index 100% rename from menu/traktarr/##old/systemd/traktarr.service rename to menu/traktarr/systemd/traktarr.service diff --git a/menu/traktarr/##old/traktarr-list/prefillallow.yml b/menu/traktarr/traktarr-list/prefillallow.yml similarity index 100% rename from menu/traktarr/##old/traktarr-list/prefillallow.yml rename to menu/traktarr/traktarr-list/prefillallow.yml diff --git a/menu/traktarr/##old/traktarr-list/prefillremove.yml b/menu/traktarr/traktarr-list/prefillremove.yml similarity index 100% rename from menu/traktarr/##old/traktarr-list/prefillremove.yml rename to menu/traktarr/traktarr-list/prefillremove.yml diff --git a/menu/traktarr/##old/traktarr-list/traktarr.sh b/menu/traktarr/traktarr-list/traktarr.sh similarity index 100% rename from menu/traktarr/##old/traktarr-list/traktarr.sh rename to menu/traktarr/traktarr-list/traktarr.sh diff --git a/menu/traktarr/##old/traktarr.py b/menu/traktarr/traktarr.py similarity index 100% rename from menu/traktarr/##old/traktarr.py rename to menu/traktarr/traktarr.py diff --git a/menu/traktarr/traktarr.sh b/menu/traktarr/traktarr.sh index 6af5d23d..a65d9728 100644 --- a/menu/traktarr/traktarr.sh +++ b/menu/traktarr/traktarr.sh @@ -7,7 +7,7 @@ ################################################################################ # KEY VARIABLE RECALL & EXECUTION -mkdir -p /var/plexguide/traktarr/ +mkdir -p /var/plexguide/pgtrakt # FUNCTIONS START ############################################################## @@ -18,14 +18,14 @@ variable() { } deploycheck() { - dcheck=$(systemctl is-active traktarr.service) + dcheck=$(systemctl is-active traktarr) if [ "$dcheck" == "active" ]; then dstatus="✅ DEPLOYED" else dstatus="⚠️ NOT DEPLOYED"; fi } sonarrcheck() { - pcheck=$(docker ps --format '{{.Names}}' | grep "sonarr") + pcheck=$(docker ps | grep "\") if [ "$pcheck" == "" ]; then tee <<-EOF @@ -41,7 +41,7 @@ EOF } radarrcheck() { - pcheck=$(docker ps --format '{{.Names}}' | grep "radarr") + pcheck=$(docker ps | grep "\") if [ "$pcheck" == "" ]; then tee <<-EOF @@ -96,7 +96,7 @@ Quality Set Is: $typed ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ EOF - echo "$typed" >/var/plexguide/traktarr/pgtrak.sprofile + echo "$typed" >/var/plexguide/pgtrak.sprofile read -p '🌎 Acknowledge Info | Press [ENTER] ' typed /var/plexguide/traktarr/pgtrak.rprofile + echo "$typed" >/var/plexguide/pgtrak.rprofile read -p '🌎 Acknowledge Info | Press [ENTER] ' typed exit ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ EOF read -p '↘️ Type API Client | Press [ENTER]: ' typed /var/plexguide/traktarr/pgtrak.client + echo $typed >/var/plexguide/pgtrak.client read -p '↘️ Type API Secret | Press [ENTER]: ' typed /var/plexguide/traktarr/pgtrak.secret + echo $typed >/var/plexguide/pgtrak.secret if [[ "$typed" == "exit" || "$typed" == "Exit" || "$typed" == "EXIT" || "$typed" == "z" || "$typed" == "Z" ]]; then question1 @@ -200,7 +200,7 @@ EOF spath() { hdpath=$(cat /var/plexguide/server.hd.path) -tvfolderprint=$(ls -ah $hdpath/unionfs/ | grep -E 'TV*|tv') +tvfolderprint=$(ls $hdpath/unionfs/ | grep -E 'TV*|tv') sonarrcheck tee <<-EOF ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ @@ -210,6 +210,8 @@ tvfolderprint=$(ls -ah $hdpath/unionfs/ | grep -E 'TV*|tv') NOTE: In order for this to work, you must set the PATH to where Sonarr is actively scanning your tv shows. +Examples: + Possible TV folder $hdpath/unionfs/ + @@ -235,12 +237,12 @@ EOF ##################################################### TYPED CHECKERS - START typed2=$typed bonehead=no - ##### If user forgot to add a / in the beginning, we fix for them + ##### If BONEHEAD forgot to add a / in the beginning, we fix for them initial="$(echo $typed | head -c 1)" if [ "$initial" != "/" ]; then typed="/$typed" fi - ##### If user added a / at the end, we fix for them + ##### If BONEHEAD added a / at the end, we fix for them initial="${typed: -1}" if [ "$initial" == "/" ]; then typed=${typed::-1} @@ -274,7 +276,7 @@ EOF #typed=${typed:4} #fi - echo "$typed" >/var/plexguide/traktarr/pgtrak.spath + echo "$typed" >/var/plexguide/pgtrak.spath read -p '🌎 Acknowledge Info | Press [ENTER] ' typed exit @@ -338,12 +341,12 @@ EOF ##################################################### TYPED CHECKERS - START typed2=$typed bonehead=no - ##### If user forgot to add a / in the beginning, we fix for them + ##### If BONEHEAD forgot to add a / in the beginning, we fix for them initial="$(echo $typed | head -c 1)" if [ "$initial" != "/" ]; then typed="/$typed" fi - ##### If user added a / at the end, we fix for them + ##### If BONEHEAD added a / at the end, we fix for them initial="${typed: -1}" if [ "$initial" == "/" ]; then typed=${typed::-1} @@ -370,7 +373,7 @@ EOF ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ EOF - echo "$typed" >/var/plexguide/traktarr/pgtrak.rpath + echo "$typed" >/var/plexguide/pgtrak.rpath read -p '🌎 Acknowledge Info | Press [ENTER] ' typed /var/plexguide/traktarr/pgtrakyear.max && question1 + echo "$typed" >/var/plexguide/pgtrakyear.max && question1 else badinput; fi } @@ -465,11 +468,23 @@ EOF read -p 'Confirm Info | PRESS [ENTER] ' typed >>>>>> parent of fefb308... traktarr role added if [ "$radarr" == "" ] && [ "$sonarr" == "" ]; then tee <<-EOF @@ -622,7 +660,7 @@ EOF info=$(cat /opt/appdata/radarr/config.xml) info=${info#*} 1>/dev/null 2>&1 info1=$(echo ${info:0:32}) 1>/dev/null 2>&1 - echo "$info1" >/var/plexguide/traktarr/pgtrak.rapi + echo "$info1" >/var/plexguide/pgtrak.rapi fi file="/opt/appdata/sonarr/config.xml" @@ -630,9 +668,10 @@ EOF info=$(cat /opt/appdata/sonarr/config.xml) info=${info#*} 1>/dev/null 2>&1 info2=$(echo ${info:0:32}) 1>/dev/null 2>&1 - echo "$info2" >/var/plexguide/traktarr/pgtrak.sapi + echo "$info2" >/var/plexguide/pgtrak.sapi fi fi +<<<<<<< HEAD ansible-playbook /opt/plexguide/menu/pg.yml --tags traktarr && question1 ;; 8) prefill && clear && question1 ;; @@ -642,19 +681,53 @@ EOF z) exit ;; Z) exit ;; *) question1 ;; +======= + ansible-playbook /opt/plexguide/menu/traktarr/traktarr.yml + question1 + ;; + 8) + prefill + clear + question1 + ;; + 9) + endbanner + clear + question1 + ;; + C) + credits + clear + question1 + ;; + c) + credits + clear + question1 + ;; + z) + exit + ;; + Z) + exit + ;; + *) + question1 + ;; +>>>>>>> parent of fefb308... traktarr role added esac } # FUNCTIONS END ############################################################## -variable /var/plexguide/traktarr/pgtrak.client "NOT-SET" -variable /var/plexguide/traktarr/pgtrak.secret "NOT-SET" -variable /var/plexguide/traktarr/pgtrak.rpath "NOT-SET" -variable /var/plexguide/traktarr/pgtrak.spath "NOT-SET" -variable /var/plexguide/traktarr/pgtrak.sprofile "NOT-SET" -variable /var/plexguide/traktarr/pgtrak.rprofile "NOT-SET" -variable /var/plexguide/traktarr/pgtrak.rprofile "NOT-SET" -variable /var/plexguide/traktarr/pgtrakyear.max "NOT-SET" +variable /var/plexguide/pgtrak.client "NOT-SET" +variable /var/plexguide/pgtrak.secret "NOT-SET" +variable /var/plexguide/pgtrak.rpath "NOT-SET" +variable /var/plexguide/pgtrak.spath "NOT-SET" +variable /var/plexguide/pgtrak.sprofile "NOT-SET" +variable /var/plexguide/pgtrak.rprofile "NOT-SET" +variable /var/plexguide/pgtrak.rprofile "NOT-SET" +variable /var/plexguide/pgtrakyear.max "NOT-SET" deploycheck question1 diff --git a/menu/traktarr/##old/traktarr.yml b/menu/traktarr/traktarr.yml similarity index 100% rename from menu/traktarr/##old/traktarr.yml rename to menu/traktarr/traktarr.yml