Unit3Dup 0.11.0__tar.gz → 0.11.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. {unit3dup-0.11.0 → unit3dup-0.11.2}/PKG-INFO +2 -2
  2. {unit3dup-0.11.0 → unit3dup-0.11.2}/README.rst +1 -1
  3. {unit3dup-0.11.0 → unit3dup-0.11.2}/Unit3Dup.egg-info/PKG-INFO +2 -2
  4. unit3dup-0.11.2/common/command.py +162 -0
  5. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/settings.py +1 -1
  6. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/tags.py +12 -3
  7. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/trackers/signs_list.py +2 -0
  8. {unit3dup-0.11.0 → unit3dup-0.11.2}/pyproject.toml +1 -1
  9. unit3dup-0.11.0/common/command.py +0 -120
  10. {unit3dup-0.11.0 → unit3dup-0.11.2}/LICENSE +0 -0
  11. {unit3dup-0.11.0 → unit3dup-0.11.2}/Unit3Dup.egg-info/SOURCES.txt +0 -0
  12. {unit3dup-0.11.0 → unit3dup-0.11.2}/Unit3Dup.egg-info/dependency_links.txt +0 -0
  13. {unit3dup-0.11.0 → unit3dup-0.11.2}/Unit3Dup.egg-info/entry_points.txt +0 -0
  14. {unit3dup-0.11.0 → unit3dup-0.11.2}/Unit3Dup.egg-info/requires.txt +0 -0
  15. {unit3dup-0.11.0 → unit3dup-0.11.2}/Unit3Dup.egg-info/top_level.txt +0 -0
  16. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/__init__.py +0 -0
  17. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/bdinfo_string.py +0 -0
  18. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/bittorrent.py +0 -0
  19. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/constants.py +0 -0
  20. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/database.py +0 -0
  21. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/__init__.py +0 -0
  22. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/ftpx/__init__.py +0 -0
  23. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/ftpx/client.py +0 -0
  24. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/ftpx/core/__init__.py +0 -0
  25. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/ftpx/core/ftpx_service.py +0 -0
  26. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/ftpx/core/ftpx_session.py +0 -0
  27. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/ftpx/core/menu.py +0 -0
  28. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/ftpx/core/models/__init__.py +0 -0
  29. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/ftpx/core/models/list.py +0 -0
  30. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/igdb/__init__.py +0 -0
  31. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/igdb/client.py +0 -0
  32. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/igdb/core/__init__.py +0 -0
  33. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/igdb/core/api.py +0 -0
  34. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/igdb/core/models/__init__.py +0 -0
  35. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/igdb/core/models/search.py +0 -0
  36. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/igdb/core/platformid.py +0 -0
  37. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/igdb/core/tags.py +0 -0
  38. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/imageHost.py +0 -0
  39. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/mediaresult.py +0 -0
  40. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/sessions/__init__.py +0 -0
  41. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/sessions/agents.py +0 -0
  42. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/sessions/exceptions.py +0 -0
  43. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/sessions/session.py +0 -0
  44. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/theMovieDB/__init__.py +0 -0
  45. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/theMovieDB/core/__init__.py +0 -0
  46. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/theMovieDB/core/api.py +0 -0
  47. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/theMovieDB/core/keywords.py +0 -0
  48. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/theMovieDB/core/models/__init__.py +0 -0
  49. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/theMovieDB/core/models/movie/__init__.py +0 -0
  50. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/theMovieDB/core/models/movie/alternative_titles.py +0 -0
  51. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/theMovieDB/core/models/movie/details.py +0 -0
  52. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/theMovieDB/core/models/movie/movie.py +0 -0
  53. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/theMovieDB/core/models/movie/nowplaying.py +0 -0
  54. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/theMovieDB/core/models/movie/release_info.py +0 -0
  55. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/theMovieDB/core/models/tvshow/__init__.py +0 -0
  56. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/theMovieDB/core/models/tvshow/alternative.py +0 -0
  57. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/theMovieDB/core/models/tvshow/details.py +0 -0
  58. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/theMovieDB/core/models/tvshow/on_the_air.py +0 -0
  59. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/theMovieDB/core/models/tvshow/translations.py +0 -0
  60. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/theMovieDB/core/models/tvshow/tvshow.py +0 -0
  61. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/theMovieDB/core/videos.py +0 -0
  62. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/trailers/__init__.py +0 -0
  63. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/trailers/api.py +0 -0
  64. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/trailers/response.py +0 -0
  65. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/external_services/tvdb.py +0 -0
  66. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/extractor.py +0 -0
  67. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/frames.py +0 -0
  68. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/mediainfo.py +0 -0
  69. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/mediainfo_string.py +0 -0
  70. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/title.py +0 -0
  71. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/torrent_clients.py +0 -0
  72. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/trackers/__init__.py +0 -0
  73. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/trackers/ast.py +0 -0
  74. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/trackers/ban_list.py +0 -0
  75. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/trackers/data.py +0 -0
  76. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/trackers/itt.py +0 -0
  77. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/trackers/ptt.py +0 -0
  78. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/trackers/sis.py +0 -0
  79. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/trackers/tags_list.py +0 -0
  80. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/trackers/trackers.py +0 -0
  81. {unit3dup-0.11.0 → unit3dup-0.11.2}/common/utility.py +0 -0
  82. {unit3dup-0.11.0 → unit3dup-0.11.2}/requirements.txt +0 -0
  83. {unit3dup-0.11.0 → unit3dup-0.11.2}/setup.cfg +0 -0
  84. {unit3dup-0.11.0 → unit3dup-0.11.2}/unit3dup/__init__.py +0 -0
  85. {unit3dup-0.11.0 → unit3dup-0.11.2}/unit3dup/__main__.py +0 -0
  86. {unit3dup-0.11.0 → unit3dup-0.11.2}/unit3dup/automode.py +0 -0
  87. {unit3dup-0.11.0 → unit3dup-0.11.2}/unit3dup/bot.py +0 -0
  88. {unit3dup-0.11.0 → unit3dup-0.11.2}/unit3dup/duplicate.py +0 -0
  89. {unit3dup-0.11.0 → unit3dup-0.11.2}/unit3dup/exceptions.py +0 -0
  90. {unit3dup-0.11.0 → unit3dup-0.11.2}/unit3dup/media.py +0 -0
  91. {unit3dup-0.11.0 → unit3dup-0.11.2}/unit3dup/media_manager/ContentManager.py +0 -0
  92. {unit3dup-0.11.0 → unit3dup-0.11.2}/unit3dup/media_manager/DocuManager.py +0 -0
  93. {unit3dup-0.11.0 → unit3dup-0.11.2}/unit3dup/media_manager/GameManager.py +0 -0
  94. {unit3dup-0.11.0 → unit3dup-0.11.2}/unit3dup/media_manager/MediaInfoManager.py +0 -0
  95. {unit3dup-0.11.0 → unit3dup-0.11.2}/unit3dup/media_manager/SeedManager.py +0 -0
  96. {unit3dup-0.11.0 → unit3dup-0.11.2}/unit3dup/media_manager/TorrentManager.py +0 -0
  97. {unit3dup-0.11.0 → unit3dup-0.11.2}/unit3dup/media_manager/VideoManager.py +0 -0
  98. {unit3dup-0.11.0 → unit3dup-0.11.2}/unit3dup/media_manager/__init__.py +0 -0
  99. {unit3dup-0.11.0 → unit3dup-0.11.2}/unit3dup/media_manager/common.py +0 -0
  100. {unit3dup-0.11.0 → unit3dup-0.11.2}/unit3dup/pvtDocu.py +0 -0
  101. {unit3dup-0.11.0 → unit3dup-0.11.2}/unit3dup/pvtTorrent.py +0 -0
  102. {unit3dup-0.11.0 → unit3dup-0.11.2}/unit3dup/pvtTracker.py +0 -0
  103. {unit3dup-0.11.0 → unit3dup-0.11.2}/unit3dup/pvtVideo.py +0 -0
  104. {unit3dup-0.11.0 → unit3dup-0.11.2}/unit3dup/torrent.py +0 -0
  105. {unit3dup-0.11.0 → unit3dup-0.11.2}/unit3dup/upload.py +0 -0
  106. {unit3dup-0.11.0 → unit3dup-0.11.2}/view/__init__.py +0 -0
  107. {unit3dup-0.11.0 → unit3dup-0.11.2}/view/custom_console.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Unit3Dup
3
- Version: 0.11.0
3
+ Version: 0.11.2
4
4
  Summary: An uploader for the Unit3D torrent tracker
5
5
  Author: Parzival
6
6
  License-Expression: MIT
@@ -109,7 +109,7 @@ RUN
109
109
  DOC
110
110
  ===
111
111
 
112
- Link `Unit3DUP <https://unit3dup.readthedocs.io/en/latest/index.html#>`_
112
+ Commands list `Unit3Dup <https://31december99.github.io/Unit3Dup/commands/>`_
113
113
 
114
114
 
115
115
  ImageHost
@@ -78,7 +78,7 @@ RUN
78
78
  DOC
79
79
  ===
80
80
 
81
- Link `Unit3DUP <https://unit3dup.readthedocs.io/en/latest/index.html#>`_
81
+ Commands list `Unit3Dup <https://31december99.github.io/Unit3Dup/commands/>`_
82
82
 
83
83
 
84
84
  ImageHost
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Unit3Dup
3
- Version: 0.11.0
3
+ Version: 0.11.2
4
4
  Summary: An uploader for the Unit3D torrent tracker
5
5
  Author: Parzival
6
6
  License-Expression: MIT
@@ -109,7 +109,7 @@ RUN
109
109
  DOC
110
110
  ===
111
111
 
112
- Link `Unit3DUP <https://unit3dup.readthedocs.io/en/latest/index.html#>`_
112
+ Commands list `Unit3Dup <https://31december99.github.io/Unit3Dup/commands/>`_
113
113
 
114
114
 
115
115
  ImageHost
@@ -0,0 +1,162 @@
1
+ # -*- coding: utf-8 -*-
2
+ import os
3
+ import argparse
4
+
5
+ from common.utility import System
6
+ from common.settings import Load
7
+
8
+
9
+ class CommandLine:
10
+ """
11
+ Handle command line arguments
12
+ """
13
+
14
+ def __init__(self):
15
+
16
+ # Load config
17
+ config = Load().load_config()
18
+
19
+ # /////////////////////////
20
+ # Main parser
21
+ # /////////////////////////
22
+ parser = argparse.ArgumentParser(
23
+ description="Manage torrents, uploads, searches and config checks",
24
+ formatter_class=argparse.ArgumentDefaultsHelpFormatter
25
+ )
26
+
27
+ # /////////////////////////
28
+ # Groups
29
+ # /////////////////////////
30
+ cfg_group = parser.add_argument_group("Config Commands")
31
+ upload_group = parser.add_argument_group("Upload Commands")
32
+ search_group = parser.add_argument_group("Search Commands")
33
+ filter_group = parser.add_argument_group("Filter Options")
34
+ special_group = parser.add_argument_group("Special Flags")
35
+
36
+ # /////////////////////////
37
+ # Config Commands
38
+ # /////////////////////////
39
+ cfg_group.add_argument(
40
+ "-check", "--check",
41
+ action="store_true",
42
+ help="Check config files"
43
+ )
44
+
45
+ # /////////////////////////
46
+ # Upload Commands
47
+ # /////////////////////////
48
+ upload_group.add_argument("-u", "--upload", type=str, help="Upload path")
49
+ upload_group.add_argument("-f", "--folder", type=str, help="Upload folder")
50
+ upload_group.add_argument("-scan", "--scan", type=str, help="Scan folder")
51
+ upload_group.add_argument("-b", "--buildtags", action="store_true", help="Auto build title")
52
+ upload_group.add_argument("-reseed", "--reseed", action="store_true", help="Reseed folder")
53
+ upload_group.add_argument("-watcher", "--watcher", action="store_true", help="Start watcher")
54
+ upload_group.add_argument("-notitle", "--notitle", type=str, help="Manual title")
55
+
56
+ upload_group.add_argument(
57
+ "-tracker", "--tracker",
58
+ type=str,
59
+ default=config.tracker_config.MULTI_TRACKER[0],
60
+ help="Single tracker"
61
+ )
62
+
63
+ upload_group.add_argument("-mt", "--mt", action="store_true", help="Multi tracker")
64
+
65
+ upload_group.add_argument(
66
+ "-force",
67
+ nargs='?',
68
+ const="movie",
69
+ type=str,
70
+ default=None,
71
+ help="Force category"
72
+ )
73
+
74
+ upload_group.add_argument("-noseed", "--noseed", action="store_true", help="Disable seeding")
75
+ upload_group.add_argument("-noup", "--noup", action="store_true", help="Torrent only")
76
+ upload_group.add_argument("-dup", "--duplicate", action="store_true", help="Check duplicates")
77
+ upload_group.add_argument("-personal", "--personal", action="store_true", help="Personal release")
78
+ upload_group.add_argument("-ftp", "--ftp", action="store_true", help="Connect FTP")
79
+
80
+ # /////////////////////////
81
+ # Search Commands
82
+ # /////////////////////////
83
+ search_group.add_argument("-dmp", "--dump", action="store_true", help="Dump titles")
84
+ search_group.add_argument("-sch", "--search", type=str, help="Search torrent")
85
+ search_group.add_argument("-db", "--dbsave", action="store_true", help="Save results")
86
+ search_group.add_argument("-i", "--info", type=str, help="Torrent info")
87
+ search_group.add_argument("-up", "--uploader", type=str, help="By uploader")
88
+ search_group.add_argument("-d", "--description", type=str, help="By description")
89
+ search_group.add_argument("-bd", "--bdinfo", type=str, help="Show BDInfo")
90
+ search_group.add_argument("-m", "--mediainfo", type=str, help="Show MediaInfo")
91
+
92
+ # /////////////////////////
93
+ # Filter Options
94
+ # /////////////////////////
95
+ filter_group.add_argument("-st", "--startyear", type=str, help="Start year")
96
+ filter_group.add_argument("-en", "--endyear", type=str, help="End year")
97
+ filter_group.add_argument("-type", "--type", type=str, help="Type")
98
+ filter_group.add_argument("-res", "--resolution", type=str, help="Resolution")
99
+ filter_group.add_argument("-file", "--filename", type=str, help="Filename")
100
+ filter_group.add_argument("-se", "--season", type=str, help="Season")
101
+ filter_group.add_argument("-ep", "--episode", type=str, help="Episode")
102
+
103
+ # IDs
104
+ filter_group.add_argument("-tmdb", "--tmdb_id", type=str, help="TMDB ID")
105
+ filter_group.add_argument("-imdb", "--imdb_id", type=str, help="IMDB ID")
106
+ filter_group.add_argument("-tvdb", "--tvdb_id", type=int, help="TVDB ID")
107
+ filter_group.add_argument("-mal", "--mal_id", type=str, help="MAL ID")
108
+ filter_group.add_argument("-playid", "--playlist_id", type=str, help="Playlist ID")
109
+ filter_group.add_argument("-coll", "--collection_id", type=str, help="Collection ID")
110
+
111
+ # Status
112
+ filter_group.add_argument("-free", "--freelech", type=str, help="Freeleech")
113
+ filter_group.add_argument("-al", "--alive", action="store_true", help="Alive")
114
+ filter_group.add_argument("-dd", "--dead", action="store_true", help="Dead")
115
+ filter_group.add_argument("-dy", "--dying", action="store_true", help="Dying")
116
+
117
+ # /////////////////////////
118
+ # Special Flags
119
+ # /////////////////////////
120
+ special_group.add_argument("-du", "--doubleup", action="store_true", help="DoubleUp")
121
+ special_group.add_argument("-fe", "--featured", action="store_true", help="Featured")
122
+ special_group.add_argument("-re", "--refundable", action="store_true", help="Refundable")
123
+ special_group.add_argument("-str", "--stream", action="store_true", help="Stream")
124
+ special_group.add_argument("-sd", "--standard", action="store_true", help="SD")
125
+ special_group.add_argument("-hs", "--highspeed", action="store_true", help="Highspeed")
126
+ special_group.add_argument("-int", "--internal", action="store_true", help="Internal")
127
+ special_group.add_argument("-pr", "--prelease", action="store_true", help="Personal")
128
+
129
+ # /////////////////////////
130
+ # Parse args
131
+ # /////////////////////////
132
+ self.args = parser.parse_args()
133
+
134
+ # /////////////////////////
135
+ # Check scan path
136
+ # /////////////////////////
137
+ self.is_dir = os.path.isdir(self.args.scan) if self.args.scan else None
138
+
139
+ # /////////////////////////
140
+ # Expand upload path
141
+ # /////////////////////////
142
+ if self.args.upload:
143
+ self.args.upload = os.path.expanduser(self.args.upload)
144
+
145
+ # /////////////////////////
146
+ # Validate force category
147
+ # /////////////////////////
148
+ if self.args.force:
149
+
150
+ self.args.force = self.args.force[:10]
151
+
152
+ valid_categories = [
153
+ System.category_list[System.MOVIE],
154
+ System.category_list[System.GAME],
155
+ System.category_list[System.TV_SHOW],
156
+ System.category_list[System.DOCUMENTARY]
157
+ ]
158
+
159
+ if self.args.force.lower() not in valid_categories:
160
+ self.args.force = None
161
+ print("Invalid -force category")
162
+ exit()
@@ -24,7 +24,7 @@ user_tags_file = "tags_list.json"
24
24
  user_sign_file = "sign_list.json"
