Unit3Dup 0.8.15__tar.gz → 0.8.16__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 (104) hide show
  1. {unit3dup-0.8.15 → unit3dup-0.8.16}/PKG-INFO +1 -1
  2. {unit3dup-0.8.15 → unit3dup-0.8.16}/Unit3Dup.egg-info/PKG-INFO +1 -1
  3. {unit3dup-0.8.15 → unit3dup-0.8.16}/Unit3Dup.egg-info/SOURCES.txt +3 -1
  4. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/settings.py +1 -1
  5. {unit3dup-0.8.15 → unit3dup-0.8.16}/pyproject.toml +1 -1
  6. {unit3dup-0.8.15 → unit3dup-0.8.16}/unit3dup/bot.py +4 -17
  7. unit3dup-0.8.16/view/custom_console2.py +139 -0
  8. unit3dup-0.8.16/view/settings.py +31 -0
  9. {unit3dup-0.8.15 → unit3dup-0.8.16}/LICENSE +0 -0
  10. {unit3dup-0.8.15 → unit3dup-0.8.16}/README.rst +0 -0
  11. {unit3dup-0.8.15 → unit3dup-0.8.16}/Unit3Dup.egg-info/dependency_links.txt +0 -0
  12. {unit3dup-0.8.15 → unit3dup-0.8.16}/Unit3Dup.egg-info/entry_points.txt +0 -0
  13. {unit3dup-0.8.15 → unit3dup-0.8.16}/Unit3Dup.egg-info/requires.txt +0 -0
  14. {unit3dup-0.8.15 → unit3dup-0.8.16}/Unit3Dup.egg-info/top_level.txt +0 -0
  15. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/__init__.py +0 -0
  16. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/bdinfo_string.py +0 -0
  17. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/bittorrent.py +0 -0
  18. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/command.py +0 -0
  19. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/constants.py +0 -0
  20. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/database.py +0 -0
  21. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/__init__.py +0 -0
  22. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/ftpx/__init__.py +0 -0
  23. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/ftpx/client.py +0 -0
  24. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/ftpx/core/__init__.py +0 -0
  25. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/ftpx/core/ftpx_service.py +0 -0
  26. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/ftpx/core/ftpx_session.py +0 -0
  27. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/ftpx/core/menu.py +0 -0
  28. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/ftpx/core/models/__init__.py +0 -0
  29. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/ftpx/core/models/list.py +0 -0
  30. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/igdb/__init__.py +0 -0
  31. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/igdb/client.py +0 -0
  32. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/igdb/core/__init__.py +0 -0
  33. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/igdb/core/api.py +0 -0
  34. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/igdb/core/models/__init__.py +0 -0
  35. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/igdb/core/models/search.py +0 -0
  36. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/igdb/core/platformid.py +0 -0
  37. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/igdb/core/tags.py +0 -0
  38. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/imageHost.py +0 -0
  39. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/imdb.py +0 -0
  40. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/mediaresult.py +0 -0
  41. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/sessions/__init__.py +0 -0
  42. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/sessions/agents.py +0 -0
  43. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/sessions/exceptions.py +0 -0
  44. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/sessions/session.py +0 -0
  45. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/theMovieDB/__init__.py +0 -0
  46. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/theMovieDB/core/__init__.py +0 -0
  47. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/theMovieDB/core/api.py +0 -0
  48. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/theMovieDB/core/keywords.py +0 -0
  49. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/theMovieDB/core/models/__init__.py +0 -0
  50. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/theMovieDB/core/models/movie/__init__.py +0 -0
  51. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/theMovieDB/core/models/movie/alternative_titles.py +0 -0
  52. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/theMovieDB/core/models/movie/details.py +0 -0
  53. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/theMovieDB/core/models/movie/movie.py +0 -0
  54. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/theMovieDB/core/models/movie/nowplaying.py +0 -0
  55. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/theMovieDB/core/models/movie/release_info.py +0 -0
  56. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/theMovieDB/core/models/tvshow/__init__.py +0 -0
  57. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/theMovieDB/core/models/tvshow/alternative.py +0 -0
  58. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/theMovieDB/core/models/tvshow/details.py +0 -0
  59. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/theMovieDB/core/models/tvshow/on_the_air.py +0 -0
  60. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/theMovieDB/core/models/tvshow/translations.py +0 -0
  61. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/theMovieDB/core/models/tvshow/tvshow.py +0 -0
  62. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/theMovieDB/core/videos.py +0 -0
  63. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/trailers/__init__.py +0 -0
  64. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/trailers/api.py +0 -0
  65. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/external_services/trailers/response.py +0 -0
  66. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/extractor.py +0 -0
  67. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/frames.py +0 -0
  68. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/mediainfo.py +0 -0
  69. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/mediainfo_string.py +0 -0
  70. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/title.py +0 -0
  71. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/torrent_clients.py +0 -0
  72. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/trackers/__init__.py +0 -0
  73. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/trackers/data.py +0 -0
  74. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/trackers/itt.py +0 -0
  75. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/trackers/sis.py +0 -0
  76. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/trackers/trackers.py +0 -0
  77. {unit3dup-0.8.15 → unit3dup-0.8.16}/common/utility.py +0 -0
  78. {unit3dup-0.8.15 → unit3dup-0.8.16}/requirements.txt +0 -0
  79. {unit3dup-0.8.15 → unit3dup-0.8.16}/setup.cfg +0 -0
  80. {unit3dup-0.8.15 → unit3dup-0.8.16}/unit3dup/__init__.py +0 -0
  81. {unit3dup-0.8.15 → unit3dup-0.8.16}/unit3dup/__main__.py +0 -0
  82. {unit3dup-0.8.15 → unit3dup-0.8.16}/unit3dup/automode.py +0 -0
  83. {unit3dup-0.8.15 → unit3dup-0.8.16}/unit3dup/duplicate.py +0 -0
  84. {unit3dup-0.8.15 → unit3dup-0.8.16}/unit3dup/exceptions.py +0 -0
  85. {unit3dup-0.8.15 → unit3dup-0.8.16}/unit3dup/media.py +0 -0
  86. {unit3dup-0.8.15 → unit3dup-0.8.16}/unit3dup/media_manager/ContentManager.py +0 -0
  87. {unit3dup-0.8.15 → unit3dup-0.8.16}/unit3dup/media_manager/DocuManager.py +0 -0
  88. {unit3dup-0.8.15 → unit3dup-0.8.16}/unit3dup/media_manager/GameManager.py +0 -0
  89. {unit3dup-0.8.15 → unit3dup-0.8.16}/unit3dup/media_manager/MediaInfoManager.py +0 -0
  90. {unit3dup-0.8.15 → unit3dup-0.8.16}/unit3dup/media_manager/SeedManager.py +0 -0
  91. {unit3dup-0.8.15 → unit3dup-0.8.16}/unit3dup/media_manager/TorrentManager.py +0 -0
  92. {unit3dup-0.8.15 → unit3dup-0.8.16}/unit3dup/media_manager/VideoManager.py +0 -0
  93. {unit3dup-0.8.15 → unit3dup-0.8.16}/unit3dup/media_manager/__init__.py +0 -0
  94. {unit3dup-0.8.15 → unit3dup-0.8.16}/unit3dup/media_manager/common.py +0 -0
  95. {unit3dup-0.8.15 → unit3dup-0.8.16}/unit3dup/pvtDocu.py +0 -0
  96. {unit3dup-0.8.15 → unit3dup-0.8.16}/unit3dup/pvtTorrent.py +0 -0
  97. {unit3dup-0.8.15 → unit3dup-0.8.16}/unit3dup/pvtTracker.py +0 -0
  98. {unit3dup-0.8.15 → unit3dup-0.8.16}/unit3dup/pvtVideo.py +0 -0
  99. {unit3dup-0.8.15 → unit3dup-0.8.16}/unit3dup/torrent.py +0 -0
  100. {unit3dup-0.8.15 → unit3dup-0.8.16}/unit3dup/upload.py +0 -0
  101. {unit3dup-0.8.15 → unit3dup-0.8.16}/unit3dup/web/__init__.py +0 -0
  102. {unit3dup-0.8.15 → unit3dup-0.8.16}/unit3dup/web/main.py +0 -0
  103. {unit3dup-0.8.15 → unit3dup-0.8.16}/view/__init__.py +0 -0
  104. {unit3dup-0.8.15 → unit3dup-0.8.16}/view/custom_console.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Unit3Dup
