2011-12-27 06:03:17 +00:00
|
|
|
<?php
|
2016-11-05 12:26:41 +00:00
|
|
|
$version = isset($_GET['version']) ? $_GET['version'] : '@{application.version}'; // default version is hard-coded via deployment script
|
2011-12-27 06:03:17 +00:00
|
|
|
$arch = $_GET['arch'];
|
|
|
|
$type = $_GET['type'];
|
|
|
|
|
2015-06-02 11:46:09 +00:00
|
|
|
$root = 'https://downloads.sourceforge.net/project/filebot/filebot/';
|
|
|
|
$folder = $root.'FileBot_'.$version;
|
2016-04-09 08:33:46 +00:00
|
|
|
$file = '';
|
2013-08-08 02:59:27 +00:00
|
|
|
|
|
|
|
if ($type == 'nsis') {
|
2016-06-12 11:03:54 +00:00
|
|
|
$folder = 'https://app.filebot.net/files';
|
2013-08-08 02:59:27 +00:00
|
|
|
$file = 'FileBot-setup.exe';
|
2016-05-11 13:56:45 +00:00
|
|
|
} else if ($type == 'app') {
|
2016-05-11 14:13:44 +00:00
|
|
|
$folder = 'https://app.filebot.net/files';
|
2016-05-11 13:56:45 +00:00
|
|
|
$file = 'FileBot.app';
|
2015-06-01 10:48:35 +00:00
|
|
|
} else if ($type == 'jar') {
|
2015-06-02 11:46:09 +00:00
|
|
|
$folder = $root.'HEAD';
|
2015-06-01 10:48:35 +00:00
|
|
|
$file = 'FileBot.jar';
|
2016-04-09 08:33:46 +00:00
|
|
|
} else if ($type == 'msi') {
|
2011-12-27 06:03:17 +00:00
|
|
|
$file = 'FileBot_'.$version.'_'.$arch.'.msi';
|
2016-04-09 08:33:46 +00:00
|
|
|
} else if ($type == 'deb') {
|
2011-12-27 06:03:17 +00:00
|
|
|
$file = 'filebot_'.$version.'_'.$arch.'.deb';
|
2016-04-09 08:33:46 +00:00
|
|
|
} else if ($type == 'portable') {
|
2016-11-05 12:26:41 +00:00
|
|
|
$file = 'FileBot_'.$version.'-portable.tar.xz';
|
2016-04-11 22:06:38 +00:00
|
|
|
} else {
|
2016-04-19 21:20:07 +00:00
|
|
|
$folder = 'https://sourceforge.net/projects/filebot/files/filebot/FileBot_'.$version; // redirect to latest release folder by default
|
2016-04-09 08:33:46 +00:00
|
|
|
}
|
2013-04-24 08:14:22 +00:00
|
|
|
|
|
|
|
header('HTTP/1.1 302 Found');
|
2015-06-02 14:34:10 +00:00
|
|
|
header('Location: '.$folder.'/'.$file);
|
2011-12-27 06:03:17 +00:00
|
|
|
?>
|