Skip to content

Commit 79b8b98

Browse files
Add image restriction to DigitalCore
1 parent 994bf7e commit 79b8b98

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/trackers/DC.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import requests
55
from src.exceptions import UploadException
66
from src.console import console
7+
from src.rehostimages import check_hosts
78
from .COMMON import COMMON
89

910

@@ -176,6 +177,13 @@ async def search_existing(self, meta, disctype):
176177

177178
async def upload(self, meta, disctype):
178179
await self.edit_torrent(meta, self.tracker, self.source_flag)
180+
approved_image_hosts = ['imgbox', 'imgbb']
181+
url_host_mapping = {
182+
"ibb.co": "imgbb",
183+
"imgbox.com": "imgbox",
184+
}
185+
186+
await check_hosts(meta, self.tracker, url_host_mapping=url_host_mapping, img_host_index=1, approved_image_hosts=approved_image_hosts)
179187

180188
cat_id = await self.get_category_id(meta)
181189

0 commit comments

Comments
 (0)