mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-07-17 16:50:53 +00:00
migrate official plugin repo URL to GitHub Pages
This commit is contained in:
parent
bdf59b8c19
commit
37e11c8fc4
2 changed files with 26 additions and 3 deletions
25
apps/plugins/migrations/0003_update_official_repo_url.py
Normal file
25
apps/plugins/migrations/0003_update_official_repo_url.py
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
from django.db import migrations
|
||||
|
||||
def update_url(apps, schema_editor):
|
||||
PluginRepo = apps.get_model("plugins", "PluginRepo")
|
||||
PluginRepo.objects.filter(is_official=True).update(
|
||||
url="https://dispatcharr.github.io/Plugins/manifest.json"
|
||||
)
|
||||
|
||||
|
||||
def revert_url(apps, schema_editor):
|
||||
PluginRepo = apps.get_model("plugins", "PluginRepo")
|
||||
PluginRepo.objects.filter(is_official=True).update(
|
||||
url="https://raw.githubusercontent.com/Dispatcharr/Plugins/releases/manifest.json"
|
||||
)
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("plugins", "0002_pluginrepo"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(update_url, revert_url),
|
||||
]
|
||||
|
|
@ -36,9 +36,7 @@ class PluginConfig(models.Model):
|
|||
return f"{self.name} ({self.key})"
|
||||
|
||||
|
||||
OFFICIAL_REPO_URL = (
|
||||
"https://raw.githubusercontent.com/Dispatcharr/Plugins/releases/manifest.json"
|
||||
)
|
||||
OFFICIAL_REPO_URL = "https://dispatcharr.github.io/Plugins/manifest.json"
|
||||
|
||||
|
||||
class PluginRepo(models.Model):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue