mirror of
https://github.com/nimbold/Firelink.git
synced 2026-08-12 04:26:57 +00:00
feat(torrents): support remote torrent metadata
This commit is contained in:
@@ -12,6 +12,7 @@ import {
|
||||
mediaTypeForFormat,
|
||||
metadataSummaryMessage,
|
||||
isYouTubePlaylistUrl,
|
||||
isRemoteTorrentUrl,
|
||||
playlistFilePrefix,
|
||||
reconcileDownloadRows,
|
||||
refreshFailedMetadataRows,
|
||||
@@ -106,6 +107,19 @@ describe('add download metadata workflow', () => {
|
||||
expect(rows[1].torrentCacheId).toBe(`${rows[1].id}-1`);
|
||||
});
|
||||
|
||||
it('admits remote .torrent URLs through the Torrent metadata path', () => {
|
||||
expect(isRemoteTorrentUrl('https://example.com/files/sample.torrent?download=1')).toBe(true);
|
||||
expect(isRemoteTorrentUrl('https://example.com/files/sample.zip')).toBe(false);
|
||||
|
||||
const rows = reconcileDownloadRows('https://example.com/files/sample.torrent?download=1', []);
|
||||
|
||||
expect(rows[0]).toMatchObject({
|
||||
isTorrent: true,
|
||||
isMedia: false,
|
||||
status: 'loading'
|
||||
});
|
||||
});
|
||||
|
||||
it('gives refreshed torrent metadata a new cache identity', () => {
|
||||
const existing = row({
|
||||
id: 'torrent-row',
|
||||
|
||||
Reference in New Issue
Block a user