Skip to content

Commit

Permalink
Merge pull request #28 from 31December99/work
Browse files Browse the repository at this point in the history
Duplicate add info_hash
  • Loading branch information
31December99 authored Aug 20, 2024
2 parents 6c53b30 + dc74dc1 commit 6143b64
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
10 changes: 1 addition & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,11 @@ It performs the following tasks:
- Seeding in qbittorrent

___
### User preferences.cfg:

duplicate_on is used to activate a check for titles already present in the tracker

number_of_screenshots determines the number of screenshots generated

torrent_archive set an optional path to move the .torrent file to a desired folder

## Join Us

The program is functional but still in the early stages, undergoing constant modifications.
You can help improve this project or just hang out with us on
[Discord](https://discord.gg/CJ32Vwyu)
[forum](https://itatorrents.xyz/forums/topics/414?page=1#post-1497)

Thank you

Expand Down
6 changes: 5 additions & 1 deletion unit3dup/duplicate.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ def _view_data(self, data: dict) -> bool:
if "attributes" in key:
name = value["name"]
poster = value["meta"]["poster"]
info_hash = value["info_hash"]

# Size in GB
size = round(value["size"] / (1024**3), 2)
Expand All @@ -154,14 +155,17 @@ def _view_data(self, data: dict) -> bool:
size_width = 6
name_width = 20
poster_width = 20
info_hash_width = 20
formatted_tmdb_id = f"{tmdb_id:>{tmdb_id_width}}"
formatted_size = f"{size:>{size_width}.2f} GB"
formatted_name = f"{name:<{name_width}}"
formatted_poster = f"{poster:<{poster_width}}"
formatted_info_hash = f"{info_hash:<{info_hash_width}}"

if already:
console.log(
f"[TMDB-ID {formatted_tmdb_id}] [{formatted_size}] '{formatted_name}' '{formatted_poster}'"
f"[TMDB-ID {formatted_tmdb_id}] [{formatted_size}] '[HASH {formatted_info_hash}]' "
f"{formatted_name}' '{formatted_poster}'"
)

self.flag_already = True
Expand Down
6 changes: 3 additions & 3 deletions unit3dup/media.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ def process(self, mode="man"):
console.rule(content.file_name)

if (
content.category == self.movie_category
or content.category == self.serie_category
content.category == self.movie_category
or content.category == self.serie_category
):
video_manager = VideoManager(content=content)

if config.DUPLICATE:
if config.DUPLICATE == 'True':
results = video_manager.check_duplicate()
if results:
console.log(
Expand Down

0 comments on commit 6143b64

Please sign in to comment.