Skip to content

Commit

Permalink
Merge pull request #7 from ta264/async-download
Browse files Browse the repository at this point in the history
Bump minimum Lidarr version to 1.3.5.3499
  • Loading branch information
mynameisbogdan authored Aug 31, 2023
2 parents a8d4d12 + ecc90eb commit a44ff64
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
PLUGIN_NAME: Lidarr.Plugin.Deemix
PLUGIN_VERSION: 1.0.0.${{ github.run_number }}
MINIMUM_LIDARR_VERSION: 1.2.0.3183
MINIMUM_LIDARR_VERSION: 1.3.5.3499
DOTNET_VERSION: 6.0.408

jobs:
Expand All @@ -39,11 +39,14 @@ jobs:
- name: Create global.json
run: |
echo '{"sdk":{"version": "${{ env.DOTNET_VERSION }}"}}' > ./global.json
- name: Generate metadata
id: gen_meta
run: |
echo "branch=${GITHUB_REF#refs/heads/}" | tr '/' '-' >> $GITHUB_OUTPUT
- name: Update Version Info
run: |
echo $PLUGIN_VERSION
sed -i'' -e "s/<AssemblyVersion>[0-9.*]\+<\/AssemblyVersion>/<AssemblyVersion>$PLUGIN_VERSION<\/AssemblyVersion>/g" src/Directory.Build.props
sed -i'' -e "s/<AssemblyConfiguration>[\$()A-Za-z-]\+<\/AssemblyConfiguration>/<AssemblyConfiguration>${GITHUB_REF#refs/heads/}<\/AssemblyConfiguration>/g" src/Directory.Build.props
sed -i'' -e "s/<AssemblyConfiguration>[\$()A-Za-z-]\+<\/AssemblyConfiguration>/<AssemblyConfiguration>${{ steps.gen_meta.outputs.branch }}<\/AssemblyConfiguration>/g" src/Directory.Build.props
sed -i'' -e "s/<AssemblyVersion>[0-9.*]\+<\/AssemblyVersion>/<AssemblyVersion>$MINIMUM_LIDARR_VERSION<\/AssemblyVersion>/g" src/Lidarr/src/Directory.Build.props
- name: Build
run: dotnet publish src/*.sln -c Release -f ${{ matrix.framework }}
Expand Down
2 changes: 1 addition & 1 deletion src/Lidarr
Submodule Lidarr updated 596 files
5 changes: 3 additions & 2 deletions src/Lidarr.Plugin.Deemix/Download/Clients/Deemix/Deemix.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using FluentValidation.Results;
using NLog;
using NzbDrone.Common.Disk;
Expand Down Expand Up @@ -54,7 +55,7 @@ public override void RemoveItem(DownloadClientItem item, bool deleteData)
_proxy.RemoveFromQueue(item.DownloadId, Settings);
}

public override string Download(RemoteAlbum remoteAlbum, IIndexer indexer)
public override Task<string> Download(RemoteAlbum remoteAlbum, IIndexer indexer)
{
var release = remoteAlbum.Release;

Expand All @@ -73,7 +74,7 @@ public override string Download(RemoteAlbum remoteAlbum, IIndexer indexer)
bitrate = 1;
}

return _proxy.Download(release.DownloadUrl, bitrate, Settings);
return Task.FromResult(_proxy.Download(release.DownloadUrl, bitrate, Settings));
}

public override DownloadClientInfo GetStatus()
Expand Down

0 comments on commit a44ff64

Please sign in to comment.