Skip to content

Commit

Permalink
fix dmhy hash
Browse files Browse the repository at this point in the history
  • Loading branch information
shininome committed Oct 27, 2024
1 parent dedee04 commit 0700b0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/src/module/utils/bangumi_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def get_hash(torrent_url: str) -> str | None:
hash_pattern_dict = {
"magnet_hash_pattern": re.compile(r"urn:btih:([a-fA-F0-9]{40})"),
"torrent_hash_pattern": re.compile(r"/([a-fA-F0-9]{7,40})\.torrent"),
"dmhy_hash_pattern": re.compile(r"([A-Z0-9]{32})"),
"dmhy_hash_pattern": re.compile(r"urn:btih:([A-Z0-9]{32})"),
}
for hash_pattern in hash_pattern_dict.values():
ans = re.search(hash_pattern, torrent_url)
Expand Down

0 comments on commit 0700b0e

Please sign in to comment.