Run futurize --stage1

This commit is contained in:
JonnyWong16 2020-07-04 13:08:59 -07:00
parent 5bf7925585
commit 30dbccda77
No known key found for this signature in database
GPG Key ID: B1F1F9807184697A
47 changed files with 55 additions and 8 deletions

View File

@ -4,6 +4,7 @@
"""
https://gist.github.com/blacktwin/4ccb79c7d01a95176b8e88bf4890cd2b
"""
from __future__ import print_function
from plexapi.server import PlexServer
import random

View File

@ -15,6 +15,7 @@ Tautulli > Settings > Notification Agents > Scripts > Gear icon:
Buffer Warnings: kill_else_if_buffering.py
"""
from __future__ import print_function
import requests
from operator import itemgetter

View File

@ -45,6 +45,7 @@ Tautulli > Settings > Notification Agents > New Script > Script Arguments:
Save
Close
"""
from __future__ import print_function
import os

View File

@ -45,6 +45,7 @@ Taultulli > Settings > Notification Agents > New Script > Script Arguments:
Save
Close
"""
from __future__ import print_function
import requests
import argparse

View File

@ -26,6 +26,7 @@ optional arguments:
"""
from __future__ import print_function
import requests
import sys

View File

@ -6,6 +6,7 @@ Find what was added TFRAME ago and not watched and notify admin using Tautulli.
TAUTULLI_URL + delete_media_info_cache?section_id={section_id}
"""
from __future__ import print_function
import requests
import sys

View File

@ -16,6 +16,7 @@ Tautulli > Settings > Notification Agents > Scripts > Gear icon:
Tautulli Settings > Notification Agents > Scripts (Gear) > Script Timeout: 0 to disable or set to > 180
"""
from __future__ import print_function
import requests
import sys

View File

@ -17,6 +17,7 @@ Tautulli > Settings > Notification Agents > Scripts > Bell icon:
Tautulli > Settings > Notification Agents > Scripts > Gear icon:
Recently Added: notify_fav_tv_all_movie.py
"""
from __future__ import print_function
import requests
from email.mime.text import MIMEText

View File

@ -43,6 +43,7 @@ Note:
The notifier_id in the edit section will need to be this other notification agent you intend to use.
It does not have to be an active notification agent, just setup.
"""
from __future__ import print_function
import os
import sys
import requests

View File

@ -16,6 +16,7 @@ Tautulli > Settings > Notification Agents > Scripts > Bell icon:
Tautulli > Settings > Notification Agents > Scripts > Gear icon:
Recently Added: notify_user_favorite.py
"""
from __future__ import print_function
import requests
from email.mime.text import MIMEText

View File

@ -9,6 +9,7 @@ Set api_sql = 1 in the config file.
Restart Tautulli.
Place in Playback Start
"""
from __future__ import print_function
import argparse
import requests
import sys

View File

@ -7,6 +7,7 @@ Find when media was added between STARTFRAME and ENDFRAME to Plex through Tautul
Some Exceptions have been commented out to supress what is printed.
Uncomment Exceptions if you run into problem and need to investigate.
"""
from __future__ import print_function
import requests
import sys
@ -164,10 +165,10 @@ for i in glt:
# Find movie rating_key.
show_lst += [int(x.rating_key)]
except Exception as e:
print("Rating_key failed: {e}").format(e=e)
print(("Rating_key failed: {e}").format(e=e))
except Exception as e:
print("Library media info failed: {e}").format(e=e)
print(("Library media info failed: {e}").format(e=e))
# All rating_keys for episodes and movies.
# Reserving order will put newest rating_keys first

View File

@ -6,6 +6,7 @@ Run script by itself. Will look for WARN code followed by /library/metadata/ str
This is find files that are corrupt or having playback issues.
I corrupted a file to test.
"""
from __future__ import print_function
import requests
import sys

View File

@ -24,6 +24,7 @@ Usage:
Plays: 56 : 754 : 2899
"""
from __future__ import print_function
import requests
import sys

View File

@ -17,6 +17,7 @@ Usage:
Movies - Plays: 379
"""
from __future__ import print_function
import requests
import sys

View File

