mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-07 11:48:55 -05:00
[Downloader] Actually use disabled key in updates (#3203)
* fix(downloader): actually use disabled key in updates * chore(changelog): add towncrier entry
This commit is contained in:
parent
62b679b1b9
commit
bc90f5186a
1
changelog.d/downloader/3173.misc.rst
Normal file
1
changelog.d/downloader/3173.misc.rst
Normal file
@ -0,0 +1 @@
|
|||||||
|
Downloader will no longer show update for a cog if the latest version is disabled through ``info.json`` file.
|
||||||
@ -252,7 +252,7 @@ class Downloader(commands.Cog):
|
|||||||
continue
|
continue
|
||||||
# marking cog for update if there's no commit data saved (back-compat, see GH-2571)
|
# marking cog for update if there's no commit data saved (back-compat, see GH-2571)
|
||||||
last_cog_occurrence = await cog.repo.get_last_module_occurrence(cog.name)
|
last_cog_occurrence = await cog.repo.get_last_module_occurrence(cog.name)
|
||||||
if last_cog_occurrence is not None:
|
if last_cog_occurrence is not None and not last_cog_occurrence.disabled:
|
||||||
cogs_to_update.add(last_cog_occurrence)
|
cogs_to_update.add(last_cog_occurrence)
|
||||||
|
|
||||||
# Reduces diff requests to a single dict with no repeats
|
# Reduces diff requests to a single dict with no repeats
|
||||||
@ -277,7 +277,8 @@ class Downloader(commands.Cog):
|
|||||||
else:
|
else:
|
||||||
modified_module = modified[index]
|
modified_module = modified[index]
|
||||||
if modified_module.type == InstallableType.COG:
|
if modified_module.type == InstallableType.COG:
|
||||||
cogs_to_update.add(modified_module)
|
if not modified_module.disabled:
|
||||||
|
cogs_to_update.add(modified_module)
|
||||||
elif modified_module.type == InstallableType.SHARED_LIBRARY:
|
elif modified_module.type == InstallableType.SHARED_LIBRARY:
|
||||||
libraries_to_update.add(modified_module)
|
libraries_to_update.add(modified_module)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user