3
- Version: 0.8.15
3
+ Version: 0.8.16
4
4
  Summary: An uploader for the Unit3D torrent tracker
5
5
  Author: Parzival
6
6
  License-Expression: MIT
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Unit3Dup
3
- Version: 0.8.15
3
+ Version: 0.8.16
4
4
  Summary: An uploader for the Unit3D torrent tracker
5
5
  Author: Parzival
6
6
  License-Expression: MIT
@@ -97,4 +97,6 @@ unit3dup/media_manager/common.py
97
97
  unit3dup/web/__init__.py
98
98
  unit3dup/web/main.py
99
99
  view/__init__.py
100
- view/custom_console.py
100
+ view/custom_console.py
101
+ view/custom_console2.py
102
+ view/settings.py
@@ -13,7 +13,7 @@ from common.utility import ManageTitles
13
13
  from common import trackers
14
14
 
15
15
  config_file = "Unit3Dbot.json"
16
- version = "0.8.15"
16
+ version = "0.8.16"
17
17
 
18
18
  if os.name == "nt":
19
19
  PW_TORRENT_ARCHIVE_PATH: Path = Path(os.getenv("LOCALAPPDATA", ".")) / "Unit3Dup_config" / "pw_torrent_archive"
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
5
5
  [project]
6
6
  dynamic = ["dependencies"]
