use SourceForge release API

This commit is contained in:
Steffen Lange 2022-09-21 18:12:40 +02:00
parent d17d6af38d
commit b83e852315
3 changed files with 6 additions and 6 deletions

View file

@ -5,8 +5,8 @@ class Avidemux extends PatchBase {
parent::__construct('Mean', 'Avidemux', 'http://avidemux.sourceforge.net/download.html'); parent::__construct('Mean', 'Avidemux', 'http://avidemux.sourceforge.net/download.html');
} }
function check() : bool { function check() : bool {
if ($this->fetch('http://avidemux.sourceforge.net/download.html')) if ($this->fetch_json('https://sourceforge.net/projects/avidemux/best_release.json'))
return $this->parse('/avidemux_([\d\.]+)\.tar\.gz/'); return $this->parse_json('filename', '/^\/avidemux\/(.+)\//');
return false; return false;
} }
} }

View file

@ -5,8 +5,8 @@ class Minidlna extends PatchBase {
parent::__construct('Justin Maggard', 'ReadyMedia', 'https://sourceforge.net/projects/minidlna/files/'); parent::__construct('Justin Maggard', 'ReadyMedia', 'https://sourceforge.net/projects/minidlna/files/');
} }
function check() : bool { function check() : bool {
if ($this->fetch('https://sourceforge.net/projects/minidlna/files/latest/download')) if ($this->fetch_json('https://sourceforge.net/projects/minidlna/best_release.json'))
return $this->parse('/<div class="file-name">\s*minidlna-([\d\.]+)\.tar\.gz\s*<\/div>/'); return $this->parse_json('filename', '/^\/minidlna\/(.+)\//');
return false; return false;
} }
} }

View file

@ -5,8 +5,8 @@ class ProjectLibre extends PatchBase {
parent::__construct('ProjectLibre Inc.', 'ProjectLibre', 'https://www.projectlibre.com/product/1-alternative-microsoft-project-open-source'); parent::__construct('ProjectLibre Inc.', 'ProjectLibre', 'https://www.projectlibre.com/product/1-alternative-microsoft-project-open-source');
} }
function check() : bool { function check() : bool {
if ($this->fetch('https://sourceforge.net/projects/projectlibre/files/latest/download')) if ($this->fetch_json('https://sourceforge.net/projects/projectlibre/best_release.json'))
return $this->parse('/<div class="file-name">\s*projectlibre-([\d\.]+)\.jar\s*<\/div>/'); return $this->parse_json('filename', '/^\/ProjectLibre\/(.+)\//');
return false; return false;
} }
} }