Unit3Dup 0.9.24__tar.gz → 0.9.26__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.
- {unit3dup-0.9.24 → unit3dup-0.9.26}/PKG-INFO +1 -1
- {unit3dup-0.9.24 → unit3dup-0.9.26}/Unit3Dup.egg-info/PKG-INFO +1 -1
- unit3dup-0.9.26/common/database.py +78 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/settings.py +1 -1
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/trackers/signs_list.py +5 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/trackers/tags_list.py +2 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/utility.py +3 -3
- {unit3dup-0.9.24 → unit3dup-0.9.26}/pyproject.toml +1 -1
- {unit3dup-0.9.24 → unit3dup-0.9.26}/unit3dup/__main__.py +3 -4
- {unit3dup-0.9.24 → unit3dup-0.9.26}/unit3dup/torrent.py +17 -19
- unit3dup-0.9.24/common/database.py +0 -79
- {unit3dup-0.9.24 → unit3dup-0.9.26}/LICENSE +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/README.rst +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/Unit3Dup.egg-info/SOURCES.txt +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/Unit3Dup.egg-info/dependency_links.txt +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/Unit3Dup.egg-info/entry_points.txt +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/Unit3Dup.egg-info/requires.txt +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/Unit3Dup.egg-info/top_level.txt +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/__init__.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/bdinfo_string.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/bittorrent.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/command.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/constants.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/__init__.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/ftpx/__init__.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/ftpx/client.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/ftpx/core/__init__.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/ftpx/core/ftpx_service.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/ftpx/core/ftpx_session.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/ftpx/core/menu.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/ftpx/core/models/__init__.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/ftpx/core/models/list.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/igdb/__init__.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/igdb/client.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/igdb/core/__init__.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/igdb/core/api.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/igdb/core/models/__init__.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/igdb/core/models/search.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/igdb/core/platformid.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/igdb/core/tags.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/imageHost.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/mediaresult.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/sessions/__init__.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/sessions/agents.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/sessions/exceptions.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/sessions/session.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/theMovieDB/__init__.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/theMovieDB/core/__init__.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/theMovieDB/core/api.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/theMovieDB/core/keywords.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/theMovieDB/core/models/__init__.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/theMovieDB/core/models/movie/__init__.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/theMovieDB/core/models/movie/alternative_titles.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/theMovieDB/core/models/movie/details.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/theMovieDB/core/models/movie/movie.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/theMovieDB/core/models/movie/nowplaying.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/theMovieDB/core/models/movie/release_info.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/theMovieDB/core/models/tvshow/__init__.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/theMovieDB/core/models/tvshow/alternative.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/theMovieDB/core/models/tvshow/details.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/theMovieDB/core/models/tvshow/on_the_air.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/theMovieDB/core/models/tvshow/translations.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/theMovieDB/core/models/tvshow/tvshow.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/theMovieDB/core/videos.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/trailers/__init__.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/trailers/api.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/trailers/response.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/tvdb.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/extractor.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/frames.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/mediainfo.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/mediainfo_string.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/tags.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/title.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/torrent_clients.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/trackers/__init__.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/trackers/ban_list.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/trackers/data.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/trackers/itt.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/trackers/sis.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/common/trackers/trackers.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/requirements.txt +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/setup.cfg +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/unit3dup/__init__.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/unit3dup/automode.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/unit3dup/bot.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/unit3dup/duplicate.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/unit3dup/exceptions.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/unit3dup/media.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/unit3dup/media_manager/ContentManager.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/unit3dup/media_manager/DocuManager.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/unit3dup/media_manager/GameManager.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/unit3dup/media_manager/MediaInfoManager.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/unit3dup/media_manager/SeedManager.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/unit3dup/media_manager/TorrentManager.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/unit3dup/media_manager/VideoManager.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/unit3dup/media_manager/__init__.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/unit3dup/media_manager/common.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/unit3dup/pvtDocu.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/unit3dup/pvtTorrent.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/unit3dup/pvtTracker.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/unit3dup/pvtVideo.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/unit3dup/upload.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/view/__init__.py +0 -0
- {unit3dup-0.9.24 → unit3dup-0.9.26}/view/custom_console.py +0 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import json
|
|
2
|
+
import os
|
|
3
|
+
import sqlite3
|
|
4
|
+
from unit3dup import config_settings
|
|
5
|
+
|
|
6
|
+
# Torrent attributes
|
|
7
|
+
create_table_sql = ('\n'
|
|
8
|
+
'CREATE TABLE IF NOT EXISTS torrents (\n'
|
|
9
|
+
' id INTEGER PRIMARY KEY AUTOINCREMENT,\n'
|
|
10
|
+
' name TEXT,\n'
|
|
11
|
+
' category TEXT,\n'
|
|
12
|
+
' category_id INTEGER,\n'
|
|
13
|
+
' created_at TEXT,\n'
|
|
14
|
+
' description TEXT,\n'
|
|
15
|
+
' details_link TEXT,\n'
|
|
16
|
+
' download_link TEXT,\n'
|
|
17
|
+
' double_upload BOOLEAN,\n'
|
|
18
|
+
' featured BOOLEAN,\n'
|
|
19
|
+
' freeleech TEXT,\n'
|
|
20
|
+
' igdb_id INTEGER,\n'
|
|
21
|
+
' imdb_id TEXT,\n'
|
|
22
|
+
' info_hash TEXT,\n'
|
|
23
|
+
' internal BOOLEAN,\n'
|
|
24
|
+
' leechers INTEGER,\n'
|
|
25
|
+
' magnet_link TEXT,\n'
|
|
26
|
+
' mal_id INTEGER,\n'
|
|
27
|
+
' media_info TEXT,\n'
|
|
28
|
+
' release_year INTEGER,\n'
|
|
29
|
+
' resolution TEXT,\n'
|
|
30
|
+
' resolution_id INTEGER,\n'
|
|
31
|
+
' seeders INTEGER,\n'
|
|
32
|
+
' size INTEGER,\n'
|
|
33
|
+
' times_completed INTEGER,\n'
|
|
34
|
+
' tmdb_id INTEGER,\n'
|
|
35
|
+
' tvdb_id INTEGER,\n'
|
|
36
|
+
' type TEXT,\n'
|
|
37
|
+
' type_id INTEGER,\n'
|
|
38
|
+
' uploader TEXT,\n'
|
|
39
|
+
' personal_release BOOLEAN,\n'
|
|
40
|
+
' refundable BOOLEAN,\n'
|
|
41
|
+
' num_file INTEGER,\n'
|
|
42
|
+
' bd_info TEXT,\n'
|
|
43
|
+
' genres TEXT,\n'
|
|
44
|
+
' poster TEXT,\n'
|
|
45
|
+
' meta TEXT,\n'
|
|
46
|
+
' files TEXT\n'
|
|
47
|
+
')\n')
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class Database:
|
|
51
|
+
"""
|
|
52
|
+
Create a new database and populate it with torrents attributes
|
|
53
|
+
Search torrents based on attributes
|
|
54
|
+
"""
|
|
55
|
+
|
|
56
|
+
def __init__(self, db_file):
|
|
57
|
+
self.filename = db_file
|
|
58
|
+
self.CACHE_PATH = config_settings.user_preferences.CACHE_PATH
|
|
59
|
+
self.database = sqlite3.connect(os.path.join(self.CACHE_PATH, f"{db_file}.db"))
|
|
60
|
+
self.cursor = self.database.cursor()
|
|
61
|
+
self.build()
|
|
62
|
+
|
|
63
|
+
def build(self):
|
|
64
|
+
self.cursor.execute("DROP TABLE IF EXISTS torrents")
|
|
65
|
+
self.cursor.execute(create_table_sql)
|
|
66
|
+
self.database.commit()
|
|
67
|
+
|
|
68
|
+
def write(self, data: dict):
|
|
69
|
+
for key, value in data.items():
|
|
70
|
+
if isinstance(value, (dict, list)):
|
|
71
|
+
data[key] = json.dumps(value)
|
|
72
|
+
|
|
73
|
+
keys = ', '.join(data.keys())
|
|
74
|
+
placeholders = ', '.join(['?'] * len(data))
|
|
75
|
+
values = tuple(data.values())
|
|
76
|
+
sql = f'''INSERT INTO torrents ({keys}) VALUES ({placeholders})'''
|
|
77
|
+
self.cursor.execute(sql, values)
|
|
78
|
+
self.database.commit()
|
|
@@ -8,6 +8,7 @@ SIGNS_LIST = {
|
|
|
8
8
|
"APEX": "releaser",
|
|
9
9
|
"ARMOR": "releaser",
|
|
10
10
|
"ARRANCAR": "releaser",
|
|
11
|
+
"ARTEMIX": "releaser",
|
|
11
12
|
"ARTEMIX MIRCREW": "releaser",
|
|
12
13
|
"ASPIDE MIRCREW": "releaser",
|
|
13
14
|
"ASTOR": "releaser",
|
|
@@ -22,6 +23,7 @@ SIGNS_LIST = {
|
|
|
22
23
|
"BL4CK-B4RT-MIRCREW": "releaser",
|
|
23
24
|
"BLUWORLD": "releaser",
|
|
24
25
|
"BOBDOBBS": "releaser",
|
|
26
|
+
"BONE": "releaser",
|
|
25
27
|
"BULLITT": "releaser",
|
|
26
28
|
"BUMBLEBEE1982": "releaser",
|
|
27
29
|
"BUREK": "releaser",
|
|
@@ -82,6 +84,7 @@ SIGNS_LIST = {
|
|
|
82
84
|
"G66": "releaser",
|
|
83
85
|
"GABIACAS": "releaser",
|
|
84
86
|
"GATTOPOLLO": "releaser",
|
|
87
|
+
"GEGE": "releaser",
|
|
85
88
|
"GFM": "releaser",
|
|
86
89
|
"GIUSEPPETNT": "releaser",
|
|
87
90
|
"GOLDENTORRENT": "releaser",
|
|
@@ -215,12 +218,14 @@ SIGNS_LIST = {
|
|
|
215
218
|
"TIGER": "releaser",
|
|
216
219
|
"TIGRE67": "releaser",
|
|
217
220
|
"TBR": "releaser",
|
|
221
|
+
"TBZ": "releaser",
|
|
218
222
|
"T4P3": "releaser",
|
|
219
223
|
"TORRENTER10": "releaser",
|
|
220
224
|
"TOTAL_SHARE88": "releaser",
|
|
221
225
|
"TREE7458": "releaser",
|
|
222
226
|
"TRITON": "releaser",
|
|
223
227
|
"TRL": "releaser",
|
|
228
|
+
"TSUNAMI": "releaser",
|
|
224
229
|
"UBI": "releaser",
|
|
225
230
|
"UH": "releaser",
|
|
226
231
|
"V3SP4EV3R": "releaser",
|
|
@@ -21,7 +21,7 @@ class ManageTitles:
|
|
|
21
21
|
]
|
|
22
22
|
|
|
23
23
|
iso_3166_alpha3 = [
|
|
24
|
-
"ENG", "USA", "GBR", "ITA", "DEU", "FRA", "ESP",
|
|
24
|
+
"ENG", "USA", "GBR", "ITA", "DEU", "FRA", "ESP", "SPA",
|
|
25
25
|
"BRA", "JPN", "CHN", "RUS", "PER", "NOR",
|
|
26
26
|
"SWE", "DAN", "POL", "HIN", "TUR", "ARA", "KOR", "VIE", "IND"
|
|
27
27
|
]
|
|
@@ -31,7 +31,7 @@ class ManageTitles:
|
|
|
31
31
|
"IT": "ITA",
|
|
32
32
|
"DE": "DEU",
|
|
33
33
|
"FR": "FRA",
|
|
34
|
-
"ES": "
|
|
34
|
+
"ES": "SPA", "ES-ES": "SPA", "ES-MX": "SPA",
|
|
35
35
|
"BR": "BRA",
|
|
36
36
|
"JP": "JPN",
|
|
37
37
|
"CN": "CHN",
|
|
@@ -56,7 +56,7 @@ class ManageTitles:
|
|
|
56
56
|
"ITALIAN": "ITA",
|
|
57
57
|
"GERMAN": "DEU",
|
|
58
58
|
"FRENCH": "FRA",
|
|
59
|
-
"SPANISH": "
|
|
59
|
+
"SPANISH": "SPA",
|
|
60
60
|
"BRAZILIAN": "BRA",
|
|
61
61
|
"JAPANESE": "JPN",
|
|
62
62
|
"CHINESE": "CHN",
|
|
@@ -18,7 +18,7 @@ def main():
|
|
|
18
18
|
"""
|
|
19
19
|
|
|
20
20
|
custom_console.welcome_message()
|
|
21
|
-
custom_console.bot_question_log(f"
|
|
21
|
+
custom_console.bot_question_log(f"Unit3Dup {version} Checking your configuration file.. \n")
|
|
22
22
|
|
|
23
23
|
# Load user configuration data
|
|
24
24
|
config = Load().load_config()
|
|
@@ -181,8 +181,7 @@ def main():
|
|
|
181
181
|
|
|
182
182
|
# Dump
|
|
183
183
|
if cli.args.dump:
|
|
184
|
-
|
|
185
|
-
# torrent_info.view_search(" ", inkey=False,save=True) # Fix aggiunto Save
|
|
184
|
+
torrent_info.view_search(" ", inkey=False,save=True)
|
|
186
185
|
return
|
|
187
186
|
|
|
188
187
|
if cli.args.info:
|
|
@@ -198,7 +197,7 @@ def main():
|
|
|
198
197
|
return
|
|
199
198
|
|
|
200
199
|
if cli.args.uploader:
|
|
201
|
-
torrent_info.view_by_uploader(cli.args.uploader)
|
|
200
|
+
torrent_info.view_by_uploader(cli.args.uploader, save=cli.args.dbsave)
|
|
202
201
|
return
|
|
203
202
|
|
|
204
203
|
if cli.args.startyear:
|
|
@@ -4,17 +4,18 @@ import time
|
|
|
4
4
|
import requests
|
|
5
5
|
|
|
6
6
|
from common.trackers.trackers import TRACKData
|
|
7
|
-
|
|
7
|
+
from common.database import Database
|
|
8
8
|
from unit3dup import pvtTracker
|
|
9
9
|
from view import custom_console
|
|
10
10
|
|
|
11
|
+
|
|
11
12
|
class Torrent:
|
|
12
13
|
|
|
13
14
|
def __init__(self, tracker_name: str):
|
|
14
15
|
|
|
15
16
|
self.perPage = 100
|
|
16
17
|
self.tracker = pvtTracker.Unit3d(tracker_name=tracker_name)
|
|
17
|
-
|
|
18
|
+
self.database = Database(db_file=tracker_name)
|
|
18
19
|
|
|
19
20
|
def get_unique_id(self, media_info: str) -> str:
|
|
20
21
|
# Divido per campi
|
|
@@ -133,13 +134,11 @@ class Torrent:
|
|
|
133
134
|
personalRelease=True, perPage=self.perPage
|
|
134
135
|
)
|
|
135
136
|
|
|
136
|
-
|
|
137
137
|
# Filter 'Combo'
|
|
138
|
-
def get_by_tmdb_res(self, tmdb_id: int
|
|
138
|
+
def get_by_tmdb_res(self, tmdb_id: int, resolution_id: str) -> requests.Response:
|
|
139
139
|
return self.tracker.get_tmdb_res(tmdb_id=tmdb_id, res_id=resolution_id, perPage=self.perPage)
|
|
140
140
|
|
|
141
141
|
|
|
142
|
-
|
|
143
142
|
class View(Torrent):
|
|
144
143
|
|
|
145
144
|
def __init__(self, tracker_name: str):
|
|
@@ -148,6 +147,7 @@ class View(Torrent):
|
|
|
148
147
|
# Load the constant tracker
|
|
149
148
|
self.tracker_data = TRACKData.load_from_module(tracker_name=tracker_name)
|
|
150
149
|
self.tracker_name = tracker_name
|
|
150
|
+
|
|
151
151
|
print()
|
|
152
152
|
|
|
153
153
|
def get_unique_id(self, media_info: str) -> str:
|
|
@@ -173,8 +173,7 @@ class View(Torrent):
|
|
|
173
173
|
f" -> {item['attributes']['name']}"
|
|
174
174
|
)
|
|
175
175
|
|
|
176
|
-
|
|
177
|
-
def print_normal(self, tracker_data: dict, save= False):
|
|
176
|
+
def print_normal(self, tracker_data: dict, save=False):
|
|
178
177
|
data = [item for item in tracker_data["data"]]
|
|
179
178
|
for item in data:
|
|
180
179
|
if item['attributes']['tmdb_id'] != 0:
|
|
@@ -185,21 +184,20 @@ class View(Torrent):
|
|
|
185
184
|
|
|
186
185
|
media = f"{self.tracker_name} - TMDB: {item['attributes']['tmdb_id']} - {release_year}"
|
|
187
186
|
|
|
188
|
-
elif item['attributes']['igdb_id'] !=0:
|
|
189
|
-
|
|
187
|
+
elif item['attributes']['igdb_id'] != 0:
|
|
188
|
+
media = f"{self.tracker_name} IGDB: {item['attributes']['igdb_id']}"
|
|
190
189
|
else:
|
|
191
190
|
media = f"{self.tracker_name} DOC:"
|
|
192
191
|
|
|
193
192
|
# Print a data to the console
|
|
194
193
|
custom_console.bot_log(f"\n {media} - {item['attributes']['name']}")
|
|
195
194
|
# Save torrent data into database by -db flag
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
195
|
+
if save:
|
|
196
|
+
self.database.write(item['attributes'])
|
|
199
197
|
|
|
200
198
|
def page_view(self, tracker_data: dict, tracker: pvtTracker.Tracker, info=False, inkey=True, save=False):
|
|
201
199
|
|
|
202
|
-
self.print_normal(tracker_data,save=save) if not info else self.print_info(tracker_data)
|
|
200
|
+
self.print_normal(tracker_data, save=save) if not info else self.print_info(tracker_data)
|
|
203
201
|
page = 0
|
|
204
202
|
while True:
|
|
205
203
|
if not tracker_data["links"]["next"]:
|
|
@@ -229,7 +227,7 @@ class View(Torrent):
|
|
|
229
227
|
tracker_data = self.search(keyword=keyword)
|
|
230
228
|
custom_console.log(f"Searching.. '{keyword}'")
|
|
231
229
|
(
|
|
232
|
-
self.page_view(tracker_data=tracker_data, tracker=self.tracker,inkey=inkey, save=save)
|
|
230
|
+
self.page_view(tracker_data=tracker_data, tracker=self.tracker, inkey=inkey, save=save)
|
|
233
231
|
if not info
|
|
234
232
|
else self.page_view(
|
|
235
233
|
tracker_data=tracker_data, tracker=self.tracker, info=True
|
|
@@ -247,10 +245,10 @@ class View(Torrent):
|
|
|
247
245
|
custom_console.bot_log(f"Filter by the torrent's BDInfo.. '{bdinfo.upper()}'")
|
|
248
246
|
self.page_view(tracker_data=tracker_data, tracker=self.tracker)
|
|
249
247
|
|
|
250
|
-
def view_by_uploader(self, username: str):
|
|
248
|
+
def view_by_uploader(self, username: str, save=False):
|
|
251
249
|
tracker_data = self.get_by_uploader(username=username)
|
|
252
250
|
custom_console.bot_log(f"Filter by the torrent uploader's username.. '{username.upper()}'")
|
|
253
|
-
self.page_view(tracker_data=tracker_data, tracker=self.tracker)
|
|
251
|
+
self.page_view(tracker_data=tracker_data, tracker=self.tracker, save=save)
|
|
254
252
|
|
|
255
253
|
def view_by_start_year(self, startyear: str):
|
|
256
254
|
tracker_data = self.get_by_start_year(start_year=startyear)
|
|
@@ -455,7 +453,7 @@ class View(Torrent):
|
|
|
455
453
|
self.page_view(tracker_data=tracker_data, tracker=self.tracker)
|
|
456
454
|
|
|
457
455
|
# Filter 'Combo'
|
|
458
|
-
def view_tmdb_res(self, tmdb_id: int
|
|
456
|
+
def view_tmdb_res(self, tmdb_id: int, res_name: str) -> requests.Response | None:
|
|
459
457
|
|
|
460
458
|
# Filter by TMDB and Resolution
|
|
461
459
|
if res_name not in self.tracker_data.resolution.keys():
|
|
@@ -463,7 +461,7 @@ class View(Torrent):
|
|
|
463
461
|
custom_console.bot_warning_log(";".join(list(self.tracker_data.resolution.keys())[:-1]))
|
|
464
462
|
exit()
|
|
465
463
|
|
|
466
|
-
tracker_data = self.get_by_tmdb_res(tmdb_id=tmdb_id,
|
|
464
|
+
tracker_data = self.get_by_tmdb_res(tmdb_id=tmdb_id,
|
|
465
|
+
resolution_id=str(self.tracker_data.resolution.get(res_name)))
|
|
467
466
|
if tracker_data:
|
|
468
467
|
self.page_view(tracker_data=tracker_data, tracker=self.tracker)
|
|
469
|
-
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import json
|
|
2
|
-
# import os
|
|
3
|
-
# import sqlite3
|
|
4
|
-
# from unit3dup import config_settings
|
|
5
|
-
#
|
|
6
|
-
# # Torrent attributes
|
|
7
|
-
# create_table_sql = ('\n'
|
|
8
|
-
# 'CREATE TABLE IF NOT EXISTS torrents (\n'
|
|
9
|
-
# ' id INTEGER PRIMARY KEY AUTOINCREMENT,\n'
|
|
10
|
-
# ' name TEXT,\n'
|
|
11
|
-
# ' category TEXT,\n'
|
|
12
|
-
# ' category_id INTEGER,\n'
|
|
13
|
-
# ' created_at TEXT,\n'
|
|
14
|
-
# ' description TEXT,\n'
|
|
15
|
-
# ' details_link TEXT,\n'
|
|
16
|
-
# ' download_link TEXT,\n'
|
|
17
|
-
# ' double_upload BOOLEAN,\n'
|
|
18
|
-
# ' featured BOOLEAN,\n'
|
|
19
|
-
# ' freeleech TEXT,\n'
|
|
20
|
-
# ' igdb_id INTEGER,\n'
|
|
21
|
-
# ' imdb_id TEXT,\n'
|
|
22
|
-
# ' info_hash TEXT,\n'
|
|
23
|
-
# ' internal BOOLEAN,\n'
|
|
24
|
-
# ' leechers INTEGER,\n'
|
|
25
|
-
# ' magnet_link TEXT,\n'
|
|
26
|
-
# ' mal_id INTEGER,\n'
|
|
27
|
-
# ' media_info TEXT,\n'
|
|
28
|
-
# ' release_year INTEGER,\n'
|
|
29
|
-
# ' resolution TEXT,\n'
|
|
30
|
-
# ' resolution_id INTEGER,\n'
|
|
31
|
-
# ' seeders INTEGER,\n'
|
|
32
|
-
# ' size INTEGER,\n'
|
|
33
|
-
# ' times_completed INTEGER,\n'
|
|
34
|
-
# ' tmdb_id INTEGER,\n'
|
|
35
|
-
# ' tvdb_id INTEGER,\n'
|
|
36
|
-
# ' type TEXT,\n'
|
|
37
|
-
# ' type_id INTEGER,\n'
|
|
38
|
-
# ' uploader TEXT,\n'
|
|
39
|
-
# ' personal_release BOOLEAN,\n'
|
|
40
|
-
# ' refundable BOOLEAN,\n'
|
|
41
|
-
# ' num_file INTEGER,\n'
|
|
42
|
-
# ' bd_info TEXT,\n'
|
|
43
|
-
# ' genres TEXT,\n'
|
|
44
|
-
# ' poster TEXT,\n'
|
|
45
|
-
# ' meta TEXT,\n'
|
|
46
|
-
# ' files TEXT\n'
|
|
47
|
-
# ')\n')
|
|
48
|
-
#
|
|
49
|
-
#
|
|
50
|
-
# class Database:
|
|
51
|
-
# """
|
|
52
|
-
# Create a new database and populate it with torrents attributes
|
|
53
|
-
# Search torrents based on attributes
|
|
54
|
-
# """
|
|
55
|
-
#
|
|
56
|
-
# def __init__(self, db_file):
|
|
57
|
-
# self.filename = db_file
|
|
58
|
-
# self.CACHE_PATH = config_settings.user_preferences.CACHE_PATH
|
|
59
|
-
# self.database = sqlite3.connect(os.path.join(self.CACHE_PATH,f"{db_file}.db"))
|
|
60
|
-
# self.cursor = self.database.cursor()
|
|
61
|
-
# self.build()
|
|
62
|
-
#
|
|
63
|
-
# def build(self):
|
|
64
|
-
# self.cursor.execute("DROP TABLE IF EXISTS torrents")
|
|
65
|
-
# self.cursor.execute(create_table_sql)
|
|
66
|
-
# self.database.commit()
|
|
67
|
-
#
|
|
68
|
-
#
|
|
69
|
-
# def write(self, data: dict):
|
|
70
|
-
# for key, value in data.items():
|
|
71
|
-
# if isinstance(value, (dict,list)):
|
|
72
|
-
# data[key] = json.dumps(value)
|
|
73
|
-
#
|
|
74
|
-
# keys = ', '.join(data.keys())
|
|
75
|
-
# placeholders = ', '.join(['?'] * len(data))
|
|
76
|
-
# values = tuple(data.values())
|
|
77
|
-
# sql = f'''INSERT INTO torrents ({keys}) VALUES ({placeholders})'''
|
|
78
|
-
# self.cursor.execute(sql, values)
|
|
79
|
-
# self.database.commit()
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/theMovieDB/core/models/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/theMovieDB/core/models/movie/details.py
RENAMED
|
File without changes
|
{unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/theMovieDB/core/models/movie/movie.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{unit3dup-0.9.24 → unit3dup-0.9.26}/common/external_services/theMovieDB/core/models/tvshow/tvshow.py
RENAMED
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|