7
7
  name = "Unit3Dup"
8
- version = "0.8.15"
8
+ version = "0.8.16"
9
9
  description = "An uploader for the Unit3D torrent tracker"
10
10
  readme = "README.rst"
11
11
  requires-python = ">=3.10"
@@ -54,6 +54,10 @@ class Bot:
54
54
  """
55
55
  custom_console.panel_message("Analyzing your media files... Please wait")
56
56
 
57
+ if not os.path.exists(self.path):
58
+ custom_console.bot_error_log("Path doesn't exist")
59
+ return False
60
+
57
61
  # Get a Files list with basic attributes and create a content object for each
58
62
  self.content_manager: ContentManager = ContentManager(path=self.path, mode=self.mode, cli=self.cli)
59
63
  contents = self.content_manager.process()
@@ -63,10 +67,6 @@ class Bot:
63
67
  custom_console.bot_error_log("There are no Media to process")
64
68
  return False
65
69
 
66
- if not os.path.exists(self.path):
67
- custom_console.bot_error_log("Path doesn't exist")
68
- return False
69
-
70
70
  # we got a handled exception
71
71
  if contents is None:
72
72
  exit(1)
@@ -178,19 +178,6 @@ class Bot:
178
178
  custom_console.bot_log("Exiting...")
179
179
  return True
180
180
 
181
- def pw(self)-> bool:
182
- """
183
- Interacts with the PW service to search for torrent files
184
-
185
- This method performs a search query and logs the results for torrents with
186
- a certain number of seeders
187
- """
188
- # PW service
189
- pw_manager = PwManager(cli=self.cli)
190
- pw_manager.process()
191
- custom_console.panel_message("Searching... Please wait")
192
- return True
193
-
194
181
 
195
182
  def ftp(self)-> None:
196
183
  """