@ -26,6 +26,7 @@ optional arguments:
If title is matched in both, Amazon is first then Netflix.
"""
from __future__ import print_function
import requests
import argparse

View File

@ -17,6 +17,7 @@ Requires: requests, plexapi
python find_diff_other_servers.py --server "My Plex Server" --server PlexServer2 --server "Steven Plex"
"""
from __future__ import print_function
import argparse
import requests

View File

@ -1,6 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import time
import argparse
from plexapi.myplex import MyPlexAccount
@ -292,7 +293,7 @@ if __name__ == '__main__':
else:
user_dict[user] = {library: section_watched_total}
except Exception as e:
print(user, e)
print((user, e))
if user_dict.get(user):
user_dict[user].update({library: 0})
else:
@ -341,7 +342,7 @@ if __name__ == '__main__':
start += count
except Exception as e:
print(user, e)
print((user, e))
section_watched_total = len(list(set(section_watched_lst)))
percent_watched = 100 * (float(section_watched_total) / float(section_total))

View File

@ -11,6 +11,7 @@ User stats display username and hour, minutes, and seconds of view time
Tautulli Settings > Extra Settings > Check - Calculate Total File Sizes [experimental] ...... wait
"""
from __future__ import print_function
from plexapi.server import CONFIG
from datetime import datetime, timedelta, date
from requests import Session

View File

@ -17,6 +17,7 @@
# * Recently Added:
# --title {title} --section_id {section_id} --media_type {media_type} --rating_key {rating_key} --parent_rating_key {parent_rating_key} --grandparent_rating_key {grandparent_rating_key} --label "Label"
from __future__ import print_function
import argparse
import os
import requests

View File

@ -16,6 +16,7 @@ optional arguments:
List of IP addresses is cleared before adding new IPs
"""
from __future__ import print_function
import requests
import argparse

View File

@ -7,6 +7,7 @@ If all users in list have watched an episode of listed show, then delete episode
Add deletion via Plex.
"""
from __future__ import print_function
import requests
import sys

View File

@ -6,6 +6,7 @@
Author: DirtyCajunRice
Requires: requests, python3.6+
"""
from __future__ import print_function
from requests import Session
from json.decoder import JSONDecodeError

View File

@ -10,6 +10,7 @@ or
find_plex_meta.py -s adventure -m movie
pulls all movie titles with adventure in the title
'''
from __future__ import print_function
from plexapi.server import PlexServer, CONFIG

View File

@ -4,6 +4,7 @@
"""
Find what was added TFRAME ago and not watched using Tautulli.
"""
from __future__ import print_function
import requests
import sys
@ -148,10 +149,10 @@ for i in glt:
# Find movie rating_key.
show_lst += [int(x.rating_key)]
except Exception as e:
print("Rating_key failed: {e}").format(e=e)
print(("Rating_key failed: {e}").format(e=e))
except Exception as e:
print("Library media info failed: {e}").format(e=e)
print(("Library media info failed: {e}").format(e=e))
# Remove reverse sort if you want the oldest keys first.
for i in sorted(show_lst, reverse=True):
@ -169,7 +170,7 @@ for i in sorted(show_lst, reverse=True):
path_lst += [x.file]
except Exception as e:
print("Metadata failed. Likely end of range: {e}").format(e=e)
print(("Metadata failed. Likely end of range: {e}").format(e=e))
delete_files(path_lst)

View File

@ -6,6 +6,7 @@
Author: DirtyCajunRice
Requires: requests, plexapi, python3.6+
"""
from __future__ import print_function
from requests import Session
from plexapi.server import CONFIG
from datetime import date, timedelta

View File

@ -4,6 +4,7 @@
"""
https://gist.github.com/blacktwin/f435aa0ccd498b0840d2407d599bf31d
"""
from __future__ import print_function
import os
import httplib2

View File

@ -15,6 +15,7 @@
# * Watched:
# --rating_key {rating_key} --filename {filename}
from __future__ import print_function
import argparse
import os
from plexapi.server import PlexServer

View File

@ -23,6 +23,7 @@ Enabling Scripts in Tautulli:
python media_manager.py --libraries "TV Shows" --select watched --users User1 User2
"""
from __future__ import print_function
import argparse
import datetime
import time
@ -591,7 +592,7 @@ if __name__ == '__main__':
if opts.select == "watched":
if libraries:
for user in user_lst:
print("Finding watched items from user: {}",format(user.name))
print(("Finding watched items from user: {}",format(user.name)))
for _library in libraries:
print("Checking library: '{}' watch statuses...".format(_library.title))
watched_work(user=user, sectionID=_library.key)

View File

@ -44,6 +44,7 @@ original.
* For episodes of show not watched the view count will be set to 1.
"""
from __future__ import print_function
import requests
import argparse

View File

@ -36,6 +36,7 @@ Usage:
- Share Movie library with USER but restrict them to only G and PG-13 titles.
"""
from __future__ import print_function
from plexapi.server import PlexServer, CONFIG
import argparse

View File

@ -36,6 +36,7 @@ Usage:
- USER is still exists as a Friend or Home User
"""
from __future__ import print_function
import argparse

View File

@ -13,6 +13,7 @@ Requires: plexapi
python plex_api_poster_pull.py
"""
from __future__ import print_function
from plexapi.server import PlexServer, CONFIG
import requests

View File

@ -98,6 +98,7 @@ Usage:
- Shared [all libraries but Movies] with USER.
"""
from __future__ import print_function
from plexapi.server import PlexServer, CONFIG
import time

View File

@ -24,6 +24,7 @@ python plex_api_show_settings.py --libraries "TV Shows" --watched 7
python plex_api_show_settings.py --libraries "TV Shows" --unwatched -7
- Keep Episodesfrom the past 7 days
"""
from __future__ import print_function
import argparse
import requests
from plexapi.server import PlexServer, CONFIG

View File

@ -45,6 +45,7 @@ Script Dance moves
Please use this script to update your Tautulli database with the new rating key
https://gist.github.com/JonnyWong16/f554f407832076919dc6864a78432db2
"""
from __future__ import print_function
from plexapi.server import PlexServer
from plexapi.server import CONFIG

View File

@ -8,6 +8,7 @@ Pull poster images from Imgur and places them inside Shows root folder.
Skips download if showname.jpg exists or if show does not exist.
"""
from __future__ import print_function
import requests
import urllib

View File

@ -16,6 +16,7 @@ optional arguments:
* LIBRARY_EXCLUDE are excluded from libraries choice.
"""
from __future__ import print_function
import requests

View File

@ -6,6 +6,7 @@
Author: DirtyCajunRice
Requires: requests, plexapi, python3.6+
"""
from __future__ import print_function
from requests import Session
from plexapi.server import CONFIG

View File

@ -14,6 +14,7 @@
# * Recently Added:
# --rating_key {rating_key} --collection "New Releases" --days 180
from __future__ import print_function
import argparse
import os
from datetime import datetime, timedelta

View File

@ -15,6 +15,7 @@ Check Tautulli's Watched Percent in Tautulli > Settings > General
{show_name} {episode_num00} {season_num00}
"""
from __future__ import print_function
import requests
import sys

View File

@ -7,6 +7,7 @@ Just run.
Comment out `remove_friend(username)` and `unshare(username)` to test.
"""
from __future__ import print_function
from sys import exit
from requests import Session
from datetime import datetime

View File

@ -5,6 +5,7 @@
Deletion is prompted
"""
from __future__ import print_function
import requests
import sys

View File

@ -5,6 +5,7 @@
# Author: /u/SwiftPanda16
# Requires: plexapi
from __future__ import print_function
from plexapi.server import PlexServer

View File

@ -49,6 +49,7 @@ Clear user history for banned video to remove violation counts and run manually
Concurrent stream count is the trigger. Trigger can be anything you want.
"""
from __future__ import print_function
import requests

View File

@ -55,6 +55,7 @@ Taultulli > Settings > Notification Agents > New Script > Script Arguments:
on selected servers.
**Rating key must be a movie or episode. Shows and Seasons not support.... yet.
"""
from __future__ import print_function
import argparse
from plexapi.myplex import MyPlexAccount
from plexapi.server import PlexServer

View File

@ -6,6 +6,7 @@
Author: DirtyCajunRice
Requires: requests, python3.6+
"""
from __future__ import print_function
from requests import Session
from plexapi.server import CONFIG
from urllib3 import disable_warnings