Move code from clear_trakt_collections.py to plex_trakt_sync/clear_trakt_collections.py
RENAME
clear_trakt_collections.py
plex_trakt_sync/clear_trakt_collections.py
-# deletes everything in trakt's collection
-# dangerous!
import trakt
-import sys
from plex_trakt_sync.path import pytrakt_file
trakt.core.CONFIG_PATH = pytrakt_file
import trakt.users
-
-def main():
+def clear_trakt_collections():
trakt_user = trakt.users.User('me')
coll = trakt_user.movie_collection
for movie in coll:
@@ -17,10 +13,3 @@ def main():
for show in coll:
print("Deleting", show.title)
show.remove_from_library()
-
-
-if __name__ == "__main__":
- if len(sys.argv) < 2 or sys.argv[1] != '-confirm':
- print("This script will delete every movie and show from your trakt collection. If you are sure you want to do that, rerun this script with the argument -confirm")
- else:
- main()

Move code from clear_trakt_collections.py to plex_trakt_sync/clear_trakt_collections.py