@@ -0,0 +1,139 @@
1
+ from nicegui import ui
2
+ from typing import List, Callable
3
+ from common import config_settings
4
+ from datetime import datetime
5
+
6
+
7
+ class NiceGUIConsole:
8
+ def __init__(self):
9
+ self.init_footer_log()
10
+ self.log_area = ui.column().style('max-height: 400px; overflow-y: auto; border: 1px solid #ccc; padding: 10px')
11
+ self.counter_label = ui.label()
12
+
13
+ def init_footer_log(self):
14
+ with ui.element('div').style('''
15
+ position: fixed;
16
+ bottom: 0;
17
+ left: 0;
18
+ width: 100%;
19
+ background-color: #2e3b4e;
20
+ text-align: center;
21
+ padding: 4px 8px; /* meno padding verticale */
22
+ font-size: 14px;
23
+ line-height: 18px;
24
+ z-index: 1000;
25
+ ''') as footer:
26
+ self.footer_label = ui.label("Ready.").style("color: white; margin: 0")
27
+
28
+ def log_message(self, message: str, color: str = "#ffffff"):
29
+ timestamp = datetime.now().strftime("%H:%M:%S")
30
+ """
31
+ with self.log_area:
32
+ ui.label(f"[{timestamp}] {message}").style(f'color: {color}; white-space: pre-wrap')
33
+ """
34
+ self.footer_label.text = f"${timestamp}$ {message}"
35
+ self.footer_label.style(f"color: {color}")
36
+
37
+
38
+ def panel_message(self, message: str, color: str = "#ccc"):
39
+ with ui.card().style(f'background-color: {color}; color: white'):
40
+ ui.label(message).style("text-align: center")
41
+
42
+ def bot_log(self, message: str):
43
+ self._add_log(message, config_settings.console_options.NORMAL_COLOR)
44
+
45
+ def bot_error_log(self, message: str):
46
+ self._add_log(f'❌ {message}', config_settings.console_options.ERROR_COLOR)
47
+
48
+ def bot_warning_log(self, message: str):
49
+ self._add_log(f'⚠️ {message}', config_settings.console_options.QUESTION_MESSAGE_COLOR)
50
+
51
+ def bot_input_log(self, message: str):
52
+ self._add_log(message, config_settings.console_options.NORMAL_COLOR)
53
+
54
+ def bot_question_log(self, message: str):
55
+ self._add_log(message, config_settings.console_options.QUESTION_MESSAGE_COLOR)
56
+
57
+ def bot_counter_log(self, message: str):
58
+ self.counter_label.set_text(message)
59
+ self.counter_label.style(f'color: {config_settings.console_options.QUESTION_MESSAGE_COLOR}')
60
+
61
+ def bot_process_table_log(self, content: List):
62
+ ui.label("Here is your files list" if content else "There are no files here")
63
+ ui.table(columns=[
64
+ {'name': 'pack', 'label': 'Torrent Pack', 'field': 'pack'},
65
+ {'name': 'category', 'label': 'Media', 'field': 'category'},
66
+ {'name': 'path', 'label': 'Path', 'field': 'path'},
67
+ ], rows=[
68
+ {
69
+ 'pack': 'Yes' if item.torrent_pack else 'No',
70
+ 'category': item.category,
71
+ 'path': item.torrent_path,
72
+ } for item in content
73
+ ])
74
+
75
+ def bot_process_table_pw(self, content: List):
76
+ ui.label("Here is your files list" if content else "There are no files here")
77
+ ui.table(columns=[
78
+ {'name': 'category', 'label': 'Category', 'field': 'category'},
79
+ {'name': 'indexer', 'label': 'Indexer', 'field': 'indexer'},
80
+ {'name': 'title', 'label': 'Title', 'field': 'title'},
81
+ {'name': 'size', 'label': 'Size', 'field': 'size'},
82
+ {'name': 'seeders', 'label': 'Seeders', 'field': 'seeders'},
83
+ ], rows=[
84
+ {
85
+ 'category': item.categories[0]['name'],
86
+ 'indexer': item.indexer,
87
+ 'title': item.title,
88
+ 'size': str(item.size),
89
+ 'seeders': str(item.seeders),
90
+ } for item in content
91
+ ])
92
+
93
+ def bot_tmdb_table_log(self, result, title: str, media_info_language: List[str]):
94
+ media_info_audio_languages = ", ".join(media_info_language).upper()
95
+ self.panel_message(f"Results for {title.upper()}")
96
+
97
+ ui.table(columns=[
98
+ {'name': 'tmdb_id', 'label': 'TMDB ID', 'field': 'tmdb_id'},
99
+ {'name': 'language', 'label': 'LANGUAGE', 'field': 'language'},
100
+ {'name': 'poster', 'label': 'TMDB POSTER', 'field': 'poster'},
101
+ {'name': 'backdrop', 'label': 'TMDB BACKDROP', 'field': 'backdrop'},
102
+ ], rows=[{
103
+ 'tmdb_id': str(result.video_id),
104
+ 'language': media_info_audio_languages,
105
+ 'poster': result.poster_path,
106
+ 'backdrop': result.backdrop_path,
107
+ }])
108
+
109
+ def wait_for_user_confirmation(self, message: str, on_confirm: Callable):
110
+ self.bot_error_log(message)
111
+ with ui.row():
112
+ ui.button("OK", on_click=on_confirm)
113
+ ui.button("Cancel",
114
+ on_click=lambda: self.bot_error_log("Operation cancelled. Please update your config file."))
115
+
116
+ def user_input(self, message: str, on_submit: Callable[[int], None]):
117
+ with ui.row():
118
+ input_field = ui.input(label=message, placeholder="Enter TMDB ID").props("type=number")
119
+ ui.button("Submit", on_click=lambda: self._validate_and_submit(input_field.value, on_submit))
120
+
121
+ def user_input_str(self, message: str, on_submit: Callable[[str], None]):
122
+ with ui.row():
123
+ input_field = ui.input(label=message, placeholder="Enter text")
124
+ ui.button("Submit", on_click=lambda: on_submit(input_field.value or "0"))
125
+
126
+ def _add_log(self, message: str, color: str = "#fff"):
127
+ timestamp = datetime.now().strftime("%H:%M:%S")
128
+ with self.log_area:
129
+ ui.label(f"[{timestamp}] {message}").style(f'color: {color}; white-space: pre-wrap')
130
+
131
+ def _validate_and_submit(self, value: str, on_submit: Callable[[int], None]):
132
+ try:
133
+ if value.isdigit():
134
+ user_id = int(value)
135
+ on_submit(user_id if user_id < 9999999 else 0)
136
+ else:
137
+ self.bot_error_log("Please enter a valid number.")
138
+ except Exception as e:
139
+ self.bot_error_log(f"Error: {str(e)}")
@@ -0,0 +1,31 @@
1
+ from nicegui import ui
2
+
3
+ class SettingsPanel:
4
+ def __init__(self):
5
+ with ui.column().classes('items-center q-pa-xl'):
6
+
7
+ # Header
8
+ ui.label("Settings").style('font-size: 32px; font-weight: bold; color: #2e3b4e')
9
+
10
+ # Settings card
11
+ with ui.card().style('max-width: 400px; width: 100%; padding: 20px; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1)'):
12
+
13
+ self._setting_group("Account Settings", [
14
+ ("Enable notifications", True),
15
+ ("Allow email updates", False),
16
+ ])
17
+
18
+ ui.separator().style("margin: 20px 0")
19
+
20
+ self._setting_group("Privacy", [
21
+ ("Location tracking", False),
22
+ ("Data sharing", True),
23
+ ])
24
+
25
+ def _setting_group(self, title: str, settings: list[tuple[str, bool]]):
26
+ ui.label(title).style('font-size: 18px; font-weight: 500; margin-bottom: 10px; color: #333')
27
+
28
+ for label_text, default_value in settings:
29
+ with ui.row().style('justify-content: space-between; align-items: center; margin-bottom: 12px'):
30
+ ui.label(label_text).style("font-size: 14px; color: #555")
31
+ ui.switch(value=default_value)
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
File without changes