no message
This commit is contained in:
parent
db0880b843
commit
1b082c3cd1
1 changed files with 11 additions and 11 deletions
|
|
@ -28,7 +28,7 @@ public class Torrents
|
||||||
private readonly PremiumizeTorrentClient _premiumizeTorrentClient;
|
private readonly PremiumizeTorrentClient _premiumizeTorrentClient;
|
||||||
private readonly RealDebridTorrentClient _realDebridTorrentClient;
|
private readonly RealDebridTorrentClient _realDebridTorrentClient;
|
||||||
|
|
||||||
private ITorrentClient _torrentClient
|
private ITorrentClient TorrentClient
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
|
@ -125,7 +125,7 @@ public class Torrents
|
||||||
throw new Exception($"{ex.Message}, trying to parse {magnetLink}");
|
throw new Exception($"{ex.Message}, trying to parse {magnetLink}");
|
||||||
}
|
}
|
||||||
|
|
||||||
var id = await _torrentClient.AddMagnet(magnetLink);
|
var id = await TorrentClient.AddMagnet(magnetLink);
|
||||||
|
|
||||||
var hash = magnet.InfoHash.ToHex();
|
var hash = magnet.InfoHash.ToHex();
|
||||||
|
|
||||||
|
|
@ -151,7 +151,7 @@ public class Torrents
|
||||||
throw new Exception($"{ex.Message}, trying to parse {fileAsBase64}");
|
throw new Exception($"{ex.Message}, trying to parse {fileAsBase64}");
|
||||||
}
|
}
|
||||||
|
|
||||||
var id = await _torrentClient.AddFile(bytes);
|
var id = await TorrentClient.AddFile(bytes);
|
||||||
|
|
||||||
var hash = monoTorrent.InfoHash.ToHex();
|
var hash = monoTorrent.InfoHash.ToHex();
|
||||||
|
|
||||||
|
|
@ -164,7 +164,7 @@ public class Torrents
|
||||||
|
|
||||||
public async Task<IList<TorrentClientAvailableFile>> GetAvailableFiles(String hash)
|
public async Task<IList<TorrentClientAvailableFile>> GetAvailableFiles(String hash)
|
||||||
{
|
{
|
||||||
var result = await _torrentClient.GetAvailableFiles(hash);
|
var result = await TorrentClient.GetAvailableFiles(hash);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
@ -178,7 +178,7 @@ public class Torrents
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
await _torrentClient.SelectFiles(torrent);
|
await TorrentClient.SelectFiles(torrent);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task CreateDownloads(Guid torrentId)
|
public async Task CreateDownloads(Guid torrentId)
|
||||||
|
|
@ -190,7 +190,7 @@ public class Torrents
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var downloadLinks = await _torrentClient.GetDownloadLinks(torrent);
|
var downloadLinks = await TorrentClient.GetDownloadLinks(torrent);
|
||||||
|
|
||||||
if (downloadLinks == null)
|
if (downloadLinks == null)
|
||||||
{
|
{
|
||||||
|
|
@ -275,7 +275,7 @@ public class Torrents
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
await _torrentClient.Delete(torrent.RdId);
|
await TorrentClient.Delete(torrent.RdId);
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
|
|
@ -329,7 +329,7 @@ public class Torrents
|
||||||
|
|
||||||
Log($"Unrestricting link", download, download.Torrent);
|
Log($"Unrestricting link", download, download.Torrent);
|
||||||
|
|
||||||
var unrestrictedLink = await _torrentClient.Unrestrict(download.Path);
|
var unrestrictedLink = await TorrentClient.Unrestrict(download.Path);
|
||||||
|
|
||||||
await _downloads.UpdateUnrestrictedLink(downloadId, unrestrictedLink);
|
await _downloads.UpdateUnrestrictedLink(downloadId, unrestrictedLink);
|
||||||
|
|
||||||
|
|
@ -338,7 +338,7 @@ public class Torrents
|
||||||
|
|
||||||
public async Task<Profile> GetProfile()
|
public async Task<Profile> GetProfile()
|
||||||
{
|
{
|
||||||
var user = await _torrentClient.GetUser();
|
var user = await TorrentClient.GetUser();
|
||||||
|
|
||||||
var profile = new Profile
|
var profile = new Profile
|
||||||
{
|
{
|
||||||
|
|
@ -360,7 +360,7 @@ public class Torrents
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var rdTorrents = await _torrentClient.GetTorrents();
|
var rdTorrents = await TorrentClient.GetTorrents();
|
||||||
|
|
||||||
foreach (var rdTorrent in rdTorrents)
|
foreach (var rdTorrent in rdTorrents)
|
||||||
{
|
{
|
||||||
|
|
@ -739,7 +739,7 @@ public class Torrents
|
||||||
ReferenceHandler = ReferenceHandler.IgnoreCycles
|
ReferenceHandler = ReferenceHandler.IgnoreCycles
|
||||||
});
|
});
|
||||||
|
|
||||||
await _torrentClient.UpdateData(torrent, torrentClientTorrent);
|
await TorrentClient.UpdateData(torrent, torrentClientTorrent);
|
||||||
|
|
||||||
var newTorrent = JsonSerializer.Serialize(torrent,
|
var newTorrent = JsonSerializer.Serialize(torrent,
|
||||||
new JsonSerializerOptions
|
new JsonSerializerOptions
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue