Skip to content

Commit

Permalink
Changed source of stable ElvUI/Tukui
Browse files Browse the repository at this point in the history
  • Loading branch information
AcidWeb committed Nov 20, 2020
1 parent 85610ae commit 1e71b7f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 16 deletions.
8 changes: 4 additions & 4 deletions CB/Core.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,19 +197,19 @@ def parse_url(self, url):
return GitHubAddon(url, self.clientType)
elif url.lower() == 'elvui':
if self.clientType == 'wow_retail':
return GitLabAddon('ElvUI', '60', 'elvui/elvui', 'master')
return TukuiAddon('ElvUI', False, 'elvui')
else:
return GitLabAddon('ElvUI', '492', 'elvui/elvui-classic', 'master')
return TukuiAddon('2', True)
elif url.lower() == 'elvui:dev':
if self.clientType == 'wow_retail':
return GitLabAddon('ElvUI', '60', 'elvui/elvui', 'development')
else:
return GitLabAddon('ElvUI', '492', 'elvui/elvui-classic', 'development')
elif url.lower() == 'tukui':
if self.clientType == 'wow_retail':
return GitLabAddon('Tukui', '77', 'Tukz/Tukui', 'master')
return TukuiAddon('Tukui', False, 'tukui')
else:
return GitLabAddon('Tukui', '77', 'Tukz/Tukui', 'Classic')
return TukuiAddon('1', True)
elif url.lower() == 'shadow&light:dev':
if self.clientType == 'wow_retail':
return GitLabAddon('ElvUI Shadow & Light', '45', 'shadow-and-light/shadow-and-light', 'dev')
Expand Down
8 changes: 1 addition & 7 deletions CB/GitLab.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,11 @@ def __init__(self, name, projectid, path, branch):
self.author = []

if name == 'ElvUI':
self.author = ['Elv', 'Blazeflack']
self.author = ['Elv']
if projectid == '60':
self.changelogUrl = 'https://www.tukui.org/download.php?ui=elvui&changelog'
elif projectid == '492':
self.changelogUrl = 'https://www.tukui.org/classic-addons.php?id=2&changelog'
elif name == 'Tukui':
self.author = ['Tukz']
if branch == 'master':
self.changelogUrl = 'https://www.tukui.org/download.php?ui=tukui&changelog'
elif branch == 'Classic':
self.changelogUrl = 'https://www.tukui.org/classic-addons.php?id=1&changelog'
elif name == 'ElvUI Shadow & Light':
self.author = ['Repooc', 'DarthPredator']
self.changelogUrl = 'https://git.tukui.org/shadow-and-light/shadow-and-light/-/commits/dev'
Expand Down
12 changes: 8 additions & 4 deletions CB/Tukui.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@

class TukuiAddon:
@retry()
def __init__(self, url, isclassic):
project = re.findall(r'\d+', url)[0]
self.payload = requests.get(f'https://www.tukui.org/api.php?{"classic-" if isclassic else ""}addon={project}',
headers=HEADERS, timeout=5)
def __init__(self, url, isclassic, special=None):
if special:
self.payload = requests.get(f'https://www.tukui.org/client-api.php?ui={special}',
headers=HEADERS, timeout=5)
else:
project = re.findall(r'\d+', url)[0]
self.payload = requests.get(f'https://www.tukui.org/api.php?'
f'{"classic-" if isclassic else ""}addon={project}', headers=HEADERS, timeout=5)
if self.payload.text == '':
raise RuntimeError(url)
else:
Expand Down
2 changes: 1 addition & 1 deletion CB/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import random
from rich.terminal_theme import TerminalTheme

__version__ = '3.15.0'
__version__ = '3.15.1'
__license__ = 'GPLv3'
__copyright__ = '2019-2020, Paweł Jastrzębski <[email protected]>'
__docformat__ = 'restructuredtext en'
Expand Down

0 comments on commit 1e71b7f

Please sign in to comment.