Update to 1.7.0
This commit is contained in:
parent
1764bdc803
commit
58a80e45e1
7 changed files with 51 additions and 4 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -40,4 +40,5 @@ build/
|
|||
publish/
|
||||
server/Downloader/
|
||||
|
||||
node_modules/
|
||||
node_modules/
|
||||
RealDebridClient.zip
|
||||
|
|
|
|||
|
|
@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [1.7.0] - 2021-04-01
|
||||
### Added
|
||||
- Add automatic retry functionality for downloads. It will retry downloading a file after an error 3 times.
|
||||
- Add Update.ps1 to automatically download the latest version from Github for Windows users.
|
||||
### Changed
|
||||
- Fixed an issue downloads sometimes getting added multiple times.
|
||||
|
||||
## [1.6.3] - 2021-03-15
|
||||
### Changed
|
||||
- Fixed a bug where it sometimes could add a download multiple times when the RD torrent was in a certain state.
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
<a class="navbar-item"> Profile </a>
|
||||
<a class="navbar-item" (click)="logout()"> Logout </a>
|
||||
<hr class="navbar-divider" />
|
||||
<div class="navbar-item">Version 1.6.3</div>
|
||||
<div class="navbar-item">Version 1.7.0</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,16 @@
|
|||
$utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
|
||||
|
||||
$version = (Get-Content "package.json" | ConvertFrom-Json).version
|
||||
|
||||
$csProj = "$pwd\server\RdtClient.Web\RdtClient.Web.csproj"
|
||||
$navbar = "$pwd\client\src\app\navbar\navbar.component.html";
|
||||
|
||||
$newCsProj = (Get-Content $csProj) -replace '<Version>.*?<\/Version>', "<Version>$version</Version>"
|
||||
[System.IO.File]::WriteAllLines($csProj, $newCsProj, $utf8NoBomEncoding)
|
||||
|
||||
$newNavbar = (Get-Content $navbar) -replace 'Version .*?<', "Version $version<"
|
||||
[System.IO.File]::WriteAllLines($navbar, $newNavbar, $utf8NoBomEncoding)
|
||||
|
||||
cd client
|
||||
npm install
|
||||
ng build --prod --output-path=..\server\RdtClient.Web\wwwroot
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "rdt-client",
|
||||
"version": "1.6.3",
|
||||
"version": "1.7.0",
|
||||
"description": "This is a web interface to manage your torrents on Real-Debrid.",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<TargetFramework>net5.0</TargetFramework>
|
||||
<OutputType>Exe</OutputType>
|
||||
<UserSecretsId>94c24cba-f03f-4453-a671-3640b517c573</UserSecretsId>
|
||||
<Version>1.6.3</Version>
|
||||
<Version>1.7.0</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
26
server/RdtClient.Web/Update.ps1
Normal file
26
server/RdtClient.Web/Update.ps1
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
If (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator"))
|
||||
{
|
||||
$arguments = "& '" + $myinvocation.mycommand.definition + "'"
|
||||
Start-Process powershell -Verb runAs -ArgumentList $arguments
|
||||
Break
|
||||
}
|
||||
|
||||
Stop-Service RealDebridClient
|
||||
|
||||
$releasesUri = "https://api.github.com/repos/rogerfar/rdt-client/releases/latest"
|
||||
$downloadUri = ((Invoke-RestMethod -Method GET -Uri $releasesUri).assets | Where-Object name -like "*.zip").browser_download_url
|
||||
|
||||
$pathZip = Join-Path -Path $([System.IO.Path]::GetTempPath()) -ChildPath $(Split-Path -Path $downloadUri -Leaf)
|
||||
|
||||
Invoke-WebRequest -Uri $downloadUri -Out $pathZip
|
||||
|
||||
$tempExtract = Join-Path -Path $([System.IO.Path]::GetTempPath()) -ChildPath $((New-Guid).Guid)
|
||||
|
||||
Expand-Archive -Path $pathZip -DestinationPath $tempExtract -Force
|
||||
Copy-Item -Path ".\appsettings.json" -Destination $tempExtract -Force
|
||||
Move-Item -Path "$tempExtract\*" -Destination $pathExtract -Force
|
||||
Remove-Item -Path $tempExtract -Force -Recurse -ErrorAction SilentlyContinue
|
||||
|
||||
Remove-Item $pathZip -Force
|
||||
|
||||
Start-Service RealDebridClient
|
||||
Loading…
Reference in a new issue