From 0d1685afed469d6f144b79f37af2d7a07f12aff0 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Sat, 4 Jul 2020 13:31:02 -0700 Subject: [PATCH] Run futurize --unicode-literals --- fun/playlist_manager.py | 1 + fun/plexapi_haiku.py | 1 + killstream/kill_else_if_buffering.py | 1 + killstream/kill_stream.py | 1 + killstream/limiterr.py | 1 + maps/ips_to_maps.py | 1 + notify/find_unwatched_notify.py | 1 + notify/notify_delay.py | 1 + notify/notify_fav_tv_all_movie.py | 1 + notify/notify_newip.py | 1 + notify/notify_recently_aired.py | 1 + notify/notify_user_favorites.py | 1 + notify/notify_user_newip.py | 1 + notify/top_concurrent_notify.py | 1 + notify/twitter_notify.py | 1 + reporting/added_to_plex.py | 1 + reporting/check_play.py | 1 + reporting/check_plex_log.py | 1 + reporting/drive_check.py | 1 + reporting/library_play_days.py | 1 + reporting/plays_by_library.py | 1 + reporting/plex_netflix_check.py | 1 + reporting/server_compare.py | 1 + reporting/userplays_weekly_reporting.py | 1 + reporting/watched_percentages.py | 1 + reporting/weekly_stats_reporting.py | 1 + utility/add_label_recently_added.py | 1 + utility/bypass_auth_name.py | 1 + utility/delete_watched_TV.py | 1 + utility/enable_disable_all_guest_access.py | 1 + utility/find_plex_meta.py | 1 + utility/find_unwatched.py | 1 + utility/get_serial_transcoders.py | 1 + utility/grab_gdrive_media.py | 1 + utility/hide_episode_spoilers.py | 1 + utility/mark_multiepisode_watched.py | 1 + utility/media_manager.py | 1 + utility/off_deck.py | 1 + utility/plex_api_invite.py | 1 + utility/plex_api_parental_control.py | 1 + utility/plex_api_poster_pull.py | 1 + utility/plex_api_share.py | 1 + utility/plex_api_show_settings.py | 1 + utility/plex_dance.py | 1 + utility/plex_imgur_dl.py | 1 + utility/plex_popular_playlist.py | 1 + utility/plex_theme_songs.py | 1 + utility/plexapi_delete_playlists.py | 1 + utility/purge_removed_plex_friends.py | 1 + utility/recently_added_collection.py | 1 + utility/refresh_next_episode.py | 1 + utility/remove_inactive_users.py | 1 + utility/remove_movie_collections.py | 1 + utility/remove_watched_movies.py | 1 + utility/rename_seasons.py | 1 + utility/stream_limiter_ban_email.py | 1 + utility/sync_watch_status.py | 1 + utility/tautulli_friendly_name_to_ombi_alias_sync.py | 1 + 58 files changed, 58 insertions(+) diff --git a/fun/playlist_manager.py b/fun/playlist_manager.py index 87457468..704bdc25 100644 --- a/fun/playlist_manager.py +++ b/fun/playlist_manager.py @@ -98,6 +98,7 @@ - Create Aired Today Playlist from every library by Movies for admin user """ +from __future__ import unicode_literals from builtins import str import sys diff --git a/fun/plexapi_haiku.py b/fun/plexapi_haiku.py index 3b7c4d2e..106ef119 100644 --- a/fun/plexapi_haiku.py +++ b/fun/plexapi_haiku.py @@ -5,6 +5,7 @@ https://gist.github.com/blacktwin/4ccb79c7d01a95176b8e88bf4890cd2b """ from __future__ import print_function +from __future__ import unicode_literals from plexapi.server import PlexServer import random diff --git a/killstream/kill_else_if_buffering.py b/killstream/kill_else_if_buffering.py index 09bf0831..bb2a206b 100644 --- a/killstream/kill_else_if_buffering.py +++ b/killstream/kill_else_if_buffering.py @@ -17,6 +17,7 @@ """ from __future__ import print_function from __future__ import division +from __future__ import unicode_literals from builtins import str from past.utils import old_div diff --git a/killstream/kill_stream.py b/killstream/kill_stream.py index f99324dd..4d3875c5 100644 --- a/killstream/kill_stream.py +++ b/killstream/kill_stream.py @@ -46,6 +46,7 @@ Close """ from __future__ import print_function +from __future__ import unicode_literals from builtins import object diff --git a/killstream/limiterr.py b/killstream/limiterr.py index 4eb4ba56..7f431cd0 100644 --- a/killstream/limiterr.py +++ b/killstream/limiterr.py @@ -46,6 +46,7 @@ Close """ from __future__ import print_function +from __future__ import unicode_literals from builtins import range import requests diff --git a/maps/ips_to_maps.py b/maps/ips_to_maps.py index 9e11bb3c..3b9f8985 100644 --- a/maps/ips_to_maps.py +++ b/maps/ips_to_maps.py @@ -27,6 +27,7 @@ """ from __future__ import print_function +from __future__ import unicode_literals from builtins import zip from builtins import str diff --git a/notify/find_unwatched_notify.py b/notify/find_unwatched_notify.py index 0a9421d0..c2dd0199 100644 --- a/notify/find_unwatched_notify.py +++ b/notify/find_unwatched_notify.py @@ -7,6 +7,7 @@ TAUTULLI_URL + delete_media_info_cache?section_id={section_id} """ from __future__ import print_function +from __future__ import unicode_literals from builtins import object from builtins import str diff --git a/notify/notify_delay.py b/notify/notify_delay.py index b6530a06..787802de 100644 --- a/notify/notify_delay.py +++ b/notify/notify_delay.py @@ -18,6 +18,7 @@ """ from __future__ import print_function from __future__ import division +from __future__ import unicode_literals from past.utils import old_div import requests diff --git a/notify/notify_fav_tv_all_movie.py b/notify/notify_fav_tv_all_movie.py index 492d48a8..ae1338fb 100644 --- a/notify/notify_fav_tv_all_movie.py +++ b/notify/notify_fav_tv_all_movie.py @@ -18,6 +18,7 @@ Recently Added: notify_fav_tv_all_movie.py """ from __future__ import print_function +from __future__ import unicode_literals from builtins import object import requests diff --git a/notify/notify_newip.py b/notify/notify_newip.py index 7edba425..04d68de5 100644 --- a/notify/notify_newip.py +++ b/notify/notify_newip.py @@ -17,6 +17,7 @@ """ +from __future__ import unicode_literals from builtins import object import argparse import requests diff --git a/notify/notify_recently_aired.py b/notify/notify_recently_aired.py index 5c7c810c..2b5bcb57 100644 --- a/notify/notify_recently_aired.py +++ b/notify/notify_recently_aired.py @@ -44,6 +44,7 @@ It does not have to be an active notification agent, just setup. """ from __future__ import print_function +from __future__ import unicode_literals import os import sys import requests diff --git a/notify/notify_user_favorites.py b/notify/notify_user_favorites.py index 98f82a46..59ffb69a 100644 --- a/notify/notify_user_favorites.py +++ b/notify/notify_user_favorites.py @@ -17,6 +17,7 @@ Recently Added: notify_user_favorite.py """ from __future__ import print_function +from __future__ import unicode_literals from builtins import object import requests diff --git a/notify/notify_user_newip.py b/notify/notify_user_newip.py index 939acfd4..182941d7 100644 --- a/notify/notify_user_newip.py +++ b/notify/notify_user_newip.py @@ -10,6 +10,7 @@ Place in Playback Start """ from __future__ import print_function +from __future__ import unicode_literals from builtins import object import argparse import requests diff --git a/notify/top_concurrent_notify.py b/notify/top_concurrent_notify.py index d994c906..e00dcdd6 100644 --- a/notify/top_concurrent_notify.py +++ b/notify/top_concurrent_notify.py @@ -47,6 +47,7 @@ """ +from __future__ import unicode_literals import os import sys diff --git a/notify/twitter_notify.py b/notify/twitter_notify.py index d0004df3..3feb729b 100644 --- a/notify/twitter_notify.py +++ b/notify/twitter_notify.py @@ -16,6 +16,7 @@ https://gist.github.com/blacktwin/261c416dbed08291e6d12f6987d9bafa """ +from __future__ import unicode_literals from twitter import Twitter, OAuth import argparse diff --git a/reporting/added_to_plex.py b/reporting/added_to_plex.py index 699b061d..1aae1e8f 100644 --- a/reporting/added_to_plex.py +++ b/reporting/added_to_plex.py @@ -8,6 +8,7 @@ Uncomment Exceptions if you run into problem and need to investigate. """ from __future__ import print_function +from __future__ import unicode_literals from builtins import str from builtins import object diff --git a/reporting/check_play.py b/reporting/check_play.py index b15550f8..6b8afaa1 100644 --- a/reporting/check_play.py +++ b/reporting/check_play.py @@ -7,6 +7,7 @@ # {user} {title} # Add to Playback Resume +from __future__ import unicode_literals from builtins import object import requests import sys diff --git a/reporting/check_plex_log.py b/reporting/check_plex_log.py index 8cba31c5..41b069d1 100644 --- a/reporting/check_plex_log.py +++ b/reporting/check_plex_log.py @@ -7,6 +7,7 @@ I corrupted a file to test. """ from __future__ import print_function +from __future__ import unicode_literals from builtins import object import requests diff --git a/reporting/drive_check.py b/reporting/drive_check.py index f4ff7139..b64bca1f 100644 --- a/reporting/drive_check.py +++ b/reporting/drive_check.py @@ -1,6 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +from __future__ import unicode_literals import psutil import requests diff --git a/reporting/library_play_days.py b/reporting/library_play_days.py index 54f4bc59..216ab128 100644 --- a/reporting/library_play_days.py +++ b/reporting/library_play_days.py @@ -25,6 +25,7 @@ """ from __future__ import print_function +from __future__ import unicode_literals from builtins import str import requests diff --git a/reporting/plays_by_library.py b/reporting/plays_by_library.py index ce2a28b9..d9b5de80 100644 --- a/reporting/plays_by_library.py +++ b/reporting/plays_by_library.py @@ -18,6 +18,7 @@ """ from __future__ import print_function +from __future__ import unicode_literals import requests import sys diff --git a/reporting/plex_netflix_check.py b/reporting/plex_netflix_check.py index ccbd7ceb..c55e5fba 100644 --- a/reporting/plex_netflix_check.py +++ b/reporting/plex_netflix_check.py @@ -27,6 +27,7 @@ If title is matched in both, Amazon is first then Netflix. """ from __future__ import print_function +from __future__ import unicode_literals from builtins import str import requests diff --git a/reporting/server_compare.py b/reporting/server_compare.py index d031f06f..b112567f 100644 --- a/reporting/server_compare.py +++ b/reporting/server_compare.py @@ -18,6 +18,7 @@ """ from __future__ import print_function +from __future__ import unicode_literals import argparse import requests diff --git a/reporting/userplays_weekly_reporting.py b/reporting/userplays_weekly_reporting.py index 08f7cdc5..7eef3406 100644 --- a/reporting/userplays_weekly_reporting.py +++ b/reporting/userplays_weekly_reporting.py @@ -5,6 +5,7 @@ Use Tautulli to count how many plays per user occurred this week. Notify via Tautulli Notification """ +from __future__ import unicode_literals from builtins import object import requests diff --git a/reporting/watched_percentages.py b/reporting/watched_percentages.py index 392dcd77..1a4d40d0 100644 --- a/reporting/watched_percentages.py +++ b/reporting/watched_percentages.py @@ -2,6 +2,7 @@ # -*- coding: utf-8 -*- from __future__ import print_function +from __future__ import unicode_literals from builtins import object import time import argparse diff --git a/reporting/weekly_stats_reporting.py b/reporting/weekly_stats_reporting.py index f56d6bc8..46278b4e 100644 --- a/reporting/weekly_stats_reporting.py +++ b/reporting/weekly_stats_reporting.py @@ -12,6 +12,7 @@ """ from __future__ import print_function +from __future__ import unicode_literals from builtins import range from builtins import object from plexapi.server import CONFIG diff --git a/utility/add_label_recently_added.py b/utility/add_label_recently_added.py index b070f168..a8dd36cb 100644 --- a/utility/add_label_recently_added.py +++ b/utility/add_label_recently_added.py @@ -18,6 +18,7 @@ # --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 +from __future__ import unicode_literals import argparse import os import requests diff --git a/utility/bypass_auth_name.py b/utility/bypass_auth_name.py index 9e077e1e..b9d95db9 100644 --- a/utility/bypass_auth_name.py +++ b/utility/bypass_auth_name.py @@ -17,6 +17,7 @@ List of IP addresses is cleared before adding new IPs """ from __future__ import print_function +from __future__ import unicode_literals import requests import argparse diff --git a/utility/delete_watched_TV.py b/utility/delete_watched_TV.py index 47f717ba..9bb82086 100644 --- a/utility/delete_watched_TV.py +++ b/utility/delete_watched_TV.py @@ -8,6 +8,7 @@ Add deletion via Plex. """ from __future__ import print_function +from __future__ import unicode_literals from builtins import object import requests diff --git a/utility/enable_disable_all_guest_access.py b/utility/enable_disable_all_guest_access.py index 24b4ffc1..b6f42681 100644 --- a/utility/enable_disable_all_guest_access.py +++ b/utility/enable_disable_all_guest_access.py @@ -7,6 +7,7 @@ Requires: requests, python3.6+ """ from __future__ import print_function +from __future__ import unicode_literals from requests import Session from json.decoder import JSONDecodeError diff --git a/utility/find_plex_meta.py b/utility/find_plex_meta.py index 7e163c12..418c7ff9 100644 --- a/utility/find_plex_meta.py +++ b/utility/find_plex_meta.py @@ -11,6 +11,7 @@ pulls all movie titles with adventure in the title ''' from __future__ import print_function +from __future__ import unicode_literals from plexapi.server import PlexServer, CONFIG diff --git a/utility/find_unwatched.py b/utility/find_unwatched.py index 210dace9..39dc5101 100644 --- a/utility/find_unwatched.py +++ b/utility/find_unwatched.py @@ -5,6 +5,7 @@ Find what was added TFRAME ago and not watched using Tautulli. """ from __future__ import print_function +from __future__ import unicode_literals from builtins import input from builtins import str diff --git a/utility/get_serial_transcoders.py b/utility/get_serial_transcoders.py index 27444c55..4c5f3319 100644 --- a/utility/get_serial_transcoders.py +++ b/utility/get_serial_transcoders.py @@ -8,6 +8,7 @@ """ from __future__ import print_function from __future__ import division +from __future__ import unicode_literals from past.utils import old_div from requests import Session from plexapi.server import CONFIG diff --git a/utility/grab_gdrive_media.py b/utility/grab_gdrive_media.py index 184a8580..2a0623e8 100644 --- a/utility/grab_gdrive_media.py +++ b/utility/grab_gdrive_media.py @@ -5,6 +5,7 @@ https://gist.github.com/blacktwin/f435aa0ccd498b0840d2407d599bf31d """ from __future__ import print_function +from __future__ import unicode_literals from builtins import input import os diff --git a/utility/hide_episode_spoilers.py b/utility/hide_episode_spoilers.py index a4777047..4dbf3837 100644 --- a/utility/hide_episode_spoilers.py +++ b/utility/hide_episode_spoilers.py @@ -22,6 +22,7 @@ # * Watched (optional): # --rating_key {rating_key} --file {file} --remove +from __future__ import unicode_literals import argparse import os import requests diff --git a/utility/mark_multiepisode_watched.py b/utility/mark_multiepisode_watched.py index d2e1421c..3b10eb85 100644 --- a/utility/mark_multiepisode_watched.py +++ b/utility/mark_multiepisode_watched.py @@ -16,6 +16,7 @@ # --rating_key {rating_key} --filename {filename} from __future__ import print_function +from __future__ import unicode_literals from builtins import str import argparse import os diff --git a/utility/media_manager.py b/utility/media_manager.py index c6073f6a..6d1283c7 100644 --- a/utility/media_manager.py +++ b/utility/media_manager.py @@ -24,6 +24,7 @@ """ from __future__ import print_function +from __future__ import unicode_literals from builtins import object import argparse import datetime diff --git a/utility/off_deck.py b/utility/off_deck.py index 66521836..c5255586 100644 --- a/utility/off_deck.py +++ b/utility/off_deck.py @@ -45,6 +45,7 @@ """ from __future__ import print_function +from __future__ import unicode_literals from builtins import range import requests diff --git a/utility/plex_api_invite.py b/utility/plex_api_invite.py index b360e02b..46b29777 100644 --- a/utility/plex_api_invite.py +++ b/utility/plex_api_invite.py @@ -37,6 +37,7 @@ """ from __future__ import print_function +from __future__ import unicode_literals from plexapi.server import PlexServer, CONFIG import argparse diff --git a/utility/plex_api_parental_control.py b/utility/plex_api_parental_control.py index 21eab660..32fbb51e 100644 --- a/utility/plex_api_parental_control.py +++ b/utility/plex_api_parental_control.py @@ -37,6 +37,7 @@ """ from __future__ import print_function +from __future__ import unicode_literals import argparse diff --git a/utility/plex_api_poster_pull.py b/utility/plex_api_poster_pull.py index e7667438..22ced6e2 100644 --- a/utility/plex_api_poster_pull.py +++ b/utility/plex_api_poster_pull.py @@ -14,6 +14,7 @@ """ from __future__ import print_function +from __future__ import unicode_literals from future import standard_library standard_library.install_aliases() diff --git a/utility/plex_api_share.py b/utility/plex_api_share.py index 4f4759a7..2107c2f9 100644 --- a/utility/plex_api_share.py +++ b/utility/plex_api_share.py @@ -99,6 +99,7 @@ """ from __future__ import print_function +from __future__ import unicode_literals from plexapi.server import PlexServer, CONFIG import time diff --git a/utility/plex_api_show_settings.py b/utility/plex_api_show_settings.py index 22205002..b4d87064 100644 --- a/utility/plex_api_show_settings.py +++ b/utility/plex_api_show_settings.py @@ -25,6 +25,7 @@ - Keep Episodesfrom the past 7 days """ from __future__ import print_function +from __future__ import unicode_literals import argparse import requests from plexapi.server import PlexServer, CONFIG diff --git a/utility/plex_dance.py b/utility/plex_dance.py index 2916421b..4925ceaa 100644 --- a/utility/plex_dance.py +++ b/utility/plex_dance.py @@ -46,6 +46,7 @@ https://gist.github.com/JonnyWong16/f554f407832076919dc6864a78432db2 """ from __future__ import print_function +from __future__ import unicode_literals from plexapi.server import PlexServer from plexapi.server import CONFIG diff --git a/utility/plex_imgur_dl.py b/utility/plex_imgur_dl.py index b76f4c2a..98166cc0 100644 --- a/utility/plex_imgur_dl.py +++ b/utility/plex_imgur_dl.py @@ -9,6 +9,7 @@ """ from __future__ import print_function +from __future__ import unicode_literals from future import standard_library standard_library.install_aliases() diff --git a/utility/plex_popular_playlist.py b/utility/plex_popular_playlist.py index 2506847b..0f225bd1 100644 --- a/utility/plex_popular_playlist.py +++ b/utility/plex_popular_playlist.py @@ -17,6 +17,7 @@ """ from __future__ import print_function +from __future__ import unicode_literals import requests diff --git a/utility/plex_theme_songs.py b/utility/plex_theme_songs.py index 7aadbf69..f0f831a2 100644 --- a/utility/plex_theme_songs.py +++ b/utility/plex_theme_songs.py @@ -7,6 +7,7 @@ Songs are saved in a 'Theme Songs' directory located in script's path. """ +from __future__ import unicode_literals from future import standard_library diff --git a/utility/plexapi_delete_playlists.py b/utility/plexapi_delete_playlists.py index 89611aee..853af6eb 100644 --- a/utility/plexapi_delete_playlists.py +++ b/utility/plexapi_delete_playlists.py @@ -5,6 +5,7 @@ """ +from __future__ import unicode_literals from plexapi.server import PlexServer diff --git a/utility/purge_removed_plex_friends.py b/utility/purge_removed_plex_friends.py index e00e96da..19c202f4 100644 --- a/utility/purge_removed_plex_friends.py +++ b/utility/purge_removed_plex_friends.py @@ -7,6 +7,7 @@ Requires: requests, plexapi, python3.6+ """ from __future__ import print_function +from __future__ import unicode_literals from requests import Session from plexapi.server import CONFIG diff --git a/utility/recently_added_collection.py b/utility/recently_added_collection.py index 92fc1d3f..9aba202a 100644 --- a/utility/recently_added_collection.py +++ b/utility/recently_added_collection.py @@ -15,6 +15,7 @@ # --rating_key {rating_key} --collection "New Releases" --days 180 from __future__ import print_function +from __future__ import unicode_literals import argparse import os from datetime import datetime, timedelta diff --git a/utility/refresh_next_episode.py b/utility/refresh_next_episode.py index d090a71b..fe038688 100644 --- a/utility/refresh_next_episode.py +++ b/utility/refresh_next_episode.py @@ -16,6 +16,7 @@ """ from __future__ import print_function +from __future__ import unicode_literals import requests import sys diff --git a/utility/remove_inactive_users.py b/utility/remove_inactive_users.py index b623e8fb..7538385f 100644 --- a/utility/remove_inactive_users.py +++ b/utility/remove_inactive_users.py @@ -8,6 +8,7 @@ Comment out `remove_friend(username)` and `unshare(username)` to test. """ from __future__ import print_function +from __future__ import unicode_literals from sys import exit from requests import Session from datetime import datetime diff --git a/utility/remove_movie_collections.py b/utility/remove_movie_collections.py index 891de13e..ca4d2d8e 100644 --- a/utility/remove_movie_collections.py +++ b/utility/remove_movie_collections.py @@ -5,6 +5,7 @@ # Author: /u/SwiftPanda16 # Requires: plexapi +from __future__ import unicode_literals from plexapi.server import PlexServer ### EDIT SETTINGS ### diff --git a/utility/remove_watched_movies.py b/utility/remove_watched_movies.py index 0c0d784f..8cf63fe1 100644 --- a/utility/remove_watched_movies.py +++ b/utility/remove_watched_movies.py @@ -6,6 +6,7 @@ Deletion is prompted """ from __future__ import print_function +from __future__ import unicode_literals from builtins import input from builtins import object diff --git a/utility/rename_seasons.py b/utility/rename_seasons.py index c8d9891c..00cd3a20 100644 --- a/utility/rename_seasons.py +++ b/utility/rename_seasons.py @@ -6,6 +6,7 @@ # Requires: plexapi from __future__ import print_function +from __future__ import unicode_literals from plexapi.server import PlexServer diff --git a/utility/stream_limiter_ban_email.py b/utility/stream_limiter_ban_email.py index b71964eb..34561e47 100644 --- a/utility/stream_limiter_ban_email.py +++ b/utility/stream_limiter_ban_email.py @@ -50,6 +50,7 @@ """ from __future__ import print_function +from __future__ import unicode_literals from builtins import str diff --git a/utility/sync_watch_status.py b/utility/sync_watch_status.py index bbc502b6..fea029af 100644 --- a/utility/sync_watch_status.py +++ b/utility/sync_watch_status.py @@ -56,6 +56,7 @@ **Rating key must be a movie or episode. Shows and Seasons not support.... yet. """ from __future__ import print_function +from __future__ import unicode_literals from builtins import object import argparse from plexapi.myplex import MyPlexAccount diff --git a/utility/tautulli_friendly_name_to_ombi_alias_sync.py b/utility/tautulli_friendly_name_to_ombi_alias_sync.py index e3a0b6c8..77db7563 100644 --- a/utility/tautulli_friendly_name_to_ombi_alias_sync.py +++ b/utility/tautulli_friendly_name_to_ombi_alias_sync.py @@ -7,6 +7,7 @@ Requires: requests, python3.6+ """ from __future__ import print_function +from __future__ import unicode_literals from requests import Session from plexapi.server import CONFIG from urllib3 import disable_warnings