Commit Graph

8 Commits

Author SHA1 Message Date
Nathan Holland 571c52a0f2 Feature/netcore preparation (#2072)
* Use platform detection that works on mono 4.6+

* Move to use package reference for restoring nuget packages.

* DateTimeRoutines does not have Nuget packages that support .NET Standard (and therefore .NET Core). We will have to include them for now until we can get rid of this dependency.

* Start spliting some interfaces into their own files - this will help by allowing us to split them out in the future into a seperate project so the actual implementations can stay within their respective architectures when required

* Move out common libraries

* Few more tidy up tasks to get things working with .NET Standard

* Restructure the solution layout

* Encoding work to reduce rework later on platforms without Windows codepages (or require compliance with RFC1345)

* Move folder structure around to have more natural layout of the solutions

* DI server configuration to get rid of "temporary" hack and dependency circle for serverservice

* Make all encoding consistent to match the expected encoding casing for earlier versions of mono.
2017-11-05 20:42:03 +11:00
Nathan Holland 8a6b9d4de7 Feature/netcore preparation (#2035)
* Move to use package reference for restoring nuget packages.

* Return a task result for this async method.

* Update to a supported version of the .NET Framework. This also has the side effect of allowing us to automatically generate our binding redirects on build.

* Set the solution to target VS2017

* Update test solution csproj file to support being built through MSBuild 15

* Move to use package reference for restoring nuget packages.

* Return a task result for this async method.

* Update to a supported version of the .NET Framework. This also has the side effect of allowing us to automatically generate our binding redirects on build.

* Set the solution to target VS2017

* Update test solution csproj file to support being built through MSBuild 15

* DateTimeRoutines does not have Nuget packages that support .NET Standard (and therefore .NET Core). We will have to include them for now until we can get rid of this dependency.

* Move the interfaces into their own files. This will be useful when we share them between the .NET Core and .NET Framework WebAPI

* Stage services that need to point to the new interface namespace.

* Update CurlSharp to fix memory leak issue and support better runtime compatibility with OSX and Linux

* Start spliting some interfaces into their own files - this will help by allowing us to split them out in the future into a seperate project so the actual implementations can stay within their respective architectures when required
2017-10-29 21:19:09 +11:00
kaso17 69aa38c1ff AggregateIndexer: set result limits to 1000 2017-08-17 09:50:10 +02:00
chibidev 720b5971d3 Feature/new api (#1584)
* Introducing API v2

There were multiple inconsistencies in the old API and I have been
toying with the idea to replace it. This will suck for everyone who was
building on top of the Jackett API, however as it was probably too
painful to do so I'd say no one really tried.

Now API v2.0 should be much more constistent as it uses DTObjects, and
instead of manually constructing a json response it is handled by the
ASP.NET web api. It is much more RESTful than it was, proper GET
endpoints are introduced, and updating resources are now done via POST -
it might be improved by introducing other type of REST methods.

I know this sucks as completely breaks backward compatibility, however
it'll probably make it easier to maintain and build on top of in the
long run.

* Use DELETE method to unconfigure an indexer

* Remove debugging format from NLog

* Fixing an null exception

* Properly implementing IExceptionFilter interface

* Enable adding public indexers without configuration

* Fix missing manual search results

* Basic modularization of the JS API

* Introduce API versioning

* Fix redirects to the dashboard

* Cleaning up a little bit

* Revamping Torznab and Potato as well

* Move preconditions to FilterAttributes and simplify logic

* Remove legacy filtering... will move to IResultFilter

* Minor adjustment on results interface

* Use Interpolated strings in ResultsController

* DTO-ify

* Remove fallback logic from potato results

* DTO everywhere!!!

* DTO-ify everything!

* I hope this is my last piece of modification to this PR

* Remove test variables...

* Left out a couple conflicts... It's late
2017-08-08 17:02:16 +02:00
chibidev 9e3076dde6 I have a feeling I'm breaking the world and bringing the apocalypse
It's quite hard to encapsulate something this large. This refactor
contains multiple attacks on the current architecture and is changing
things that were probably created quite a while back then. Luckily this
was done in increments so it mustn't be that impossible to recall what
has been done. I just need to relax my memory a little bit.

So the basic idea was quite simple. Let's distingush metas and normal
indexers a little bit more. Both of them were originating from
BaseIndexer, however very little of the functionality was actually
shared between them. Actually quite a few things made it even harder to
implement a different kind of indexer, especially for a newcomer for
both Jackett and C#.

Then in order to further reduce whatever was encapsulated in
any kind of, a couple things had to be changed. Like CardigannIndexer,
which probably had quite a mindshift change. IndexerManager and the
configuration management were also encapsulated and refactored, and now
I have a feeling that although the code could be improved, at least the
responsibilities of services and what they actually do is now clearer.

Anyhow, it would be safe to assume that I will not be able to go
step-by-step and define everything that has been changed. I'm sorry.
2017-07-11 21:53:46 +02:00
chibidev 345602926e Feature/cleaning up aggregate indexer fallback (#1507)
* Line endings...

* Refactoring how MetaIndexers handle fallbacks

Originally this modification was part of a much larger refactoring,
however for the sake of reviewability I split it into smaller chunks.
Sadly it is still quite large.
I wanted to split it even more, however after a certain point there was
really no value in creating smaller chunks. The biggest part of this
modification would be still huge.

So all in all, there're 3 aspects of this modification
- It modifies BaseIndexer so that it now implements IIndexer (will be
very useful later on)
- Resolving most of the warnings currently in Jackett (the only ones
remaining are related to Autofac, however if I could I would just burn
Autofac altogether rather than fix the warnings. Will open discussion on
this.)
- Biggest part: refactoring how MetaIndexers handle fallbacks and how
they provide the final result set

MetaIndexers now accept any kind of fallback and filtering mechanism
that implements the necessary interface, so that in the future IMDB
fallback and filtering won't be the only one. I know there are not a lot
of unit tests around Jackett at the moment, however this renders the
class much more unittestable as well.

* Autofac started complaining... I don't understand...
2017-06-28 07:31:38 +02:00
chibidev 3b4eceed87 Feature/improved aggregate results (#1432)
* Line endings...

* Add fallback query for meta indexers

In cases where multiple indexers are configured under one
metaindexer if any of them supports IMDB search the meta
will support IMDB search as well. However the actual query will
then only be performed by those supporting IMDB search, because
others refuse it (see CanHandleQuery implementation).
- This adds support of a fallback mechanism for other indexers
- Adds first implementation of result improvement (necessary for
  fallback queries as they might produce irrelevant results)
- Some minor fixes encountered while debugging/coding

Known issue:
- Configuring nCore and IsoHunt together will render results
  from nCore unusuable. Don't know why.
2017-06-03 15:04:51 +02:00
chibidev 27d4f2108e Feature/aggregate performance improvement (#1349)
* Checking capabilities before executing a query

* Introduce base class for meta indexers

* Build fix - I seriously do not know how I missed that

* Moving things to the appropriate place

* Simplifying things as much as possible and moving once again

* Build fix?
2017-05-14 18:55:36 +02:00