Skip to content

Commit

Permalink
Merge branch 'RROrg:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
offsoc authored Jan 19, 2025
2 parents 8f502a9 + 4a3339d commit 3488715
Show file tree
Hide file tree
Showing 10 changed files with 201 additions and 191 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
25.1.1
25.1.3
302 changes: 151 additions & 151 deletions docs/addons.json

Large diffs are not rendered by default.

Binary file modified docs/addons.xlsx
Binary file not shown.
Binary file modified docs/models.xlsx
Binary file not shown.
Binary file modified docs/modules.xlsx
Binary file not shown.
Binary file modified docs/pats.xlsx
Binary file not shown.
2 changes: 1 addition & 1 deletion files/initrd/opt/rr/include/consts.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
RR_VERSION="25.1.1"
RR_VERSION="25.1.3"
RR_RELEASE=""
RR_TITLE="RR v${RR_VERSION}"

Expand Down
27 changes: 15 additions & 12 deletions files/initrd/opt/rr/include/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def getmodels(platforms=None):
"""
Get Syno Models.
"""
import json, requests, urllib3
import re, json, requests, urllib3
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.util.retry import Retry # type: ignore

Expand All @@ -127,20 +127,23 @@ def getmodels(platforms=None):

models = []
try:
req = session.get("https://autoupdate.synology.com/os/v2", timeout=10, verify=False)
url = "http://update7.synology.com/autoupdate/genRSS.php?include_beta=1"
#url = "https://update7.synology.com/autoupdate/genRSS.php?include_beta=1"

req = session.get(url, timeout=10, verify=False)
req.encoding = "utf-8"
data = json.loads(req.text)
p = re.compile(r"<mUnique>(.*?)</mUnique>.*?<mLink>(.*?)</mLink>", re.MULTILINE | re.DOTALL)

for item in data["channel"]["item"]:
if not item["title"].startswith("DSM"):
data = p.findall(req.text)
for item in data:
if not "DSM" in item[1]:
continue
for model in item["model"]:
arch = model["mUnique"].split("_")[1]
name = model["mLink"].split("/")[-1].split("_")[1].replace("%2B", "+")
if PS and arch.lower() not in PS:
continue
if not any(m["name"] == name for m in models):
models.append({"name": name, "arch": arch})
arch = item[0].split("_")[1]
name = item[1].split("/")[-1].split("_")[1].replace("%2B", "+")
if PS and arch.lower() not in PS:
continue
if not any(m["name"] == name for m in models):
models.append({"name": name, "arch": arch})

models.sort(key=lambda k: (k["arch"], k["name"]))

Expand Down
2 changes: 1 addition & 1 deletion files/mnt/p1/RR_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
25.1.1
25.1.3
57 changes: 32 additions & 25 deletions scripts/func.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# See /LICENSE for more information.
#

import os, sys, glob, json, yaml, click, shutil, tarfile, kmodule, requests, urllib3
import os, re, sys, glob, json, yaml, click, shutil, tarfile, kmodule, requests, urllib3
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.util.retry import Retry # type: ignore
from openpyxl import Workbook
Expand Down Expand Up @@ -44,24 +44,28 @@ def getmodels(workpath, jsonpath, xlsxpath):
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)

try:
req = session.get("https://autoupdate.synology.com/os/v2", timeout=10, verify=False)
url = "http://update7.synology.com/autoupdate/genRSS.php?include_beta=1"
#url = "https://update7.synology.com/autoupdate/genRSS.php?include_beta=1"

req = session.get(url, timeout=10, verify=False)
req.encoding = "utf-8"
data = json.loads(req.text)
p = re.compile(r"<mUnique>(.*?)</mUnique>.*?<mLink>(.*?)</mLink>", re.MULTILINE | re.DOTALL)

data = p.findall(req.text)
except Exception as e:
click.echo(f"Error: {e}")
return

for item in data["channel"]["item"]:
if not item["title"].startswith("DSM"):
for item in data:
if not "DSM" in item[1]:
continue
for model in item["model"]:
arch = model["mUnique"].split("_")[1].lower()
name = model["mLink"].split("/")[-1].split("_")[1].replace("%2B", "+")
if arch not in models:
continue
if name in (A for B in models for A in models[B]["models"]):
continue
models[arch]["models"].append(name)
arch = item[0].split("_")[1]
name = item[1].split("/")[-1].split("_")[1].replace("%2B", "+")
if arch not in models:
continue
if name in (A for B in models for A in models[B]["models"]):
continue
models[arch]["models"].append(name)

if jsonpath:
with open(jsonpath, "w") as f:
Expand Down Expand Up @@ -99,25 +103,28 @@ def __fullversion(ver):
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)

try:
req = session.get("https://autoupdate.synology.com/os/v2", timeout=10, verify=False)
url = "http://update7.synology.com/autoupdate/genRSS.php?include_beta=1"
#url = "https://update7.synology.com/autoupdate/genRSS.php?include_beta=1"

req = session.get(url, timeout=10, verify=False)
req.encoding = "utf-8"
data = json.loads(req.text)
p = re.compile(r"<mUnique>(.*?)</mUnique>.*?<mLink>(.*?)</mLink>", re.MULTILINE | re.DOTALL)
data = p.findall(req.text)
except Exception as e:
click.echo(f"Error: {e}")
return

models = []
for item in data["channel"]["item"]:
if not item["title"].startswith("DSM"):
for item in data:
if not "DSM" in item[1]:
continue
for model in item["model"]:
arch = model["mUnique"].split("_")[1].lower()
name = model["mLink"].split("/")[-1].split("_")[1].replace("%2B", "+")
if arch not in platforms:
continue
if name in models:
continue
models.append(name)
arch = item[0].split("_")[1]
name = item[1].split("/")[-1].split("_")[1].replace("%2B", "+")
if arch not in platforms:
continue
if name in models:
continue
models.append(name)

pats = {}
for M in models:
Expand Down

0 comments on commit 3488715

Please sign in to comment.