Unit3Dup 0.8.20__py3-none-any.whl → 0.8.21__py3-none-any.whl

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.
@@ -395,11 +395,13 @@ class DbOnline(TmdbAPI):
395
395
  # todo compare against the media title especially for the favorite channel
396
396
  return result[0].items[0].id.videoId
397
397
  else:
398
- user_youtube_id = custom_console.user_input_str(message="Title not found."
399
- " Please digit a valid Youtube ID (0=skip)->")
400
- if user_youtube_id==0:
401
- return "not available"
402
- return user_youtube_id
398
+ if not config_settings.user_preferences.SKIP_YOUTUBE:
399
+ user_youtube_id = custom_console.user_input_str(message="Title not found."
400
+ " Please digit a valid Youtube ID (0=skip)->")
401
+ if user_youtube_id==0:
402
+ return "not available"
403
+ return user_youtube_id
404
+ return None
403
405
 
404
406
  def trailer(self, video_id: int) -> str | None:
405
407
  # Search for tmdb trailer
common/settings.py CHANGED
@@ -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.20"
16
+ version = "0.8.21"
17
17
 
18
18
  if os.name == "nt":
19
19
  PW_TORRENT_ARCHIVE_PATH: Path = Path(os.getenv("LOCALAPPDATA", ".")) / "Unit3Dup_config" / "pw_torrent_archive"
@@ -111,6 +111,7 @@ class UserPreferences(BaseModel):
111
111
  DUPLICATE_ON: bool = False
112
112
  SKIP_DUPLICATE: bool = False
113
113
  SKIP_TMDB: bool = False
114
+ SKIP_YOUTUBE: bool = False
114
115
  SIZE_TH: int = 50
115
116
  WATCHER_INTERVAL: int = 60
116
117
  WATCHER_PATH: str | None = None
@@ -424,8 +425,8 @@ class Config(BaseModel):
424
425
  else:
425
426
  field = field.upper()
426
427
 
427
- if field in ['DUPLICATE_ON','SKIP_DUPLICATE','SKIP_TMDB','RESIZE_SCSHOT','ANON','WEBP_ENABLED',
428
- 'CACHE_SCR','CACHE_DBONLINE', 'PERSONAL_RELEASE']:
428
+ if field in ['DUPLICATE_ON','SKIP_DUPLICATE','SKIP_TMDB','SKIP_YOUTUBE','RESIZE_SCSHOT','ANON',
429
+ 'WEBP_ENABLED', 'CACHE_SCR','CACHE_DBONLINE', 'PERSONAL_RELEASE']:
429
430
  section[field] = Validate.boolean(value=section[field], field_name=field)
430
431
 
431
432
  if field in ['TORRENT_COMMENT','WATCHER_PATH','DEFAULT_TRACKER']:
@@ -574,6 +575,7 @@ class Load:
574
575
  "DUPLICATE_ON": "true",
575
576
  "SKIP_DUPLICATE": "false",
576
577
  "SKIP_TMDB": "false",
578
+ "SKIP_YOUTUBE" :'true',
577
579
  "SIZE_TH": 10,
578
580
  "WATCHER_INTERVAL": 60,
579
581
  "WATCHER_PATH": "no_path",
@@ -129,6 +129,7 @@ class ContentManager:
129
129
  # Display name on webpage
130
130
  self.display_name, _ = os.path.splitext(os.path.basename(self.file_name))
131
131
  self.display_name = ManageTitles.clean_text(self.display_name)
132
+ self.display_name = re.sub(r'[\[\]()]', '', self.display_name)
132
133
  # current media path
133
134
  self.torrent_path = self.path
134
135
  # Try to get video ID from the string title
@@ -153,6 +154,7 @@ class ContentManager:
153
154
  self.file_name = os.path.join(self.path, files_list[0])
154
155
  # Display name on webpage
155
156
  self.display_name = ManageTitles.clean_text(os.path.basename(self.path))
157
+ self.display_name = re.sub(r'[\[\]()]', '', self.display_name)
156
158
  # current media path
157
159
  self.torrent_path = self.path
158
160
  # Torrent name
unit3dup/pvtVideo.py CHANGED
@@ -79,8 +79,10 @@ class Video:
79
79
  # Build the description
80
80
  build_description = Build(extracted_frames=extracted_frames_webp+extracted_frames, filename= self.display_name)
81
81
  self.description = build_description.description()
82
- self.description += (f"[b][spoiler=Spoiler: PLAY TRAILER][center][youtube]{self.trailer_key}[/youtube]"
83
- f"[/center][/spoiler][/b]")
82
+
83
+ if self.trailer_key:
84
+ self.description += (f"[b][spoiler=Spoiler: PLAY TRAILER][center][youtube]{self.trailer_key}[/youtube]"
85
+ f"[/center][/spoiler][/b]")
84
86
  self.is_hd = is_hd
85
87
 
86
88
  # Caching
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Unit3Dup
3
- Version: 0.8.20
3
+ Version: 0.8.21
4
4
  Summary: An uploader for the Unit3D torrent tracker
5
5
  Author: Parzival
6
6
  License-Expression: MIT
@@ -8,7 +8,7 @@ common/extractor.py,sha256=WKZwt2kQfKO2VJ1rtwE_j6Zl84zICnowZq_Ql16wmRc,4564
8
8
  common/frames.py,sha256=p_jsaXII5tZTVt5ymu-w1hk2c_UMeOn3PZeuVR-wXWY,7973
9
9
  common/mediainfo.py,sha256=U2r1jJejBsV8GP3iPk4O8_NkHO5RQ9Kkh2bKwVNUBmg,6229
10
10
  common/mediainfo_string.py,sha256=8vuWlF2bqWRKpDbn81bV2fPA7hbl7RwOnxN2i4E3zNE,3958
11
- common/settings.py,sha256=9mpP39TF_xvX05ZS66COmj3klUh1xkWqOvPYNQBD2HQ,32983
11
+ common/settings.py,sha256=vHSU0U2F3r6CMbCWjDOVGzeijO64XgYncUOI-_bxzVQ,33072
12
12
  common/title.py,sha256=nFainfUBTYW9ML4Y-CB9ZFD_Es-OZXcAMPUo6D09u3k,3793
13
13
  common/torrent_clients.py,sha256=NOIpYtLG_bA19HwcH9ahGFmGNtRkoMO6nAjma-JzDfs,12040
14
14
  common/utility.py,sha256=8uvLzMk-1keX2grxgzhqeS5VV6EKrmocSESihU8xzhY,8971
@@ -38,7 +38,7 @@ common/external_services/sessions/exceptions.py,sha256=s3jpm-LiIJvGFa-Vr9cU09qJ9
38
38
  common/external_services/sessions/session.py,sha256=DFqcIKQAEJrJ5bOEBxbnxbDrxEx31nmS_NjCYMmJ7EQ,4877
39
39
  common/external_services/theMovieDB/__init__.py,sha256=uBRzseXxb-L4XS6Np548FlWrSwVTQcTwLkOca9cuDyc,82
40
40
  common/external_services/theMovieDB/core/__init__.py,sha256=37I0EaaHJEfnVUHmswZwJtEOvI929Cel9p15VJjhF_k,16
41
- common/external_services/theMovieDB/core/api.py,sha256=Kea3OzObRMyEifeT0hrV-vHc6gNk4d0dl6AeGK0pOJQ,18651
41
+ common/external_services/theMovieDB/core/api.py,sha256=370DmhamaV-gqoBXUmxz6eKdHDs4JK5CkNgX5lVwr1g,18763
42
42
  common/external_services/theMovieDB/core/keywords.py,sha256=hGm4-iUU32LlrTlNO4DnUl3a0lknaMYVymcuk8k38G0,118
43
43
  common/external_services/theMovieDB/core/videos.py,sha256=K3unERRMTKpSJTwhvboRHUQHhxTdreTWIxJOrfzDnTs,329
44
44
  common/external_services/theMovieDB/core/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -72,10 +72,10 @@ unit3dup/media.py,sha256=u0N2Wu4yt_oCUq_FPwnFq0oV8_lHDYAeXW4uhqpgJAI,13677
72
72
  unit3dup/pvtDocu.py,sha256=ZLMaal2fn6ZcFPLtET0LTmYEPjhJmLitEjkICHrm9CQ,4594
73
73
  unit3dup/pvtTorrent.py,sha256=cItlsCpcUJL23iXQHy0YzrrvV3JSl54UlBgm8_UROAs,2559
74
74
  unit3dup/pvtTracker.py,sha256=HqrXq3kmkuXOPQSw-11PdY_HsmzZpc5osYswh5_3UEY,18690
75
- unit3dup/pvtVideo.py,sha256=w_T6wEeGrsHkuR3KObJc4mNpJgg9hhHh_9LoxFlaqjM,3900
75
+ unit3dup/pvtVideo.py,sha256=HZbkk1GiCFe6g7e0UPoOc5VGzRaTsViNnU1SCuijkIs,3944
76
76
  unit3dup/torrent.py,sha256=surV0royo_GCEvdlPIP1S9gvFvJb1u26XM11rZOGVEg,20064
77
77
  unit3dup/upload.py,sha256=qGn9L-l2gL2K8hbU97c-fnWZFNe2vehFaPgDiQHUxfU,6612
78
- unit3dup/media_manager/ContentManager.py,sha256=8oibia1wQGY2M1e1WYJPpEKbDIFVkoyOdzbAwtEz020,7489
78
+ unit3dup/media_manager/ContentManager.py,sha256=-_DjlsL2AGtoZwmblVbytAiaC6eK9UpGJzzT-YW0ObA,7633
79
79
  unit3dup/media_manager/DocuManager.py,sha256=oFt7jlxj-gIUty9PADBQV5a24bsv3yhjKhwI6niOhf4,3116
80
80
  unit3dup/media_manager/GameManager.py,sha256=9EmPeNrirOwaVOj-vkLr29Xo7daIA4ssqrrt0WyMl30,4090
81
81
  unit3dup/media_manager/MediaInfoManager.py,sha256=0NO9dgD7seJM67B3DRnwvRIdoy7bfquBUox-PnHInK8,1081
@@ -86,12 +86,12 @@ unit3dup/media_manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3
86
86
  unit3dup/media_manager/common.py,sha256=EDsD1FVNiWPS9teHs5vyGkYkC92gzFdSanMyMAR5vpU,10147
87
87
  unit3dup/web/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
88
88
  unit3dup/web/main.py,sha256=BzjKDgAjKZMnoQwx7nDDbs_64kCrFO1VYpbHmsGiFVc,1267
89
- unit3dup-0.8.20.dist-info/licenses/LICENSE,sha256=GNAZDLhU0xz8QPbIyHAOYlVnQYDvKWk2N9fZJMhqaG8,1090
89
+ unit3dup-0.8.21.dist-info/licenses/LICENSE,sha256=GNAZDLhU0xz8QPbIyHAOYlVnQYDvKWk2N9fZJMhqaG8,1090
90
90
  view/__init__.py,sha256=XIzb6rl58HmYPnksD73cYMFF88dn6FHa3u7bOHFbChk,81
91
91
  view/custom_console.py,sha256=OITmkEoQH9N_uE5ElPaSdc8XvaLzE9wcwTbOHtcMvrI,5629
92
92
  view/web_console.py,sha256=YkxutJK5GqswMKEF77EllphPYQW0eb8OIBlplucHhvM,7697
93
- unit3dup-0.8.20.dist-info/METADATA,sha256=coV9AlZNj15u_x7sZ-znoweTOOAkfs_V-dxKnqxj-cw,5826
94
- unit3dup-0.8.20.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
95
- unit3dup-0.8.20.dist-info/entry_points.txt,sha256=fxXSyI6-r6jy9_v-C5ZHm03q1aC3tE9EvCQZxC1NQnI,52
96
- unit3dup-0.8.20.dist-info/top_level.txt,sha256=19NVMnQNkJxBUKebRNaYCRs56A5CO4U1L67GMQCPiLU,21
97
- unit3dup-0.8.20.dist-info/RECORD,,
93
+ unit3dup-0.8.21.dist-info/METADATA,sha256=092B0_lPl1pPp047PLTLkeGmdfoNgathqDv8FvdNRww,5826
94
+ unit3dup-0.8.21.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
95
+ unit3dup-0.8.21.dist-info/entry_points.txt,sha256=fxXSyI6-r6jy9_v-C5ZHm03q1aC3tE9EvCQZxC1NQnI,52
96
+ unit3dup-0.8.21.dist-info/top_level.txt,sha256=19NVMnQNkJxBUKebRNaYCRs56A5CO4U1L67GMQCPiLU,21
97
+ unit3dup-0.8.21.dist-info/RECORD,,