25
25
  bane_file = "ban_list.json"
26
26
 
27
- version = "0.11.0"
27
+ version = "0.11.2"
28
28
 
29
29
  if os.name == "nt":
30
30
  WATCHER_DESTINATION_PATH: Path = Path(
@@ -159,7 +159,7 @@ class SearchTags(object):
159
159
  matches = regex.findall(self.filename)
160
160
  if matches:
161
161
  # Normalize Tag_list
162
- normalized_tag = TAG_NORMALIZE.get(matches[0], None)
162
+ normalized_tag = TAG_NORMALIZE.get(matches[0].upper(), None)
163
163
  if normalized_tag:
164
164
  matches[0] = normalized_tag
165
165
  self.tags_dict.setdefault(category, []).append(matches[0])
@@ -357,8 +357,17 @@ class SearchTags(object):
357
357
  """
358
358
  identify resolution based on Height and Width tolerance 5%
359
359
  """
360
- result = {'resolution': self.media.resolution}
361
- return result
360
+ mapping = {
361
+ '2160p': 'UHD',
362
+ '1080p': 'FullHD',
363
+ '720p': 'HD',
364
+ '576p': 'SD',
365
+ '480p': 'SD',
366
+ }
367
+ return {
368
+ 'resolution': self.media.resolution,
369
+ 'uhd': mapping.get(self.media.resolution, 'unknown')
370
+ }
362
371
 
363
372
  @staticmethod
364
373
  def detect_releaser(name: str, signs_list: dict) -> str:
@@ -114,6 +114,8 @@ SIGNS_LIST = {
114
114
  "ITT": "releaser",
115
115
  "JEDDAK-MIRCREW": "releaser",
116
116
  "JOHNSEED": "releaser",
117
+ "K-Z": "releaser",
118
+ "KARIDO": "releaser",
117
119
  "KINGOFROME": "releaser",
118
120
  "KIN": "releaser",
119
121
  "KISSY": "releaser",
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
5
5
  [project]
6
6
  dynamic = ["dependencies"]
7
7
  name = "Unit3Dup"
8
- version = "0.11.0"
8
+ version = "0.11.2"
9
9
  description = "An uploader for the Unit3D torrent tracker"
10
10
  readme = "README.rst"
11
11
  requires-python = ">=3.10"
@@ -1,120 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- import os
3
- import argparse
4
- from common.utility import System
5
- from common.settings import Load
6
-
7
-
8
- class CommandLine:
9
- """
10
- Class to handle user input from the command line
11
- """
12
-
13
- def __init__(self):
14
-
15
- config = Load().load_config()
16
-
17
- parser = argparse.ArgumentParser(
18
- description="Manage torrents, uploads, and config checks."
19
- )
20
-
21
- # Config files
22
- parser.add_argument(
23
- "-check", "--check", action="store_true", help="Check config"
24
- )
25
-
26
- # Main flags
27
- parser.add_argument("-u", "--upload", type=str, help="Upload path")
28
- parser.add_argument("-f", "--folder", type=str, help="Upload folder")
29
- parser.add_argument("-scan", "--scan", type=str, help="Scan folder")
30
- parser.add_argument("-b", "--buildtags", action="store_true", help="Auto build torrent name")
31
-
32
- parser.add_argument("-reseed", "--reseed", action="store_true", help="reseed folder")
33
- parser.add_argument("-watcher", "--watcher", action="store_true", help="Start watcher")
34
-
35
- parser.add_argument("-notitle", "--notitle", type=str, help="")
36
- parser.add_argument("-tracker", "--tracker", type=str, default=config.tracker_config.MULTI_TRACKER[0],
37
- help="Upload to single tracker")
38
-
39
- parser.add_argument("-mt", "--mt", action="store_true", help="")
40
- parser.add_argument('-force', nargs='?', const="movie", type=str, default=None)
41
- parser.add_argument("-noseed", "--noseed", action="store_true", help="No seeding after upload")
42
- parser.add_argument("-noup", "--noup", action="store_true", help="Torrent only. No upload")
43
- parser.add_argument("-dup", "--duplicate", action="store_true", help="Find duplicates")
44
- parser.add_argument("-personal", "--personal", action="store_true", help="Set to personal release")
45
-
46
- parser.add_argument("-ftp", "--ftp", action="store_true", help="Connect to FTP")
47
-
48
- # optional
49
- parser.add_argument("-dmp", "--dump", action="store_true", help="Download all torrent titles")
50
- parser.add_argument("-sch", "--search", type=str, help="Search for torrent")
51
- parser.add_argument("-db", "--dbsave", action="store_true", help="Save the search results")
52
- parser.add_argument("-i", "--info", type=str, help="Get info on torrent")
53
- parser.add_argument("-up", "--uploader", type=str, help="Search by uploader")
54
- parser.add_argument("-d", "--description", type=str, help="Search by description")
55
- parser.add_argument("-bd", "--bdinfo", type=str, help="Show BDInfo")
56
- parser.add_argument("-m", "--mediainfo", type=str, help="Show MediaInfo")
57
- parser.add_argument("-st", "--startyear", type=str, help="Start year")
58
- parser.add_argument("-en", "--endyear", type=str, help="End year")
59
- parser.add_argument("-type", "--type", type=str, help="Filter by type")
60
- parser.add_argument("-res", "--resolution", type=str, help="Filter by resolution")
61
- parser.add_argument("-file", "--filename", type=str, help="Search by filename")
62
- parser.add_argument("-se", "--season", type=str, help="Season number")
63
- parser.add_argument("-ep", "--episode", type=str, help="Episode number")
64
- parser.add_argument("-tmdb", "--tmdb_id", type=str, help="TMDB ID")
65
- parser.add_argument("-imdb", "--imdb_id", type=str, help="IMDB ID")
66
- parser.add_argument("-tvdb", "--tvdb_id", type=int, help="TVDB ID")
67
- parser.add_argument("-mal", "--mal_id", type=str, help="MAL ID")
68
- parser.add_argument("-playid", "--playlist_id", type=str, help="Playlist ID")
69
- parser.add_argument("-coll", "--collection_id", type=str, help="Collection ID")
70
- parser.add_argument("-free", "--freelech", type=str, help="Freelech discount")
71
- parser.add_argument("-al", "--alive", action="store_true", help="Alive torrent")
72
- parser.add_argument("-dd", "--dead", action="store_true", help="Dead torrent")
73
- parser.add_argument("-dy", "--dying", action="store_true", help="Dying torrent")
74
-
75
- parser.add_argument(
76
- "-du", "--doubleup", action="store_true", help="DoubleUp torrent"
77
- )
78
- parser.add_argument(
79
- "-fe", "--featured", action="store_true", help="Featured torrent"
80
- )
81
- parser.add_argument(
82
- "-re", "--refundable", action="store_true", help="Refundable torrent"
83
- )
84
- parser.add_argument(
85
- "-str", "--stream", action="store_true", help="Stream torrent"
86
- )
87
- parser.add_argument(
88
- "-sd", "--standard", action="store_true", help="Standard definition torrent"
89
- )
90
- parser.add_argument(
91
- "-hs", "--highspeed", action="store_true", help="Highspeed torrent"
92
- )
93
- parser.add_argument(
94
- "-int", "--internal", action="store_true", help="Internal torrent"
95
- )
96
-
97
- parser.add_argument(
98
- "-pr", "--prelease", action="store_true", help="Personal release torrent"
99
- )
100
-
101
- # Parsing the User cli
102
- self.args: parser = parser.parse_args()
103
-
104
- # Test user scan path
105
- self.is_dir = os.path.isdir(self.args.scan) if self.args.scan else None
106
-
107
- # Test the upload path. Expand path home_path with tilde
108
- if self.args.upload:
109
- self.args.upload = os.path.expanduser(self.args.upload)
110
-
111
- # Test -force flag
112
- if self.args.force:
113
- self.args.force = self.args.force[:10]
114
- if self.args.force.lower() not in [System.category_list[System.MOVIE],
115
- System.category_list[System.GAME],
116
- System.category_list[System.TV_SHOW],
117
- System.category_list[System.DOCUMENTARY]]:
118
- self.args.force = None
119
- print("Invalid -force category")
120
- exit()
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes