Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cfeee62f6b | ||
|
|
c6d4c06d70 | ||
|
|
08639a3254 | ||
|
|
d430850749 | ||
|
|
82c0ea459b |
@@ -12,8 +12,11 @@ enabled=false
|
|||||||
program=
|
program=
|
||||||
|
|
||||||
[BitTorrent]
|
[BitTorrent]
|
||||||
|
Session\AnonymousModeEnabled=true
|
||||||
|
Session\BTProtocol=TCP
|
||||||
Session\DefaultSavePath=/downloads/
|
Session\DefaultSavePath=/downloads/
|
||||||
Session\ExcludedFileNames=
|
Session\ExcludedFileNames=
|
||||||
|
Session\MaxActiveCheckingTorrents=5
|
||||||
Session\MaxActiveDownloads=10
|
Session\MaxActiveDownloads=10
|
||||||
Session\MaxActiveTorrents=50
|
Session\MaxActiveTorrents=50
|
||||||
Session\MaxActiveUploads=50
|
Session\MaxActiveUploads=50
|
||||||
@@ -50,9 +53,10 @@ MailNotification\req_auth=true
|
|||||||
WebUI\Address=*
|
WebUI\Address=*
|
||||||
WebUI\AuthSubnetWhitelist=0.0.0.0/0
|
WebUI\AuthSubnetWhitelist=0.0.0.0/0
|
||||||
WebUI\AuthSubnetWhitelistEnabled=true
|
WebUI\AuthSubnetWhitelistEnabled=true
|
||||||
|
WebUI\HostHeaderValidation=false
|
||||||
WebUI\LocalHostAuth=false
|
WebUI\LocalHostAuth=false
|
||||||
WebUI\ServerDomains=*
|
WebUI\ServerDomains=*
|
||||||
|
|
||||||
[RSS]
|
[RSS]
|
||||||
AutoDownloader\DownloadRepacks=true
|
AutoDownloader\DownloadRepacks=true
|
||||||
AutoDownloader\SmartEpisodeFilter=s(\\d+)e(\\d+), (\\d+)x(\\d+), "(\\d{4}[.\\-]\\d{1,2}[.\\-]\\d{1,2})", "(\\d{1,2}[.\\-]\\d{1,2}[.\\-]\\d{4})"
|
AutoDownloader\SmartEpisodeFilter=s(\\d+)e(\\d+), (\\d+)x(\\d+), "(\\d{4}[.\\-]\\d{1,2}[.\\-]\\d{1,2})", "(\\d{1,2}[.\\-]\\d{1,2}[.\\-]\\d{4})"
|
||||||
@@ -94,7 +94,7 @@ services:
|
|||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
env_file: stack.env
|
env_file: stack.env
|
||||||
hostname: knightcrawler-addon
|
hostname: knightcrawler-addon
|
||||||
image: gabisonfire/knightcrawler-addon:2.0.10
|
image: gabisonfire/knightcrawler-addon:2.0.14
|
||||||
labels:
|
labels:
|
||||||
logging: promtail
|
logging: promtail
|
||||||
networks:
|
networks:
|
||||||
@@ -117,7 +117,7 @@ services:
|
|||||||
redis:
|
redis:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
env_file: stack.env
|
env_file: stack.env
|
||||||
image: gabisonfire/knightcrawler-consumer:2.0.10
|
image: gabisonfire/knightcrawler-consumer:2.0.14
|
||||||
labels:
|
labels:
|
||||||
logging: promtail
|
logging: promtail
|
||||||
networks:
|
networks:
|
||||||
@@ -138,7 +138,7 @@ services:
|
|||||||
redis:
|
redis:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
env_file: stack.env
|
env_file: stack.env
|
||||||
image: gabisonfire/knightcrawler-debrid-collector:2.0.10
|
image: gabisonfire/knightcrawler-debrid-collector:2.0.14
|
||||||
labels:
|
labels:
|
||||||
logging: promtail
|
logging: promtail
|
||||||
networks:
|
networks:
|
||||||
@@ -152,7 +152,7 @@ services:
|
|||||||
migrator:
|
migrator:
|
||||||
condition: service_completed_successfully
|
condition: service_completed_successfully
|
||||||
env_file: stack.env
|
env_file: stack.env
|
||||||
image: gabisonfire/knightcrawler-metadata:2.0.10
|
image: gabisonfire/knightcrawler-metadata:2.0.14
|
||||||
networks:
|
networks:
|
||||||
- knightcrawler-network
|
- knightcrawler-network
|
||||||
restart: "no"
|
restart: "no"
|
||||||
@@ -163,7 +163,7 @@ services:
|
|||||||
postgres:
|
postgres:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
env_file: stack.env
|
env_file: stack.env
|
||||||
image: gabisonfire/knightcrawler-migrator:2.0.10
|
image: gabisonfire/knightcrawler-migrator:2.0.14
|
||||||
networks:
|
networks:
|
||||||
- knightcrawler-network
|
- knightcrawler-network
|
||||||
restart: "no"
|
restart: "no"
|
||||||
@@ -182,7 +182,7 @@ services:
|
|||||||
redis:
|
redis:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
env_file: stack.env
|
env_file: stack.env
|
||||||
image: gabisonfire/knightcrawler-producer:2.0.10
|
image: gabisonfire/knightcrawler-producer:2.0.14
|
||||||
labels:
|
labels:
|
||||||
logging: promtail
|
logging: promtail
|
||||||
networks:
|
networks:
|
||||||
@@ -207,7 +207,7 @@ services:
|
|||||||
deploy:
|
deploy:
|
||||||
replicas: ${QBIT_REPLICAS:-0}
|
replicas: ${QBIT_REPLICAS:-0}
|
||||||
env_file: stack.env
|
env_file: stack.env
|
||||||
image: gabisonfire/knightcrawler-qbit-collector:2.0.10
|
image: gabisonfire/knightcrawler-qbit-collector:2.0.14
|
||||||
labels:
|
labels:
|
||||||
logging: promtail
|
logging: promtail
|
||||||
networks:
|
networks:
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ x-depends: &knightcrawler-app-depends
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
metadata:
|
metadata:
|
||||||
image: gabisonfire/knightcrawler-metadata:2.0.10
|
image: gabisonfire/knightcrawler-metadata:2.0.14
|
||||||
env_file: ../../.env
|
env_file: ../../.env
|
||||||
networks:
|
networks:
|
||||||
- knightcrawler-network
|
- knightcrawler-network
|
||||||
@@ -30,7 +30,7 @@ services:
|
|||||||
condition: service_completed_successfully
|
condition: service_completed_successfully
|
||||||
|
|
||||||
migrator:
|
migrator:
|
||||||
image: gabisonfire/knightcrawler-migrator:2.0.10
|
image: gabisonfire/knightcrawler-migrator:2.0.14
|
||||||
env_file: ../../.env
|
env_file: ../../.env
|
||||||
networks:
|
networks:
|
||||||
- knightcrawler-network
|
- knightcrawler-network
|
||||||
@@ -40,7 +40,7 @@ services:
|
|||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|
||||||
addon:
|
addon:
|
||||||
image: gabisonfire/knightcrawler-addon:2.0.10
|
image: gabisonfire/knightcrawler-addon:2.0.14
|
||||||
<<: [*knightcrawler-app, *knightcrawler-app-depends]
|
<<: [*knightcrawler-app, *knightcrawler-app-depends]
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
hostname: knightcrawler-addon
|
hostname: knightcrawler-addon
|
||||||
@@ -48,22 +48,22 @@ services:
|
|||||||
- "7000:7000"
|
- "7000:7000"
|
||||||
|
|
||||||
consumer:
|
consumer:
|
||||||
image: gabisonfire/knightcrawler-consumer:2.0.10
|
image: gabisonfire/knightcrawler-consumer:2.0.14
|
||||||
<<: [*knightcrawler-app, *knightcrawler-app-depends]
|
<<: [*knightcrawler-app, *knightcrawler-app-depends]
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
debridcollector:
|
debridcollector:
|
||||||
image: gabisonfire/knightcrawler-debrid-collector:2.0.10
|
image: gabisonfire/knightcrawler-debrid-collector:2.0.14
|
||||||
<<: [*knightcrawler-app, *knightcrawler-app-depends]
|
<<: [*knightcrawler-app, *knightcrawler-app-depends]
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
producer:
|
producer:
|
||||||
image: gabisonfire/knightcrawler-producer:2.0.10
|
image: gabisonfire/knightcrawler-producer:2.0.14
|
||||||
<<: [*knightcrawler-app, *knightcrawler-app-depends]
|
<<: [*knightcrawler-app, *knightcrawler-app-depends]
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
qbitcollector:
|
qbitcollector:
|
||||||
image: gabisonfire/knightcrawler-qbit-collector:2.0.10
|
image: gabisonfire/knightcrawler-qbit-collector:2.0.14
|
||||||
<<: [*knightcrawler-app, *knightcrawler-app-depends]
|
<<: [*knightcrawler-app, *knightcrawler-app-depends]
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
namespace DebridCollector.Features.Worker;
|
namespace DebridCollector.Features.Worker;
|
||||||
|
|
||||||
[EntityName("perform-metadata-request")]
|
[EntityName("perform-metadata-request-debrid-collector")]
|
||||||
public record PerformMetadataRequest(Guid CorrelationId, string InfoHash) : CorrelatedBy<Guid>;
|
public record PerformMetadataRequest(Guid CorrelationId, string InfoHash) : CorrelatedBy<Guid>;
|
||||||
|
|
||||||
[EntityName("torrent-metadata-response")]
|
[EntityName("torrent-metadata-response-debrid-collector")]
|
||||||
public record GotMetadata(TorrentMetadataResponse Metadata) : CorrelatedBy<Guid>
|
public record GotMetadata(TorrentMetadataResponse Metadata) : CorrelatedBy<Guid>
|
||||||
{
|
{
|
||||||
public Guid CorrelationId { get; init; } = Metadata.CorrelationId;
|
public Guid CorrelationId { get; init; } = Metadata.CorrelationId;
|
||||||
}
|
}
|
||||||
|
|
||||||
[EntityName("write-metadata")]
|
[EntityName("write-metadata-debrid-collector")]
|
||||||
public record WriteMetadata(Torrent Torrent, TorrentMetadataResponse Metadata, string ImdbId) : CorrelatedBy<Guid>
|
public record WriteMetadata(Torrent Torrent, TorrentMetadataResponse Metadata, string ImdbId) : CorrelatedBy<Guid>
|
||||||
{
|
{
|
||||||
public Guid CorrelationId { get; init; } = Metadata.CorrelationId;
|
public Guid CorrelationId { get; init; } = Metadata.CorrelationId;
|
||||||
}
|
}
|
||||||
|
|
||||||
[EntityName("metadata-written")]
|
[EntityName("metadata-written-debrid-colloctor")]
|
||||||
public record MetadataWritten(TorrentMetadataResponse Metadata) : CorrelatedBy<Guid>
|
public record MetadataWritten(TorrentMetadataResponse Metadata) : CorrelatedBy<Guid>
|
||||||
{
|
{
|
||||||
public Guid CorrelationId { get; init; } = Metadata.CorrelationId;
|
public Guid CorrelationId { get; init; } = Metadata.CorrelationId;
|
||||||
|
|||||||
19
src/migrator/migrations/012_imdb_change_ratio.sql
Normal file
19
src/migrator/migrations/012_imdb_change_ratio.sql
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
-- Remove the old search function
|
||||||
|
DROP FUNCTION IF EXISTS search_imdb_meta(TEXT, TEXT, INT, INT);
|
||||||
|
|
||||||
|
-- Add the new search function that allows for searching by year with a plus/minus one year range
|
||||||
|
CREATE OR REPLACE FUNCTION search_imdb_meta(search_term TEXT, category_param TEXT DEFAULT NULL, year_param INT DEFAULT NULL, limit_param INT DEFAULT 10, similarity_threshold REAL DEFAULT 0.95)
|
||||||
|
RETURNS TABLE(imdb_id character varying(16), title character varying(1000),category character varying(50),year INT, score REAL) AS $$
|
||||||
|
BEGIN
|
||||||
|
SET pg_trgm.similarity_threshold = similarity_threshold;
|
||||||
|
RETURN QUERY
|
||||||
|
SELECT imdb_metadata.imdb_id, imdb_metadata.title, imdb_metadata.category, imdb_metadata.year, similarity(imdb_metadata.title, search_term) as score
|
||||||
|
FROM imdb_metadata
|
||||||
|
WHERE (imdb_metadata.title % search_term)
|
||||||
|
AND (imdb_metadata.adult = FALSE)
|
||||||
|
AND (category_param IS NULL OR imdb_metadata.category = category_param)
|
||||||
|
AND (year_param IS NULL OR imdb_metadata.year BETWEEN year_param - 1 AND year_param + 1)
|
||||||
|
ORDER BY score DESC
|
||||||
|
LIMIT limit_param;
|
||||||
|
END; $$
|
||||||
|
LANGUAGE plpgsql;
|
||||||
@@ -148,13 +148,10 @@ public partial class DebridMediaManagerCrawler(
|
|||||||
InfoHash = hashElement.ToString(),
|
InfoHash = hashElement.ToString(),
|
||||||
Seeders = 0,
|
Seeders = 0,
|
||||||
Leechers = 0,
|
Leechers = 0,
|
||||||
Category = parsedTorrent.Response.IsMovie switch
|
Category = AssignCategory(result),
|
||||||
{
|
|
||||||
true => "movies",
|
|
||||||
false => "tv",
|
|
||||||
},
|
|
||||||
RtnResponse = parsedTorrent.Response.ToJson(),
|
RtnResponse = parsedTorrent.Response.ToJson(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
private Task AddToCache(string lowerCaseTitle, ImdbEntry best)
|
private Task AddToCache(string lowerCaseTitle, ImdbEntry best)
|
||||||
{
|
{
|
||||||
@@ -208,4 +205,18 @@ public partial class DebridMediaManagerCrawler(
|
|||||||
|
|
||||||
return (pageIngested, name);
|
return (pageIngested, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static string AssignCategory(ImdbEntry entry) =>
|
||||||
|
entry.Category switch
|
||||||
|
{
|
||||||
|
"movie" => "movies",
|
||||||
|
"tvMovie" => "movies",
|
||||||
|
"tvSeries" => "tv",
|
||||||
|
"tvEpisode" => "tv",
|
||||||
|
"tvSpecial" => "tv",
|
||||||
|
"tvMiniSeries" => "tv",
|
||||||
|
"tv" => "tv",
|
||||||
|
"short" => "tv",
|
||||||
|
_ => "unknown",
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,22 +1,24 @@
|
|||||||
namespace QBitCollector.Features.Worker;
|
namespace QBitCollector.Features.Worker;
|
||||||
|
|
||||||
[EntityName("perform-metadata-request")]
|
[EntityName("perform-metadata-request-qbit-collector")]
|
||||||
public record PerformQbitMetadataRequest(Guid CorrelationId, string InfoHash) : CorrelatedBy<Guid>;
|
public record PerformQbitMetadataRequest(Guid CorrelationId, string InfoHash) : CorrelatedBy<Guid>;
|
||||||
|
|
||||||
[EntityName("torrent-metadata-response")]
|
[EntityName("torrent-metadata-response-qbit-collector")]
|
||||||
public record GotQbitMetadata(QBitMetadataResponse Metadata) : CorrelatedBy<Guid>
|
public record GotQbitMetadata(QBitMetadataResponse Metadata) : CorrelatedBy<Guid>
|
||||||
{
|
{
|
||||||
public Guid CorrelationId { get; init; } = Metadata.CorrelationId;
|
public Guid CorrelationId { get; init; } = Metadata.CorrelationId;
|
||||||
}
|
}
|
||||||
|
|
||||||
[EntityName("write-metadata")]
|
[EntityName("write-metadata-qbit-collector")]
|
||||||
public record WriteQbitMetadata(Torrent Torrent, QBitMetadataResponse Metadata, string ImdbId) : CorrelatedBy<Guid>
|
public record WriteQbitMetadata(Torrent Torrent, QBitMetadataResponse Metadata, string ImdbId) : CorrelatedBy<Guid>
|
||||||
{
|
{
|
||||||
public Guid CorrelationId { get; init; } = Metadata.CorrelationId;
|
public Guid CorrelationId { get; init; } = Metadata.CorrelationId;
|
||||||
}
|
}
|
||||||
|
|
||||||
[EntityName("metadata-written")]
|
[EntityName("metadata-written-qbit-collector")]
|
||||||
public record QbitMetadataWritten(QBitMetadataResponse Metadata) : CorrelatedBy<Guid>
|
public record QbitMetadataWritten(QBitMetadataResponse Metadata) : CorrelatedBy<Guid>
|
||||||
{
|
{
|
||||||
public Guid CorrelationId { get; init; } = Metadata.CorrelationId;
|
public Guid CorrelationId { get; init; } = Metadata.CorrelationId;
|
||||||
|
|
||||||
|
public QBitMetadataResponse Metadata { get; init; } = Metadata;
|
||||||
}
|
}
|
||||||
@@ -77,7 +77,7 @@ public class RtnResponse
|
|||||||
[JsonPropertyName("extended")]
|
[JsonPropertyName("extended")]
|
||||||
public bool Extended { get; set; }
|
public bool Extended { get; set; }
|
||||||
|
|
||||||
public bool IsMovie => Season == null && Episode == null;
|
public bool IsMovie => (Season == null && Episode == null) || (Season?.Count == 0 && Episode?.Count == 0);
|
||||||
|
|
||||||
public string ToJson() => this.AsJson();
|
public string ToJson() => this.AsJson();
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user