Add code style guide and update documentation to reflect changes (#7045)

This commit is contained in:
Cory 2020-02-06 00:39:44 -06:00 committed by GitHub
parent 43ddc7a854
commit 4d05ab3fbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 589 additions and 57 deletions

295
.editorconfig Normal file
View File

@ -0,0 +1,295 @@
root=true
# To learn more about .editorconfig see https://aka.ms/editorconfigdocs
# With more recent updates Visual Studio 2017 supports EditorConfig files out of the box
# Visual Studio Code needs an extension: https://github.com/editorconfig/editorconfig-vscode
# For emacs, vim, np++ and other editors, see here: https://github.com/editorconfig
###############################
# Core EditorConfig Options #
###############################
# All files
[*]
indent_style=space
insert_final_newline=true
charset=utf-8
end_of_line=lf
trim_trailing_whitespace=true
# Microsoft .NET properties
csharp_new_line_before_members_in_object_initializers=true
csharp_space_after_cast=false
csharp_style_var_elsewhere=true:suggestion
csharp_style_var_for_built_in_types=true:suggestion
csharp_style_var_when_type_is_apparent=true:suggestion
dotnet_style_parentheses_in_arithmetic_binary_operators=never_if_unnecessary:none
dotnet_style_parentheses_in_other_binary_operators=never_if_unnecessary:none
dotnet_style_parentheses_in_relational_binary_operators=never_if_unnecessary:none
# ReSharper properties
resharper_align_linq_query=true
resharper_align_multiline_argument=true
resharper_align_multiline_calls_chain=true
resharper_align_multiline_extends_list=true
resharper_align_multiline_for_stmt=true
resharper_align_tuple_components=true
resharper_csharp_alignment_tab_fill_style=optimal_fill
resharper_csharp_align_multiline_parameter=true
resharper_csharp_align_multiple_declaration=true
resharper_csharp_indent_pars=outside
resharper_csharp_keep_blank_lines_in_code=0
resharper_csharp_keep_blank_lines_in_declarations=1
resharper_csharp_max_line_length=125
resharper_csharp_stick_comment=false
resharper_csharp_wrap_after_invocation_lpar=true
resharper_force_attribute_style=join
resharper_indent_invocation_pars=outside
resharper_indent_method_decl_pars=outside
resharper_indent_preprocessor_region=no_indent
resharper_indent_statement_pars=outside
resharper_indent_typearg_angles=outside
resharper_indent_typeparam_angles=outside
resharper_keep_existing_embedded_arrangement=false
resharper_keep_existing_expr_member_arrangement=false
resharper_keep_existing_invocation_parens_arrangement=false
resharper_keep_existing_linebreaks=false
resharper_keep_existing_switch_expression_arrangement=false
resharper_place_attribute_on_same_line=false
resharper_place_expr_accessor_on_single_line=true
resharper_place_expr_method_on_single_line=true
resharper_place_expr_property_on_single_line=true
resharper_place_simple_embedded_statement_on_same_line=false
resharper_space_within_empty_braces=false
resharper_wrap_array_initializer_style=chop_always
resharper_wrap_before_extends_colon=true
resharper_wrap_before_type_parameter_langle=true
resharper_wrap_multiple_type_parameter_constraints_style=wrap_if_long
resharper_wrap_object_and_collection_initializer_style=chop_always
# ReSharper inspection severities
resharper_arrange_attributes_highlighting=suggestion
resharper_arrange_redundant_parentheses_highlighting=suggestion
resharper_enforce_if_statement_braces_highlighting=suggestion
# Xml project files
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
indent_size=2
# JavaScript/HTML
[*.{js,ts,json,html,cshtml}]
indent_size=2
# Code files
[*.{cs,csx,vb,vbx}]
indent_size=4
###############################
# .NET Coding Conventions #
###############################
[*.{cs,vb}]
# Organize usings
dotnet_sort_system_directives_first=true
# this. preferences
dotnet_style_qualification_for_field=false:suggestion
dotnet_style_qualification_for_property=false:suggestion
dotnet_style_qualification_for_method=false:suggestion
dotnet_style_qualification_for_event=false:suggestion
# Language keywords vs BCL types preferences
dotnet_style_predefined_type_for_locals_parameters_members=true:warning
dotnet_style_predefined_type_for_member_access=true:suggestion
# Parentheses preferences
dotnet_style_parentheses_in_arithmetic_binary_operators=always_for_clarity:silent
dotnet_style_parentheses_in_relational_binary_operators=always_for_clarity:silent
dotnet_style_parentheses_in_other_binary_operators=always_for_clarity:silent
dotnet_style_parentheses_in_other_operators=never_if_unnecessary:silent
# Modifier preferences
dotnet_style_require_accessibility_modifiers=for_non_interface_members:silent
dotnet_style_readonly_field=true:suggestion
# Expression-level preferences
dotnet_style_object_initializer=true:warning
dotnet_style_collection_initializer=true:warning
dotnet_style_explicit_tuple_names=true:suggestion
dotnet_style_null_propagation=true:suggestion
dotnet_style_coalesce_expression=true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method=true:suggestion
dotnet_style_prefer_inferred_tuple_names=true:suggestion
dotnet_style_prefer_inferred_anonymous_type_member_names=true:suggestion
dotnet_style_prefer_auto_properties=true:suggestion
dotnet_style_prefer_conditional_expression_over_assignment=true:suggestion
dotnet_style_prefer_conditional_expression_over_return=true:suggestion
dotnet_style_prefer_compound_assignment=true:suggestion
###############################
# Naming Conventions #
###############################
# Style Definitions
dotnet_naming_style.pascal_case_style.capitalization=pascal_case
# Use PascalCase for constant fields
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity=warning
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols=constant_fields
dotnet_naming_rule.constant_fields_should_be_pascal_case.style=pascal_case_style
dotnet_naming_symbols.constant_fields.applicable_kinds=field
dotnet_naming_symbols.constant_fields.applicable_accessibilities=*
dotnet_naming_symbols.constant_fields.required_modifiers=const
# Naming rules
dotnet_naming_rule.interface_should_be_begins_with_i.severity = warning
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
dotnet_naming_rule.types_should_be_pascal_case.severity = warning
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = warning
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
dotnet_naming_rule.private_or_internal_static_field_should_be_private_or_internal_static_with_prefix.severity = warning
dotnet_naming_rule.private_or_internal_static_field_should_be_private_or_internal_static_with_prefix.symbols = private_or_internal_static_field
dotnet_naming_rule.private_or_internal_static_field_should_be_private_or_internal_static_with_prefix.style = private_or_internal_static_with_prefix
dotnet_naming_rule.private_or_internal_field_should_be_private_prefix.severity = warning
dotnet_naming_rule.private_or_internal_field_should_be_private_prefix.symbols = private_or_internal_field
dotnet_naming_rule.private_or_internal_field_should_be_private_prefix.style = private_prefix
dotnet_naming_rule.asyncmethods_should_be_ends_with_async.severity = warning
dotnet_naming_rule.asyncmethods_should_be_ends_with_async.symbols = asyncmethods
dotnet_naming_rule.asyncmethods_should_be_ends_with_async.style = ends_with_async
# Symbol specifications
dotnet_naming_symbols.interface.applicable_kinds = interface
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.interface.required_modifiers =
dotnet_naming_symbols.private_or_internal_field.applicable_kinds = field
dotnet_naming_symbols.private_or_internal_field.applicable_accessibilities = internal, private, private_protected
dotnet_naming_symbols.private_or_internal_field.required_modifiers =
dotnet_naming_symbols.private_or_internal_static_field.applicable_kinds = field
dotnet_naming_symbols.private_or_internal_static_field.applicable_accessibilities = internal, private, private_protected
dotnet_naming_symbols.private_or_internal_static_field.required_modifiers = static
dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.types.required_modifiers =
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.non_field_members.required_modifiers =
dotnet_naming_symbols.asyncmethods.applicable_kinds = delegate, method, local_function
dotnet_naming_symbols.asyncmethods.applicable_accessibilities = *
dotnet_naming_symbols.asyncmethods.required_modifiers = async
# Naming styles
dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.capitalization = pascal_case
dotnet_naming_style.begins_with_i.required_prefix = I
dotnet_naming_style.begins_with_i.required_suffix =
dotnet_naming_style.begins_with_i.word_separator =
dotnet_naming_style.begins_with_i.capitalization = pascal_case
dotnet_naming_style.private_or_internal_static_with_prefix.required_prefix = s_
dotnet_naming_style.private_or_internal_static_with_prefix.required_suffix =
dotnet_naming_style.private_or_internal_static_with_prefix.word_separator =
dotnet_naming_style.private_or_internal_static_with_prefix.capitalization = pascal_case
dotnet_naming_style.private_prefix.required_prefix = _
dotnet_naming_style.private_prefix.required_suffix =
dotnet_naming_style.private_prefix.word_separator =
dotnet_naming_style.private_prefix.capitalization = camel_case
dotnet_naming_style.ends_with_async.required_prefix =
dotnet_naming_style.ends_with_async.required_suffix = Async
dotnet_naming_style.ends_with_async.word_separator =
dotnet_naming_style.ends_with_async.capitalization = pascal_case
###############################
# C# Coding Conventions #
###############################
[*.cs]
# var preferences
csharp_style_var_for_built_in_types=true:suggestion
csharp_style_var_when_type_is_apparent=true:suggestion
csharp_style_var_elsewhere=true:suggestion
# Expression-bodied members
csharp_style_expression_bodied_methods=when_on_single_line:suggestion
csharp_style_expression_bodied_constructors=when_on_single_line:suggestion
csharp_style_expression_bodied_operators=when_on_single_line:suggestion
csharp_style_expression_bodied_properties=true:suggestion
csharp_style_expression_bodied_indexers=true:suggestion
csharp_style_expression_bodied_accessors=true:suggestion
csharp_style_expression_bodied_lambdas=true:suggestion
csharp_style_expression_bodied_local_functions=true:suggestion
# Pattern matching preferences
csharp_style_pattern_matching_over_is_with_cast_check=true:suggestion
csharp_style_pattern_matching_over_as_with_null_check=true:suggestion
# Null-checking preferences
csharp_style_throw_expression=true:warning
csharp_style_conditional_delegate_call=true:warning
# Modifier preferences
csharp_preferred_modifier_order=public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion
# Expression-level preferences
csharp_prefer_braces=false:suggestion
csharp_style_deconstructed_variable_declaration=true:suggestion
csharp_prefer_simple_default_expression=true:warning
csharp_style_pattern_local_over_anonymous_function=true:suggestion
csharp_style_inlined_variable_declaration=true:suggestion
# Prefer C# 8.0 Indexing Features
csharp_style_prefer_index_operator=true:suggestion
csharp_style_prefer_range_operator=true:suggestion
csharp_style_deconstructed_variable_declaration=true:suggestion
csharp_style_pattern_local_over_anonymous_function=true:suggestion
csharp_using_directive_placement=outside_namespace:suggestion
csharp_prefer_static_local_function=true:suggestion
csharp_prefer_simple_using_statement=true:suggestion
csharp_style_prefer_switch_expression=true:suggestion
###############################
# C# Formatting Rules #
###############################
# New line preferences
csharp_new_line_before_open_brace=all
csharp_new_line_before_else=true
csharp_new_line_before_catch=true
csharp_new_line_before_finally=true
csharp_new_line_before_members_in_object_initializers=true
csharp_new_line_before_members_in_anonymous_types=true
csharp_new_line_between_query_expression_clauses=true
# Indentation preferences
csharp_indent_case_contents=true
csharp_indent_switch_labels=true
csharp_indent_labels=flush_left
csharp_indent_block_contents=true
csharp_indent_braces=false
csharp_indent_case_contents_when_block=true
# Space preferences
csharp_space_after_cast=false
csharp_space_after_keywords_in_control_flow_statements=true
csharp_space_between_method_call_parameter_list_parentheses=false
csharp_space_between_method_declaration_parameter_list_parentheses=false
csharp_space_between_parentheses=false
csharp_space_before_colon_in_inheritance_clause=true
csharp_space_after_colon_in_inheritance_clause=true
csharp_space_around_binary_operators=before_and_after
csharp_space_between_method_declaration_empty_parameter_list_parentheses=false
csharp_space_between_method_call_name_and_opening_parenthesis=false
csharp_space_between_method_call_empty_parameter_list_parentheses=false
# Wrapping preferences
csharp_preserve_single_line_statements=false
csharp_preserve_single_line_blocks=true
###############################
# VB Coding Conventions #
###############################
[*.vb]
# Modifier preferences
visual_basic_preferred_modifier_order=Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async:suggestion

View File

@ -1,13 +1,31 @@
**Please use the search bar** at the top of the page and make sure you are not creating an already submitted issue. Duplicating issues makes it more difficult for everyone to follow. Your issue may have already been solved in the past as well.
**Please use the search bar** at the top of the page and make sure you are not creating an already submitted issue.
Check closed issues as well, because your issue may have already been fixed.
Provide a description of the feature request or bug, the more details the better.
Please read our [Contributing Guidelines](https://github.com/Jackett/Jackett/blob/master/CONTRIBUTING.md) before submitting your issue to ensure a prompt response to your bug.
If you are experiencing an issue with a tracker, then:
1. Use your browser to check you can access the site directly, and if a login is required, check you can login and that you do not have any outstanding account issues.
2. If you haven't already, try upgrading to the latest version of Jackett, your issue may have already been resolved.
3. If it is still not working for you, then a **full enhanced log must be included**. Instructions for obtaining logs are here: https://github.com/Jackett/Jackett#troubleshooting
### Environment
(At the bottom of your Jackett Dashboard page) **Jackett version**:
(if you installed using Jackett.Binaries.Mono.tar.gz) **Mono version**:
**OS**:
-------------------------------
**.Net Runtime**: [Mono/.Net-Core/.Net-Framework]
**.Net Version**:
**Jackett Version**:
**Last Working Jackett Version**:
### Description
[List steps to reproduce the error and details on what happens and what you expected to happen]
### Logged Error Messages
[Place any relevant error messages you noticed from the logs here.]
[Make sure you attach the full logs with your personal information removed in case we need more information]
### Screenshots
[Place any screenshots of the issue here if needed]

200
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,200 @@
# Contributing to Jackett
So, you've decided you want to help make Jackett a better program for everyone. Not everyone chooses to help, so we thank you for your decision.
In order to help us make the most of your contribution please take the time to read these contributing guidelines.
These are just guidelines, not hard rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
## Ways you can help
- [Getting Started](#getting-started)
- [Troubleshooting](#troubleshooting)
- [Reporting a bug](#reporting-a-bug)
- [Adding a new tracker](#adding-a-new-tracker)
- [Contributing Code](#contributing-code)
- [Setting up your environment](#setting-up-your-environment)
- [Coding style](#coding-style)
- [Getting your code accepted & pull requests](#pull-requests)
# Getting Started
Now that you've decided you want to help us make Jackett a better program the big question is: Where do you start?
Why right here of course. You can help in several ways, from finding and reporting bugs, to adding new trackers,
to fixing bugs in the program code itself. Below, we outline the steps needed to file your first bug report.
## Troubleshooting
Before you submit a bug report, it's important to make sure it's not already a known issue,
and to make sure it's a bug we can find and fix quickly.
These troubleshooting tips will help make sure your bug report is high quality and can be fixed quickly.
**Update your Jackett to the latest version**
Before you submit a bug-report or do any other troubleshooting, make sure your Jackett is the latest release version.
We are releasing bug fixes almost daily, so your issue may have been fixed already.
Bugs that are submitted without being on the latest version may be closed.
**Error "An error occurred while sending the request: Error: TrustFailure (A call to SSPI failed, see inner exception.)"**
This is often caused by missing CA certificates.
Try reimporting the certificates in this case:
- On Linux (as user root): `wget -O - https://curl.haxx.se/ca/cacert.pem | cert-sync /dev/stdin`
- On macOS: `curl -sS https://curl.haxx.se/ca/cacert.pem | cert-sync --user /dev/stdin`
**Tracker isn't working**
If you are experiencing an issue with a tracker, then:
- Use your browser to check you can access the site directly, and if a login is required,
check you can login and that you do not have any outstanding account issues.
- If you haven't already, try upgrading to the latest version of Jackett.
- If it is still not working for you, then a **full enhanced log must be included**.
**Enable enhanced logging**
- You can get *enhanced* logging with the command line switches `-t -l` or by enabling `Enhanced logging` via the web interface
(followed by clicking on the `Apply Server Settings` button).
- These enhanced logs are necessary for us to quickly track down your bug and get a fix implemented in code.
- Make sure you remove your username/password/cookies from the log files before submitting them with your issue.
- The logfiles (log.txt/updater.txt) are stored in `%ProgramData%\Jackett` on Windows in `~/.config/Jackett/`
on Linux/macOS and in `/usr/local/jackett` on FreeBSD.
## Reporting a Bug
Once you have your enhanced logs and you are still unable to resolve your issue yourself, now it's time to prepare to submit a bug report!
Before you submit your report, make sure you've searched open *and* closed bugs to see if someone's already informed us of your issue.
If your search doesn't help you fix your issue and you can't find a similar bug already listed, then you get to make a new issue.
Your issue should have the following information.
- **Descriptive Title** - The title of your bug should include keywords and a descriptive summary of what you're experiencing
to help others avoid duplicating your bug report
- Keywords in the title should be as follows:
- Tracker bugs should start with the tracker in brackets e.g. [**AnimeBytes**]
- Feature requests should start with [**REQ**]
- New trackers should begin with [**New**] and the tracker type [**Public**/**Private**/**Semi-Private**] e.g. **[New][Public] ThePirateBay**
- **Environment Details** - These are things like your OS version, Jackett type and version, mono/.Net-core/framework version(s).
These are asked for by the issue template when you create a new issue on GitHub.
- **Steps** to cause the problem, if applicable. These should be specific and repeatable.
- **What happens** when you take the steps and **what you expected to happen**
- **Error messages** and/or screenshots of the issue.
- The **last working version** if it's applicable. Tracker issues normally don't need this information.
- An attached copy of your **enhanced logs**. Don't forget to remove usernames/passwords/API-keys from the logs.
We'll be working on making sure these are automatically censored in the future.
- Any other **relevant details** you can think of. The more information we have, the quicker we can solve the problem.
## Adding a New Tracker
Jackett's framework typically allows our team and volunteering developers to implement new trackers in a couple of hours
Depending on logic complexity, there are two common ways new trackers are implemented:
1. simple [definitions](http://github.com/Jackett/Jackett/tree/master/src/Jackett.Common/Definitions) (.yml / YAML)
2. advanced (native) [indexers](http://github.com/Jackett/Jackett/tree/master/src/Jackett.Common/Indexers) (.cs / C#)
Read more about the [simple definition format](https://github.com/Jackett/Jackett/wiki/Definition-format).
# Contributing Code
While reporting the bugs is super helpful since you can't fix bugs you don't know about, they don't get fixed unless someone goes in and fixes them.
Luckily, you're a developer who wants to help us do just that. Thanks!
We really need more developers working on Jackett, no matter their skill level or walk of life.
We've developed the guide below to make sure we're all on the same page because this makes reading and fixing code much simpler, faster, and less bug-prone.
## Setting up your environment
The following guide assumes you've never worked with a Visual Studio project with GitHub before.
This will give you the minimum necessary tools to get started. There are plenty of optional tools that may help you, but we won't cover those here.
- The guide is currently only geared towards developing on Windows using Visual Studio Community 2019.
If you use something else, please add it here for others.
<details open=true> <summary> Windows </summary>
<details open=true> <summary> Visual Studio 2019 </summary>
- Install [Visual Studio Community 2019](http://visualstudio.com) for free.
- About 2GB download. 8GB installed.
- Make sure it includes the following Workloads/Components:
- .Net Desktop Development
- .Net Core Cross-Platform Development
- GitHub extension for Visual Studio
- [Connect and synchronize your forked repository to Visual Studio](https://doc.fireflymigration.com/working-with-github-fork-in-visual-studio.html)
- Open `Tools -> NuGet Package Manager -> Package Manager Console`
- From the PMC, run `dotnet tool install -g dotnet-format` and `dotnet restore`
- Run `Build -> Rebuild Solution` to restore NuGet packages
- Ensure `Jackett.Server` is the Startup Project (instead of `Jackett.Service`), and the Run Target (instead of `IIS Express`)
</details>
</details>
## Coding Style
Now that you're ready to code, it's time to teach you our style guidelines. This style guide helps our code stay readable and bug-free.
You can see the full details in the [Editor Config](.editorconfig) file.
Running `dotnet format` from the Package Manager Console will apply the style guide to the solution and is required before any pull request will be accepted.
- Whitespace
- Indenting is done with 4 spaces
- No whitespace at the end of lines
- All files have a final newline
- Unix style new lines for committed code
- Spaces around all non-unary operators
- Braces
- Opening brace on its own line
- Single line statements do not use braces
- If any part of an `if ... else if ... else` block needs braces, all blocks will use braces
- Naming
- `interface` names begin with I and are `PascalCase`
- `private` variables begin with _ and are `camelCase`
- `private static` variables begin with s_ and are `camelCase`
- local variables are `camelCase`
- `async` function names end with Async
- all others are `PascalCase`
- Others
- Prefer `var` for declarations
- Prefer modern language enhancements (C#7, C#8 features)
- switch expressions
- range operator
- using statements
- `default` over `default(T)`
- Prefer conditional access `?.` and null coalescing `??` over null checks
- Prefer pattern matching
- Prefer expression bodies
- Avoid `this` qualifier
- `using` statements go outside namespace declaration and are sorted:
- `using System`
- `using System.*` alphabetically
- all others alphabetically
- Prefer explicit variable modifiers: `private`, `public`, `protected`
- Prefer `readonly` and `const` variables when appropriate
## Pull Requests
At this point, you've found the bug, fixed it, tested that the bug is gone, and you haven't broken anything else in the process.
Now it's time to share your code with everyone else so we can all enjoy a better version of the program.
Here's what you need to do to give your pull request the best chance at a timely review and maximize that it will be accepted.
- Make sure your code follows GitHub and Jackett's standards and practices.
- Your changes should be made in a new branch based on `master` not directly on your `master` branch
- Your commit messages should start with a capital letter, be in the singular imperative voice, and do not end with punctuation marks, e.g.:
- Fix login handling for xxx tracker
- Add feature yyy
- Remove dead tracker fff
- Run `dotnet format` from the Package Manager Console (found in `Tools -> NuGet Package Manager` or `View -> Other Windows`)
- If your branch falls out of sync and has merge conflicts with the Jackett official `master`
[rebase](https://mohitgoyal.co/2018/04/18/working-with-git-and-visual-studio-use-git-rebase-inside-visual-studio/) your fix before submission.
- If you deleted, moved, or renamed any files/folders, be sure to add the old file/folder path to the appropriate array in `Jacket.Updater/Program.cs`
- If you added or renamed a tracker, update the README to include the new name
- [Squash your local commits](https://github.com/spottedmahn/my-blog/issues/26)
- Push your commit branch to your fork on GitHub.
- Create your Pull Request
- You can do this from the GitHub website or from the GitHub window in Visual Studio.
- Give your Pull Request a descriptive title
- Include keywords like `[New Tracker]` or `[Feature]` at the beginning of the title
- Include any open tickets this Pull Request should fix in the description. **Do not** put ticket numbers in the title.
We will be by when we can to review your Pull Request.

112
README.md
View File

@ -3,13 +3,15 @@
[![GitHub issues](https://img.shields.io/github/issues/Jackett/Jackett.svg?maxAge=60&style=flat-square)](https://github.com/Jackett/Jackett/issues)
[![GitHub pull requests](https://img.shields.io/github/issues-pr/Jackett/Jackett.svg?maxAge=60&style=flat-square)](https://github.com/Jackett/Jackett/pulls)
[![Build status](https://ci.appveyor.com/api/projects/status/gaybh5mvyx418nsp/branch/master?svg=true)](https://ci.appveyor.com/project/Jackett/jackett)
[![Github Releases](https://img.shields.io/github/downloads/Jackett/Jackett/total.svg?maxAge=60&style=flat-square)](https://github.com/Jackett/Jackett/releases/latest)
[![GitHub Releases](https://img.shields.io/github/downloads/Jackett/Jackett/total.svg?maxAge=60&style=flat-square)](https://github.com/Jackett/Jackett/releases/latest)
[![Docker Pulls](https://img.shields.io/docker/pulls/linuxserver/jackett.svg?maxAge=60&style=flat-square)](https://hub.docker.com/r/linuxserver/jackett/)
[![Discord](https://img.shields.io/badge/discord-chat-7289DA.svg?maxAge=60&style=flat-square)](https://discord.gg/J865QuA)
This project is a new fork and is recruiting development help. If you are able to help out please contact us.
Jackett works as a proxy server: it translates queries from apps ([Sonarr](https://github.com/Sonarr/Sonarr), [Radarr](https://github.com/Radarr/Radarr), [SickRage](https://sickrage.github.io/), [CouchPotato](https://couchpota.to/), [Mylar](https://github.com/evilhero/mylar), [Lidarr](https://github.com/lidarr/lidarr), [DuckieTV](https://github.com/SchizoDuckie/DuckieTV), [qBittorrent](https://www.qbittorrent.org/), [Nefarious](https://github.com/lardbit/nefarious) etc) into tracker-site-specific http queries, parses the html response, then sends results back to the requesting software. This allows for getting recent uploads (like RSS) and performing searches. Jackett is a single repository of maintained indexer scraping & translation logic - removing the burden from other apps.
Please see our [troubleshooting and contributing guidelines](CONTRIBUTING.md) before submitting any issues or pull requests
Jackett works as a proxy server: it translates queries from apps ([Sonarr](https://github.com/Sonarr/Sonarr), [Radarr](https://github.com/Radarr/Radarr), [SickRage](https://sickrage.github.io/), [CouchPotato](https://couchpota.to/), [Mylar](https://github.com/evilhero/mylar), [Lidarr](https://github.com/lidarr/lidarr), [DuckieTV](https://github.com/SchizoDuckie/DuckieTV), [qBittorrent](https://www.qbittorrent.org/), [Nefarious](https://github.com/lardbit/nefarious) etc.) into tracker-site-specific http queries, parses the html response, then sends results back to the requesting software. This allows for getting recent uploads (like RSS) and performing searches. Jackett is a single repository of maintained indexer scraping & translation logic - removing the burden from other apps.
Developer note: The software implements the [Torznab](https://github.com/Sonarr/Sonarr/wiki/Implementing-a-Torznab-indexer) (with [nZEDb](https://github.com/nZEDb/nZEDb/blob/dev/docs/newznab_api_specification.txt) category numbering) and [TorrentPotato](https://github.com/RuudBurger/CouchPotatoServer/wiki/Couchpotato-torrent-provider) APIs.
@ -20,7 +22,8 @@ Developer note: The software implements the [Torznab](https://github.com/Sonarr/
* Linux [supported operating systems here](https://github.com/dotnet/core/blob/master/release-notes/2.1/2.1-supported-os.md#linux)
* macOS 10.13 or greater
### Supported Public Trackers
<details> <summary> <b> Supported Public Trackers </b> </summary>
* 1337x
* ACG.RIP
* ACGsou
@ -117,8 +120,10 @@ Developer note: The software implements the [Torznab](https://github.com/Sonarr/
* YourBittorrent
* YTS.ag
* Zooqle
</details>
<details> <summary> <b> Supported Semi-Private Trackers </b> </summary>
### Supported Semi-Private Trackers
* Alein
* AlexFilm
* AniDUB
@ -161,8 +166,10 @@ Developer note: The software implements the [Torznab](https://github.com/Sonarr/
* Vanila
* YggTorrent (YGG)
* Ztracker
</details>
<details> <summary> <b> Supported Private Trackers </b> </summary>
### Supported Private Trackers
* 0day.kiev
* 2 Fast 4 You
* 3D Torrents (3DT)
@ -455,6 +462,7 @@ Developer note: The software implements the [Torznab](https://github.com/Sonarr/
* ExoticaZ (YourExotic)
* Zamunda.net
* Zelka.org
</details>
Trackers marked with [![(invite needed)][inviteneeded]](#) have no active maintainer and are missing features or are broken. If you have an invite for them please send it to garfieldsixtynine -at- gmail.com to get them fixed/improved.
@ -466,12 +474,12 @@ It will query all configured indexers and return the combined results.
If your client supports multiple feeds it's recommended to add each indexer directly instead of using the all indexer.
Using the all indexer has no advantages (besides reduced management overhead), only disadvantages:
* you lose control over indexer specific settings (categories, search modes, etc.)
* mixing search modes (IMDB, query, etc.) might cause low quality results
* mixing search modes (IMDB, query, etc.) might cause low-quality results
* indexer specific categories (>= 100000) can't be used.
* slow indexers will slow down the overall result
* total results are limited to 1000
To get all Jackett indexers including their capabilities you can use `t=indexers` on the all indexer. To get only configured/unconfigured indexers you can also add `configured=true/false` as query parameter.
To get all Jackett indexers including their capabilities you can use `t=indexers` on the all indexer. To get only configured/unconfigured indexers you can also add `configured=true/false` as a query parameter.
## Installation on Windows
@ -483,7 +491,7 @@ To get started with using the installer for Jackett, follow the steps below:
2. When prompted if you would like this app to make changes to your computer, select "yes".
3. If you would like to install Jackett as a Windows Service, make sure the "Install as Windows Service" checkbox is filled.
4. Once the installation has finished, check the "Launch Jackett" box to get started.
5. Navigate your web browser to: http://127.0.0.1:9117
5. Navigate your web browser to http://127.0.0.1:9117
6. You're now ready to begin adding your trackers and using Jackett.
When installed as a service the tray icon acts as a way to open/start/stop Jackett. If you opted to not install it as a service then Jackett will run its web server from the tray tool.
@ -524,7 +532,7 @@ If you want to run it with a user without a /home directory you need to add `Env
* Follow the instructions on the mono website and install the `mono-devel` and the `ca-certificates-mono` packages.
* On Red Hat/CentOS/openSUSE/Fedora the `mono-locale-extras` package is also required.
2. Install libcurl:
* Debian/Ubunutu: `apt-get install libcurl4-openssl-dev`
* Debian/Ubuntu: `apt-get install libcurl4-openssl-dev`
* Redhat/Fedora: `yum install libcurl-devel`
* For other distros see the [Curl docs](http://curl.haxx.se/dlwiz/?type=devel).
3. Download and extract the latest `Jackett.Binaries.Mono.tar.gz` release from the [releases page](https://github.com/Jackett/Jackett/releases) and run Jackett using mono with the command `mono --debug JackettConsole.exe`.
@ -560,11 +568,11 @@ Download and extract the latest `Jackett.Binaries.macOS.tar.gz` release from the
## Installation using Docker
Detailed instructions are available at [LinuxServer.io Jackett Docker](https://hub.docker.com/r/linuxserver/jackett/). The Jackett Docker is highly recommended, especially if you are having Mono stability issues or having issues running Mono on your system eg. QNAP, Synology. Thanks to [LinuxServer.io](https://linuxserver.io)
Detailed instructions are available at [LinuxServer.io Jackett Docker](https://hub.docker.com/r/linuxserver/jackett/). The Jackett Docker is highly recommended, especially if you are having Mono stability issues or having issues running Mono on your system e.g. QNAP, Synology. Thanks to [LinuxServer.io](https://linuxserver.io)
## Installation on Synology
Jackett is available as beta package from [SynoCommunity](https://synocommunity.com/)
Jackett is available as a beta package from [SynoCommunity](https://synocommunity.com/)
## Running Jackett behind a reverse proxy
@ -580,7 +588,7 @@ Example config for apache:
</Location>
```
Example config for nginx:
Example config for Nginx:
```
location /jackett {
proxy_pass http://127.0.0.1:9117;
@ -592,59 +600,69 @@ location /jackett {
}
```
## Troubleshooting
* __Command line switches__
You can pass various options when running via the command line, see --help for details.
* __Error "An error occurred while sending the request: Error: TrustFailure (A call to SSPI failed, see inner exception.)"__
This is often caused by missing CA certificates.
Try reimporting the certificates in this case:
- On Linux (as user root): `wget -O - https://curl.haxx.se/ca/cacert.pem | cert-sync /dev/stdin`
- On macOS: `curl -sS https://curl.haxx.se/ca/cacert.pem | cert-sync --user /dev/stdin`
* __Enable enhanced logging__
You can get *enhanced* logging with the command line switches `-t -l` or by enabling `Enhanced logging` via the web interface (followed by clicking on the `Apply Server Settings` button).
Please post logs if you are unable to resolve your issue with these switches ensuring to remove your username/password/cookies.
The logfiles (log.txt/updater.txt) are stored in `%ProgramData%\Jackett` on Windows and `~/.config/Jackett/` on Linux/macOS.
## Configuring OMDb
This feature is used as a fallback (when using the aggregate Indexer) to get the movie/series title if only the IMDB ID is provided in the request.
To use it, please just request a free API key on [OMDb](http://www.omdbapi.com/apikey.aspx) (1,000 daily requests limit) and paste the key in Jackett
## Creating an issue
Please supply as much information about the problem you are experiencing as possible. Your issue has a much greater chance of being resolved if logs are supplied so that we can see what is going on. Creating an issue with '### isn't working' doesn't help anyone to fix the problem.
## Command line switches
## Contributing
You can pass various options when running via the command line:
Jackett's framework typically allows our team and volunteering developers to implement new trackers in a couple of hours
<details> <summary> Command Line Switches </summary>
Depending on logic complexity, there are two common ways new trackers are implemented:
- `-i, --Install` Install Jackett windows service (Must be admin)
- `-s, --Start` Start the Jacket Windows service (Must be admin)
- `-k, --Stop` Stop the Jacket Windows service (Must be admin)
- `-u, --Uninstall` Uninstall Jackett windows service (Must be admin).
1. simple [definitions](http://github.com/Jackett/Jackett/tree/master/src/Jackett.Common/Definitions) (.yml / YAML), and;
2. advanced (native) [indexers](http://github.com/Jackett/Jackett/tree/master/src/Jackett.Common/Indexers) (.cs / C#)
- `-r, --ReserveUrls` (Re)Register windows port reservations (Required for
listening on all interfaces).
Read more about the [simple definition format](https://github.com/Jackett/Jackett/wiki/Definition-format).
- `-l, --Logging` Log all requests/responses to Jackett
If you are a developer then it's recommended to download the free community version of [Visual Studio](http://visualstudio.com)
- `-t, --Tracing` Enable tracing
If you are not a developer and would like a (new) tracker supported then feel free to leave an [issue](https://github.com/Jackett/Jackett/issues) request.
- `-c, --UseClient` Override web client selection.
[automatic(Default)/httpclient/httpclient2]
All contributions are welcome just send a pull request.
- `-j, --ProxyConnection` use proxy - e.g. 127.0.0.1:8888
- `-x, --ListenPublic` Listen publicly
- `-z, --ListenPrivate` Only allow local access
- `-p, --Port` Web server port
- `-m, --MigrateSettings` Migrate settings manually (Must be an admin on Windows)
- `-n, --IgnoreSslErrors` [true/false] Ignores invalid SSL certificates
- `-d, --DataFolder` Specify the location of the data folder (Must be an admin on Windows)
- e.g. --DataFolder="D:\Your Data\Jackett\".
- Don't use this on Unix (mono) systems. On Unix just adjust the HOME directory of the user to the datadir or set the XDG_CONFIG_HOME environment variable.
- `--NoRestart` Don't restart after update
- `--PIDFile` Specify the location of PID file
- `--NoUpdates` Disable automatic updates
- `--help` Display this help screen.
- `--version` Display version information.
</details>
## Building from source
### Windows
* Install the .NET Core [SDK](https://www.microsoft.com/net/download/windows)
* Clone Jackett
* Open Powershell and from the `src` directory, run `dotnet restore`
* Open PowerShell and from the `src` directory, run `dotnet restore`
* Open the Jackett solution in Visual Studio 2019 (version 16.4 or above)
* Right click on the Jackett solution and click 'Rebuild Solution' to restore nuget packages
* Select Jackett.Server as startup project
* In the drop down menu of the run button select "Jackett.Server" instead of "IIS Express"
* Right-click on the Jackett solution and click 'Rebuild Solution' to restore NuGet packages
* Select Jackett.Server as the startup project
* In the drop-down menu of the run button select "Jackett.Server" instead of "IIS Express"
* Build/Start the project
### OSX
@ -666,7 +684,7 @@ dotnet publish Jackett.Server -f netcoreapp3.1 --self-contained -r osx-x64 -c De
```bash
sudo apt install mono-complete nuget msbuild dotnet-sdk-3.1 # install build tools (debian/ubuntu)
sudo apt install mono-complete nuget msbuild dotnet-sdk-3.1 # install build tools (Debian/ubuntu)
git clone https://github.com/Jackett/Jackett.git
cd Jackett/src

View File

@ -4,6 +4,7 @@ VisualStudioVersion = 16.0.29519.181
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{BE7B0C8A-6144-47CD-821E-B09BA1B7BADE}"
ProjectSection(SolutionItems) = preProject
..\.editorconfig = ..\.editorconfig
..\appveyor.yml = ..\appveyor.yml
..\build.cake = ..\build.cake
..\Installer.iss = ..\Installer.iss
@ -25,7 +26,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Jackett.Common", "Jackett.C
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Jackett.Server", "Jackett.Server\Jackett.Server.csproj", "{84182782-EDBC-4342-ADA6-72B7694D0862}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jackett.IntegrationTests", "Jackett.IntegrationTests\Jackett.IntegrationTests.csproj", "{0250DEAA-ED2E-4F72-BE76-D92D80B40080}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Jackett.IntegrationTests", "Jackett.IntegrationTests\Jackett.IntegrationTests.csproj", "{0250DEAA-ED2E-4F72-BE76-D92D80B40080}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution