Compare commits
6 Commits
sqlite-on-
...
v2.0.0.324
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a7e368d27b | ||
|
|
c72f9c8f27 | ||
|
|
83ff02545e | ||
|
|
2d25c74758 | ||
|
|
4d924688d8 | ||
|
|
3b805c4591 |
@@ -1,25 +0,0 @@
|
||||
# This file is for unifying the coding style for different editors and IDEs
|
||||
# editorconfig.org
|
||||
root = true
|
||||
|
||||
[*.{cs,html,js,hbs}]
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
[*.less]
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
# They have troubles with TABS. Use 2 spaces
|
||||
[{package.json,.travis.yml}]
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
41
.github/ISSUE_TEMPLATE.md
vendored
@@ -1,41 +0,0 @@
|
||||
<!--
|
||||
Before opening a new issue, please ensure:
|
||||
- You use the forums for support/questions
|
||||
- You search for existing bugs/feature requests
|
||||
- Remove extraneous template details
|
||||
- Do not prefix title with type of issue (Feature Request, Bug, etc.) The appropriate labels will be added during triage.
|
||||
-->
|
||||
|
||||
## Support / Questions
|
||||
|
||||
Please use https://forums.sonarr.tv/ for support. Support requests or questions will be redirected to the forums and the issue will be closed.
|
||||
|
||||
<!--
|
||||
Remove if not opening a bug report
|
||||
-->
|
||||
|
||||
## Bug Report
|
||||
|
||||
### System Information/Logs
|
||||
|
||||
**Sonarr Version:**
|
||||
|
||||
**Operating System:**
|
||||
|
||||
**.net Framework (Windows) or mono (macOS/Linux) Version:**
|
||||
|
||||
**Link to Log Files (debug or trace):**
|
||||
|
||||
**Browser (for UI bugs):**
|
||||
|
||||
### Additional Information
|
||||
|
||||
<!--
|
||||
Remove if not opening a feature request
|
||||
-->
|
||||
|
||||
## Feature Request
|
||||
|
||||
### What problem are you looking to solve?
|
||||
|
||||
### Other Information
|
||||
28
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -1,28 +0,0 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve Sonarr
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Logs**
|
||||
Link to debug or trace log files.
|
||||
|
||||
**System Information**
|
||||
|
||||
- Sonarr Version: [e.g. 2.0.0.1]
|
||||
- Operating System: [e.g. Windows 10]
|
||||
- .net Framework (Windows) or mono (macOS/Linux) Version: [e.g. 4.5 or 5.12]
|
||||
|
||||
**UI Bugs:**
|
||||
- OS: [e.g. Windows]
|
||||
- Browser: [e.g. chrome, firefox]
|
||||
- Version: [e.g. 22]
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
14
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@@ -1,14 +0,0 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for Sonarr
|
||||
|
||||
---
|
||||
|
||||
**Describe the problem**
|
||||
A clear and concise description of the problem you're looking to solve.
|
||||
|
||||
**Describe any solutions you think might work**
|
||||
A clear and concise description of any solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
7
.github/ISSUE_TEMPLATE/other-issues.md
vendored
@@ -1,7 +0,0 @@
|
||||
---
|
||||
name: Other issues
|
||||
about: How to get support or ask questions
|
||||
|
||||
---
|
||||
|
||||
Please use https://forums.sonarr.tv/ for support. Support requests or questions will be redirected to the forums and the issue will be closed.
|
||||
14
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -1,14 +0,0 @@
|
||||
#### Database Migration
|
||||
YES | NO
|
||||
|
||||
#### Description
|
||||
A few sentences describing the overall goals of the pull request's commits.
|
||||
|
||||
#### Todos
|
||||
- [ ] Tests
|
||||
- [ ] Documentation
|
||||
|
||||
|
||||
#### Issues Fixed or Closed by this PR
|
||||
|
||||
*
|
||||
7
.github/SUPPORT.md
vendored
@@ -1,7 +0,0 @@
|
||||
## Support
|
||||
|
||||
There are a number of frequently asked questions that have been answered in our [FAQ](https://github.com/Sonarr/Sonarr/wiki/FAQ)
|
||||
|
||||
The [wiki](https://github.com/Sonarr/Sonarr/wiki) contains other information and guides
|
||||
|
||||
If you have a support question, please use the [support forums](https://forums.sonarr.tv/).
|
||||
23
.gitignore
vendored
@@ -10,7 +10,6 @@ src/**/[Oo]bj/
|
||||
*.suo
|
||||
*.user
|
||||
*.sln.docstates
|
||||
.vs/
|
||||
|
||||
# Build results
|
||||
*_i.c
|
||||
@@ -42,9 +41,6 @@ src/**/[Oo]bj/
|
||||
_ReSharper*
|
||||
_dotCover*
|
||||
|
||||
# DevExpress CodeRush
|
||||
src/.cr/
|
||||
|
||||
# NCrunch
|
||||
*.ncrunch*
|
||||
.*crunch*.local.xml
|
||||
@@ -101,7 +97,7 @@ App_Data/*.ldf
|
||||
_NCrunch_*
|
||||
_TeamCity*
|
||||
|
||||
# Sonarr
|
||||
# NzbDrone
|
||||
config.xml
|
||||
nzbdrone.log*txt
|
||||
UpdateLogs/
|
||||
@@ -109,7 +105,7 @@ UpdateLogs/
|
||||
*.test-cache
|
||||
*.userprefs
|
||||
*/test-results/*
|
||||
src/UI/.idea/*
|
||||
.idea/*
|
||||
*log.txt
|
||||
node_modules/
|
||||
_output*
|
||||
@@ -117,22 +113,13 @@ _rawPackage/
|
||||
_dotTrace*
|
||||
_tests/
|
||||
*.Result.xml
|
||||
wix/*.msi
|
||||
wix/*.wixobj
|
||||
wix/*.wixpdb
|
||||
setup/Output/
|
||||
*.~is
|
||||
|
||||
UI.Phantom/
|
||||
|
||||
#VS outout folders
|
||||
bin
|
||||
obj
|
||||
output/*
|
||||
|
||||
|
||||
#OS X metadata files
|
||||
._*
|
||||
.DS_Store
|
||||
|
||||
_start
|
||||
_temp_*/**/*
|
||||
|
||||
src/.idea/
|
||||
|
||||
4
.gitmodules
vendored
@@ -1,4 +0,0 @@
|
||||
[submodule "src/ExternalModules/CurlSharp"]
|
||||
path = src/ExternalModules/CurlSharp
|
||||
url = https://github.com/Sonarr/CurlSharp.git
|
||||
branch = master
|
||||
1
.idea/.name
generated
@@ -1 +0,0 @@
|
||||
Sonarr
|
||||
25
.idea/Sonarr.iml
generated
@@ -1,25 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/.idea" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/Logo" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/_output" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/_output_mono" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/_output_osx" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/_output_osx_app" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/_start" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/_tests" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/debian" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/node_modules" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/osx" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/schemas" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/setup" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/src" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/tools" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="Sonarr node_modules" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
59
.idea/codeStyleSettings.xml
generated
@@ -1,59 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectCodeStyleSettingsManager">
|
||||
<option name="PER_PROJECT_SETTINGS">
|
||||
<value>
|
||||
<option name="LINE_SEPARATOR" value=" " />
|
||||
<option name="RIGHT_MARGIN" value="190" />
|
||||
<option name="HTML_ATTRIBUTE_WRAP" value="0" />
|
||||
<option name="HTML_KEEP_LINE_BREAKS" value="false" />
|
||||
<option name="HTML_KEEP_BLANK_LINES" value="1" />
|
||||
<option name="HTML_ALIGN_ATTRIBUTES" value="false" />
|
||||
<option name="HTML_INLINE_ELEMENTS" value="" />
|
||||
<option name="HTML_DONT_ADD_BREAKS_IF_INLINE_CONTENT" value="" />
|
||||
<CssCodeStyleSettings>
|
||||
<option name="HEX_COLOR_LOWER_CASE" value="true" />
|
||||
<option name="HEX_COLOR_LONG_FORMAT" value="true" />
|
||||
<option name="VALUE_ALIGNMENT" value="1" />
|
||||
</CssCodeStyleSettings>
|
||||
<JSCodeStyleSettings>
|
||||
<option name="SPACE_BEFORE_PROPERTY_COLON" value="true" />
|
||||
<option name="ALIGN_OBJECT_PROPERTIES" value="2" />
|
||||
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
|
||||
<option name="OBJECT_LITERAL_WRAP" value="2" />
|
||||
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
|
||||
</JSCodeStyleSettings>
|
||||
<XML>
|
||||
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
|
||||
</XML>
|
||||
<codeStyleSettings language="CSS">
|
||||
<indentOptions>
|
||||
<option name="SMART_TABS" value="true" />
|
||||
</indentOptions>
|
||||
</codeStyleSettings>
|
||||
<codeStyleSettings language="JavaScript">
|
||||
<option name="LINE_COMMENT_AT_FIRST_COLUMN" value="true" />
|
||||
<option name="KEEP_LINE_BREAKS" value="false" />
|
||||
<option name="KEEP_FIRST_COLUMN_COMMENT" value="false" />
|
||||
<option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
|
||||
<option name="CATCH_ON_NEW_LINE" value="true" />
|
||||
<option name="FINALLY_ON_NEW_LINE" value="true" />
|
||||
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
|
||||
<option name="ALIGN_MULTILINE_BINARY_OPERATION" value="true" />
|
||||
<option name="SPACE_BEFORE_METHOD_PARENTHESES" value="true" />
|
||||
<option name="CALL_PARAMETERS_WRAP" value="1" />
|
||||
<option name="BINARY_OPERATION_WRAP" value="1" />
|
||||
<option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
|
||||
<option name="ARRAY_INITIALIZER_WRAP" value="2" />
|
||||
<option name="ARRAY_INITIALIZER_LBRACE_ON_NEXT_LINE" value="true" />
|
||||
<option name="ARRAY_INITIALIZER_RBRACE_ON_NEXT_LINE" value="true" />
|
||||
<option name="IF_BRACE_FORCE" value="3" />
|
||||
<option name="DOWHILE_BRACE_FORCE" value="3" />
|
||||
<option name="WHILE_BRACE_FORCE" value="3" />
|
||||
<option name="FOR_BRACE_FORCE" value="3" />
|
||||
</codeStyleSettings>
|
||||
</value>
|
||||
</option>
|
||||
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/encodings.xml
generated
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="PROJECT" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/jsLibraryMappings.xml
generated
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="JavaScriptLibraryMappings">
|
||||
<includedPredefinedLibrary name="ECMAScript 6" />
|
||||
</component>
|
||||
</project>
|
||||
14
.idea/libraries/Sonarr_node_modules.xml
generated
@@ -1,14 +0,0 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Sonarr node_modules" type="javaScript">
|
||||
<properties>
|
||||
<option name="frameworkName" value="node_modules" />
|
||||
<sourceFilesUrls>
|
||||
<item url="file://$PROJECT_DIR$/node_modules" />
|
||||
</sourceFilesUrls>
|
||||
</properties>
|
||||
<CLASSES>
|
||||
<root url="file://$PROJECT_DIR$/node_modules" />
|
||||
</CLASSES>
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
||||
14
.idea/misc.xml
generated
@@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
|
||||
<OptionsSetting value="true" id="Add" />
|
||||
<OptionsSetting value="true" id="Remove" />
|
||||
<OptionsSetting value="true" id="Checkout" />
|
||||
<OptionsSetting value="true" id="Update" />
|
||||
<OptionsSetting value="true" id="Status" />
|
||||
<OptionsSetting value="true" id="Edit" />
|
||||
<ConfirmationsSetting value="0" id="Add" />
|
||||
<ConfirmationsSetting value="0" id="Remove" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" />
|
||||
</project>
|
||||
8
.idea/modules.xml
generated
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/Sonarr.iml" filepath="$PROJECT_DIR$/.idea/Sonarr.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/vcs.xml
generated
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
4
CLA.md
@@ -1,6 +1,6 @@
|
||||
# Sonarr Individual Contributor License Agreement #
|
||||
# NzbDrone Individual Contributor License Agreement #
|
||||
|
||||
Thank you for your interest in contributing to Sonarr ("We" or "Us").
|
||||
Thank you for your interest in contributing to NzbDrone ("We" or "Us").
|
||||
This contributor agreement ("Agreement") documents the rights granted by contributors to Us. To make this document effective, please complete the form below. This is a legally binding document, so please read it carefully before agreeing to it. The Agreement may cover more than one software project managed by Us.
|
||||
|
||||
## 1. Definitions ##
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# How to Contribute #
|
||||
|
||||
We're always looking for people to help make Sonarr even better, there are a number of ways to contribute.
|
||||
We're always looking for people to help make NzbDrone even better, there are a number of ways to contribute. To get started, <a href="http://www.clahub.com/agreements/NzbDrone/NzbDrone">sign the Contributor License Agreement</a>.
|
||||
|
||||
## Documentation ##
|
||||
Setup guides, FAQ, the more information we have on the wiki the better.
|
||||
@@ -8,24 +8,22 @@ Setup guides, FAQ, the more information we have on the wiki the better.
|
||||
## Development ##
|
||||
|
||||
### Tools required ###
|
||||
- Visual Studio 2015
|
||||
- HTML/Javascript editor of choice (Sublime Text/Webstorm/Atom/etc)
|
||||
- Visual Studio 2013
|
||||
- HTML/Javascript editor of choice (Sublime Text/Webstorm/etc)
|
||||
- npm (node package manager)
|
||||
- git
|
||||
|
||||
### Getting started ###
|
||||
|
||||
1. Fork Sonarr
|
||||
2. Clone (develop branch) *you may need pull in submodules separately if you client doesn't clone them automatically (CurlSharp)*
|
||||
1. Fork NzbDrone
|
||||
2. Clone (develop branch)
|
||||
3. Run `npm install`
|
||||
4. Run `npm start` - Used to compile the UI components and copy them.
|
||||
Leave this window open.
|
||||
If you have gulp globally installed you can use `gulp watch` instead
|
||||
4. Run `gulp watch` - Used to compile the UI components and copy them (leave this window open)
|
||||
5. Compile in Visual Studio
|
||||
|
||||
### Contributing Code ###
|
||||
- If you're adding a new, already requested feature, please comment on [Github Issues](https://github.com/Sonarr/Sonarr/issues "Github Issues") so work is not duplicated (If you want to add something not already on there, please talk to us first)
|
||||
- Rebase from Sonarr's develop branch, don't merge
|
||||
- If you're adding a new, already requested feature, please comment on [Trello](https://trello.sonarr.tv "Trello") so work is not duplicated (If you want to add something not already on there, please talk to us first)
|
||||
- Rebase from NzbDrone's develop branch, don't merge
|
||||
- Make meaningful commits, or squash them
|
||||
- Feel free to make a pull request before work is complete, this will let us see where its at and make comments/suggest improvements
|
||||
- Reach out to us on the forums or on IRC if you have any questions
|
||||
|
||||
11
COPYRIGHT.md
@@ -1,11 +0,0 @@
|
||||
Copyright (C)
|
||||
2014-2017 Mark McDowall, Keivan Beigi, Taloth Saldono and contributors
|
||||
2010-2014 Mark McDowall, Keivan Beigi and contributors
|
||||
|
||||
_Please refer to the git commit log for details on all contributors and their respective contributions._
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You can find a copy of the GNU General Public License in the LICENSE.md file and <http://www.gnu.org/licenses/>.
|
||||
675
LICENSE.md
@@ -1,675 +0,0 @@
|
||||
### GNU GENERAL PUBLIC LICENSE
|
||||
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc.
|
||||
<http://fsf.org/>
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this
|
||||
license document, but changing it is not allowed.
|
||||
|
||||
### Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom
|
||||
to share and change all versions of a program--to make sure it remains
|
||||
free software for all its users. We, the Free Software Foundation, use
|
||||
the GNU General Public License for most of our software; it applies
|
||||
also to any other work released this way by its authors. You can apply
|
||||
it to your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you
|
||||
have certain responsibilities if you distribute copies of the
|
||||
software, or if you modify it: responsibilities to respect the freedom
|
||||
of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the
|
||||
manufacturer can do so. This is fundamentally incompatible with the
|
||||
aim of protecting users' freedom to change the software. The
|
||||
systematic pattern of such abuse occurs in the area of products for
|
||||
individuals to use, which is precisely where it is most unacceptable.
|
||||
Therefore, we have designed this version of the GPL to prohibit the
|
||||
practice for those products. If such problems arise substantially in
|
||||
other domains, we stand ready to extend this provision to those
|
||||
domains in future versions of the GPL, as needed to protect the
|
||||
freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish
|
||||
to avoid the special danger that patents applied to a free program
|
||||
could make it effectively proprietary. To prevent this, the GPL
|
||||
assures that patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
### TERMS AND CONDITIONS
|
||||
|
||||
#### 0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds
|
||||
of works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of
|
||||
an exact copy. The resulting work is called a "modified version" of
|
||||
the earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user
|
||||
through a computer network, with no transfer of a copy, is not
|
||||
conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices" to
|
||||
the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
#### 1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work for
|
||||
making modifications to it. "Object code" means any non-source form of
|
||||
a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users can
|
||||
regenerate automatically from other parts of the Corresponding Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that same
|
||||
work.
|
||||
|
||||
#### 2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not convey,
|
||||
without conditions so long as your license otherwise remains in force.
|
||||
You may convey covered works to others for the sole purpose of having
|
||||
them make modifications exclusively for you, or provide you with
|
||||
facilities for running those works, provided that you comply with the
|
||||
terms of this License in conveying all material for which you do not
|
||||
control copyright. Those thus making or running the covered works for
|
||||
you must do so exclusively on your behalf, under your direction and
|
||||
control, on terms that prohibit them from making any copies of your
|
||||
copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under the
|
||||
conditions stated below. Sublicensing is not allowed; section 10 makes
|
||||
it unnecessary.
|
||||
|
||||
#### 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such
|
||||
circumvention is effected by exercising rights under this License with
|
||||
respect to the covered work, and you disclaim any intention to limit
|
||||
operation or modification of the work as a means of enforcing, against
|
||||
the work's users, your or third parties' legal rights to forbid
|
||||
circumvention of technological measures.
|
||||
|
||||
#### 4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
#### 5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these
|
||||
conditions:
|
||||
|
||||
- a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
- b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under
|
||||
section 7. This requirement modifies the requirement in section 4
|
||||
to "keep intact all notices".
|
||||
- c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
- d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
#### 6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms of
|
||||
sections 4 and 5, provided that you also convey the machine-readable
|
||||
Corresponding Source under the terms of this License, in one of these
|
||||
ways:
|
||||
|
||||
- a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
- b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the Corresponding
|
||||
Source from a network server at no charge.
|
||||
- c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
- d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
- e) Convey the object code using peer-to-peer transmission,
|
||||
provided you inform other peers where the object code and
|
||||
Corresponding Source of the work are being offered to the general
|
||||
public at no charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal,
|
||||
family, or household purposes, or (2) anything designed or sold for
|
||||
incorporation into a dwelling. In determining whether a product is a
|
||||
consumer product, doubtful cases shall be resolved in favor of
|
||||
coverage. For a particular product received by a particular user,
|
||||
"normally used" refers to a typical or common use of that class of
|
||||
product, regardless of the status of the particular user or of the way
|
||||
in which the particular user actually uses, or expects or is expected
|
||||
to use, the product. A product is a consumer product regardless of
|
||||
whether the product has substantial commercial, industrial or
|
||||
non-consumer uses, unless such uses represent the only significant
|
||||
mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to
|
||||
install and execute modified versions of a covered work in that User
|
||||
Product from a modified version of its Corresponding Source. The
|
||||
information must suffice to ensure that the continued functioning of
|
||||
the modified object code is in no case prevented or interfered with
|
||||
solely because modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or
|
||||
updates for a work that has been modified or installed by the
|
||||
recipient, or for the User Product in which it has been modified or
|
||||
installed. Access to a network may be denied when the modification
|
||||
itself materially and adversely affects the operation of the network
|
||||
or violates the rules and protocols for communication across the
|
||||
network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
#### 7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders
|
||||
of that material) supplement the terms of this License with terms:
|
||||
|
||||
- a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
- b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
- c) Prohibiting misrepresentation of the origin of that material,
|
||||
or requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
- d) Limiting the use for publicity purposes of names of licensors
|
||||
or authors of the material; or
|
||||
- e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
- f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions
|
||||
of it) with contractual assumptions of liability to the recipient,
|
||||
for any liability that these contractual assumptions directly
|
||||
impose on those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions; the
|
||||
above requirements apply either way.
|
||||
|
||||
#### 8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your license
|
||||
from a particular copyright holder is reinstated (a) provisionally,
|
||||
unless and until the copyright holder explicitly and finally
|
||||
terminates your license, and (b) permanently, if the copyright holder
|
||||
fails to notify you of the violation by some reasonable means prior to
|
||||
60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
#### 9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or run
|
||||
a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
#### 10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
#### 11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims owned
|
||||
or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within the
|
||||
scope of its coverage, prohibits the exercise of, or is conditioned on
|
||||
the non-exercise of one or more of the rights that are specifically
|
||||
granted under this License. You may not convey a covered work if you
|
||||
are a party to an arrangement with a third party that is in the
|
||||
business of distributing software, under which you make payment to the
|
||||
third party based on the extent of your activity of conveying the
|
||||
work, and under which the third party grants, to any of the parties
|
||||
who would receive the covered work from you, a discriminatory patent
|
||||
license (a) in connection with copies of the covered work conveyed by
|
||||
you (or copies made from those copies), or (b) primarily for and in
|
||||
connection with specific products or compilations that contain the
|
||||
covered work, unless you entered into that arrangement, or that patent
|
||||
license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
#### 12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under
|
||||
this License and any other pertinent obligations, then as a
|
||||
consequence you may not convey it at all. For example, if you agree to
|
||||
terms that obligate you to collect a royalty for further conveying
|
||||
from those to whom you convey the Program, the only way you could
|
||||
satisfy both those terms and this License would be to refrain entirely
|
||||
from conveying the Program.
|
||||
|
||||
#### 13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
#### 14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in
|
||||
detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies that a certain numbered version of the GNU General Public
|
||||
License "or any later version" applies to it, you have the option of
|
||||
following the terms and conditions either of that numbered version or
|
||||
of any later version published by the Free Software Foundation. If the
|
||||
Program does not specify a version number of the GNU General Public
|
||||
License, you may choose any version ever published by the Free
|
||||
Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future versions
|
||||
of the GNU General Public License can be used, that proxy's public
|
||||
statement of acceptance of a version permanently authorizes you to
|
||||
choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
#### 15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
|
||||
WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
|
||||
PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
|
||||
DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
|
||||
CORRECTION.
|
||||
|
||||
#### 16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR
|
||||
CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
|
||||
ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT
|
||||
NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
|
||||
LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
|
||||
TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
|
||||
PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
#### 17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
### How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these
|
||||
terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest to
|
||||
attach them to the start of each source file to most effectively state
|
||||
the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper
|
||||
mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands \`show w' and \`show c' should show the
|
||||
appropriate parts of the General Public License. Of course, your
|
||||
program's commands might be different; for a GUI interface, you would
|
||||
use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. For more information on this, and how to apply and follow
|
||||
the GNU GPL, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your
|
||||
program into proprietary programs. If your program is a subroutine
|
||||
library, you may consider it more useful to permit linking proprietary
|
||||
applications with the library. If this is what you want to do, use the
|
||||
GNU Lesser General Public License instead of this License. But first,
|
||||
please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
720
Log4ViewConfig.l4v
Normal file
@@ -0,0 +1,720 @@
|
||||
<Config xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:b="http://schemas.datacontract.org/2004/07/System.Drawing" xmlns:d="http://schemas.datacontract.org/2004/07/Prosa.Log4View.Db" xmlns:f="http://schemas.datacontract.org/2004/07/Prosa.Log4View.Receiver.File" xmlns:l="http://schemas.datacontract.org/2004/07/Prosa.Log4View.Level" xmlns:m="http://schemas.datacontract.org/2004/07/Prosa.Log4View.Receiver.Msg" xmlns:n="http://schemas.datacontract.org/2004/07/Prosa.Log4View.Receiver.Net" xmlns:t="http://schemas.datacontract.org/2004/07/Prosa.Log4View.LoggerTree" xmlns:u="http://schemas.datacontract.org/2004/07/Prosa.Log4View.Utils" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" z:Id="1" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" xmlns="http://schemas.datacontract.org/2004/07/Prosa.Log4View.Configuration">
|
||||
<Id>
|
||||
<u:Value>1</u:Value>
|
||||
</Id>
|
||||
<Data z:Id="2">
|
||||
<Id>
|
||||
<u:Value>2</u:Value>
|
||||
</Id>
|
||||
<Version>17</Version>
|
||||
<_receivers z:Id="3" z:Size="1">
|
||||
<ReceiverConfig z:Id="4" i:type="n:NetReceiverConfig">
|
||||
<Id>
|
||||
<u:Value>16</u:Value>
|
||||
</Id>
|
||||
<BackColor>
|
||||
<b:knownColor>0</b:knownColor>
|
||||
<b:name i:nil="true" />
|
||||
<b:state>2</b:state>
|
||||
<b:value>4293654015</b:value>
|
||||
</BackColor>
|
||||
<BufferSize>500000</BufferSize>
|
||||
<Encoding z:Id="5">Windows-1252</Encoding>
|
||||
<LevelFilter z:Id="6" i:type="LogLevelSurrogated">
|
||||
<LevelName z:Id="7">ALL</LevelName>
|
||||
</LevelFilter>
|
||||
<LoggingFrameworkId z:Id="8">Log4net</LoggingFrameworkId>
|
||||
<Name z:Id="9">NzbDrone</Name>
|
||||
<ParserType>XML</ParserType>
|
||||
<ReadAdjacentMessages>0</ReadAdjacentMessages>
|
||||
<ReadFrom>0001-01-01T00:00:00</ReadFrom>
|
||||
<ReadUntil>0001-01-01T00:00:00</ReadUntil>
|
||||
<SourceId>0</SourceId>
|
||||
<TimeOffset>0</TimeOffset>
|
||||
<TimeZone z:Id="10">Pacific Standard Time</TimeZone>
|
||||
<UseFilter>false</UseFilter>
|
||||
<Window>18</Window>
|
||||
<n:HostName z:Id="11">localhost</n:HostName>
|
||||
<n:Port>20480</n:Port>
|
||||
<n:Protocol>Udp</n:Protocol>
|
||||
</ReceiverConfig>
|
||||
</_receivers>
|
||||
<_sources z:Id="12" z:Size="0" />
|
||||
</Data>
|
||||
<Presentation z:Id="13">
|
||||
<Id>
|
||||
<u:Value>3</u:Value>
|
||||
</Id>
|
||||
<DefaultLogLevel z:Ref="6" i:nil="true" />
|
||||
<ShowCodeDetails>false</ShowCodeDetails>
|
||||
<ShowMessageDetails>true</ShowMessageDetails>
|
||||
<ShowMultiField>true</ShowMultiField>
|
||||
<ShowOutputOnDebug>true</ShowOutputOnDebug>
|
||||
<ShowProcessDetails>false</ShowProcessDetails>
|
||||
<ToolTipLogLevel z:Id="14" i:type="LogLevelSurrogated">
|
||||
<LevelName z:Id="15">OFF</LevelName>
|
||||
</ToolTipLogLevel>
|
||||
<Version>17</Version>
|
||||
<_charts z:Id="16" z:Size="0" />
|
||||
<_columns z:Id="17" z:Size="29">
|
||||
<ColumnConfig z:Id="18">
|
||||
<Id>
|
||||
<u:Value>78</u:Value>
|
||||
</Id>
|
||||
<ClipMode>ClipRight</ClipMode>
|
||||
<FieldName z:Id="19">Id</FieldName>
|
||||
<Name z:Ref="19" i:nil="true" />
|
||||
<Position>-1</Position>
|
||||
<Width>45</Width>
|
||||
<WindowId>18</WindowId>
|
||||
</ColumnConfig>
|
||||
<ColumnConfig z:Id="20">
|
||||
<Id>
|
||||
<u:Value>79</u:Value>
|
||||
</Id>
|
||||
<ClipMode>ClipRight</ClipMode>
|
||||
<FieldName z:Id="21">OriginalTime</FieldName>
|
||||
<Name z:Ref="21" i:nil="true" />
|
||||
<Position>-1</Position>
|
||||
<Width>120</Width>
|
||||
<WindowId>18</WindowId>
|
||||
</ColumnConfig>
|
||||
<ColumnConfig z:Id="22">
|
||||
<Id>
|
||||
<u:Value>80</u:Value>
|
||||
</Id>
|
||||
<ClipMode>ClipRight</ClipMode>
|
||||
<FieldName z:Id="23">Time</FieldName>
|
||||
<Name z:Ref="23" i:nil="true" />
|
||||
<Position>1</Position>
|
||||
<Width>80</Width>
|
||||
<WindowId>18</WindowId>
|
||||
</ColumnConfig>
|
||||
<ColumnConfig z:Id="24">
|
||||
<Id>
|
||||
<u:Value>81</u:Value>
|
||||
</Id>
|
||||
<ClipMode>ClipRight</ClipMode>
|
||||
<FieldName z:Id="25">LocalTime</FieldName>
|
||||
<Name z:Ref="25" i:nil="true" />
|
||||
<Position>-1</Position>
|
||||
<Width>120</Width>
|
||||
<WindowId>18</WindowId>
|
||||
</ColumnConfig>
|
||||
<ColumnConfig z:Id="26">
|
||||
<Id>
|
||||
<u:Value>82</u:Value>
|
||||
</Id>
|
||||
<ClipMode>ClipRight</ClipMode>
|
||||
<FieldName z:Id="27">UtcTime</FieldName>
|
||||
<Name z:Ref="27" i:nil="true" />
|
||||
<Position>-1</Position>
|
||||
<Width>120</Width>
|
||||
<WindowId>18</WindowId>
|
||||
</ColumnConfig>
|
||||
<ColumnConfig z:Id="28">
|
||||
<Id>
|
||||
<u:Value>83</u:Value>
|
||||
</Id>
|
||||
<ClipMode>ClipRight</ClipMode>
|
||||
<FieldName z:Id="29">Date</FieldName>
|
||||
<Name z:Ref="29" i:nil="true" />
|
||||
<Position>-1</Position>
|
||||
<Width>70</Width>
|
||||
<WindowId>18</WindowId>
|
||||
</ColumnConfig>
|
||||
<ColumnConfig z:Id="30">
|
||||
<Id>
|
||||
<u:Value>84</u:Value>
|
||||
</Id>
|
||||
<ClipMode>ClipRight</ClipMode>
|
||||
<FieldName z:Id="31">Key</FieldName>
|
||||
<Name z:Ref="31" i:nil="true" />
|
||||
<Position>-1</Position>
|
||||
<Width>120</Width>
|
||||
<WindowId>18</WindowId>
|
||||
</ColumnConfig>
|
||||
<ColumnConfig z:Id="32">
|
||||
<Id>
|
||||
<u:Value>85</u:Value>
|
||||
</Id>
|
||||
<ClipMode>ClipRight</ClipMode>
|
||||
<FieldName z:Id="33">Level</FieldName>
|
||||
<Name z:Ref="33" i:nil="true" />
|
||||
<Position>-1</Position>
|
||||
<Width>85</Width>
|
||||
<WindowId>18</WindowId>
|
||||
</ColumnConfig>
|
||||
<ColumnConfig z:Id="34">
|
||||
<Id>
|
||||
<u:Value>86</u:Value>
|
||||
</Id>
|
||||
<ClipMode>ClipMiddle</ClipMode>
|
||||
<FieldName z:Id="35">Logger</FieldName>
|
||||
<Name z:Ref="35" i:nil="true" />
|
||||
<Position>2</Position>
|
||||
<Width>120</Width>
|
||||
<WindowId>18</WindowId>
|
||||
</ColumnConfig>
|
||||
<ColumnConfig z:Id="36">
|
||||
<Id>
|
||||
<u:Value>87</u:Value>
|
||||
</Id>
|
||||
<ClipMode>ClipRight</ClipMode>
|
||||
<FieldName z:Id="37">Source</FieldName>
|
||||
<Name z:Ref="37" i:nil="true" />
|
||||
<Position>-1</Position>
|
||||
<Width>90</Width>
|
||||
<WindowId>18</WindowId>
|
||||
</ColumnConfig>
|
||||
<ColumnConfig z:Id="38">
|
||||
<Id>
|
||||
<u:Value>88</u:Value>
|
||||
</Id>
|
||||
<ClipMode>ClipRight</ClipMode>
|
||||
<FieldName z:Id="39">Message</FieldName>
|
||||
<Name z:Ref="39" i:nil="true" />
|
||||
<Position>3</Position>
|
||||
<Width>874</Width>
|
||||
<WindowId>18</WindowId>
|
||||
</ColumnConfig>
|
||||
<ColumnConfig z:Id="40">
|
||||
<Id>
|
||||
<u:Value>89</u:Value>
|
||||
</Id>
|
||||
<ClipMode>ClipRight</ClipMode>
|
||||
<FieldName z:Id="41">Thread</FieldName>
|
||||
<Name z:Ref="41" i:nil="true" />
|
||||
<Position>-1</Position>
|
||||
<Width>95</Width>
|
||||
<WindowId>18</WindowId>
|
||||
</ColumnConfig>
|
||||
<ColumnConfig z:Id="42">
|
||||
<Id>
|
||||
<u:Value>90</u:Value>
|
||||
</Id>
|
||||
<ClipMode>ClipRight</ClipMode>
|
||||
<FieldName z:Id="43">Host</FieldName>
|
||||
<Name z:Ref="43" i:nil="true" />
|
||||
<Position>-1</Position>
|
||||
<Width>90</Width>
|
||||
<WindowId>18</WindowId>
|
||||
</ColumnConfig>
|
||||
<ColumnConfig z:Id="44">
|
||||
<Id>
|
||||
<u:Value>91</u:Value>
|
||||
</Id>
|
||||
<ClipMode>ClipRight</ClipMode>
|
||||
<FieldName z:Id="45">Exception</FieldName>
|
||||
<Name z:Ref="45" i:nil="true" />
|
||||
<Position>-1</Position>
|
||||
<Width>120</Width>
|
||||
<WindowId>18</WindowId>
|
||||
</ColumnConfig>
|
||||
<ColumnConfig z:Id="46">
|
||||
<Id>
|
||||
<u:Value>92</u:Value>
|
||||
</Id>
|
||||
<ClipMode>ClipRight</ClipMode>
|
||||
<FieldName z:Id="47">Domain</FieldName>
|
||||
<Name z:Ref="47" i:nil="true" />
|
||||
<Position>-1</Position>
|
||||
<Width>90</Width>
|
||||
<WindowId>18</WindowId>
|
||||
</ColumnConfig>
|
||||
<ColumnConfig z:Id="48">
|
||||
<Id>
|
||||
<u:Value>93</u:Value>
|
||||
</Id>
|
||||
<ClipMode>ClipRight</ClipMode>
|
||||
<FieldName z:Id="49">Identity</FieldName>
|
||||
<Name z:Ref="49" i:nil="true" />
|
||||
<Position>-1</Position>
|
||||
<Width>120</Width>
|
||||
<WindowId>18</WindowId>
|
||||
</ColumnConfig>
|
||||
<ColumnConfig z:Id="50">
|
||||
<Id>
|
||||
<u:Value>94</u:Value>
|
||||
</Id>
|
||||
<ClipMode>ClipRight</ClipMode>
|
||||
<FieldName z:Id="51">User</FieldName>
|
||||
<Name z:Ref="51" i:nil="true" />
|
||||
<Position>-1</Position>
|
||||
<Width>90</Width>
|
||||
<WindowId>18</WindowId>
|
||||
</ColumnConfig>
|
||||
<ColumnConfig z:Id="52">
|
||||
<Id>
|
||||
<u:Value>95</u:Value>
|
||||
</Id>
|
||||
<ClipMode>ClipRight</ClipMode>
|
||||
<FieldName z:Id="53">Class</FieldName>
|
||||
<Name z:Ref="53" i:nil="true" />
|
||||
<Position>-1</Position>
|
||||
<Width>90</Width>
|
||||
<WindowId>18</WindowId>
|
||||
</ColumnConfig>
|
||||
<ColumnConfig z:Id="54">
|
||||
<Id>
|
||||
<u:Value>96</u:Value>
|
||||
</Id>
|
||||
<ClipMode>ClipRight</ClipMode>
|
||||
<FieldName z:Id="55">Method</FieldName>
|
||||
<Name z:Ref="55" i:nil="true" />
|
||||
<Position>-1</Position>
|
||||
<Width>120</Width>
|
||||
<WindowId>18</WindowId>
|
||||
</ColumnConfig>
|
||||
<ColumnConfig z:Id="56">
|
||||
<Id>
|
||||
<u:Value>97</u:Value>
|
||||
</Id>
|
||||
<ClipMode>ClipRight</ClipMode>
|
||||
<FieldName z:Id="57">File</FieldName>
|
||||
<Name z:Ref="57" i:nil="true" />
|
||||
<Position>-1</Position>
|
||||
<Width>120</Width>
|
||||
<WindowId>18</WindowId>
|
||||
</ColumnConfig>
|
||||
<ColumnConfig z:Id="58">
|
||||
<Id>
|
||||
<u:Value>98</u:Value>
|
||||
</Id>
|
||||
<ClipMode>ClipRight</ClipMode>
|
||||
<FieldName z:Id="59">Line</FieldName>
|
||||
<Name z:Ref="59" i:nil="true" />
|
||||
<Position>-1</Position>
|
||||
<Width>45</Width>
|
||||
<WindowId>18</WindowId>
|
||||
</ColumnConfig>
|
||||
<ColumnConfig z:Id="60">
|
||||
<Id>
|
||||
<u:Value>99</u:Value>
|
||||
</Id>
|
||||
<ClipMode>ClipRight</ClipMode>
|
||||
<FieldName z:Id="61">NDC</FieldName>
|
||||
<Name z:Ref="61" i:nil="true" />
|
||||
<Position>-1</Position>
|
||||
<Width>120</Width>
|
||||
<WindowId>18</WindowId>
|
||||
</ColumnConfig>
|
||||
<ColumnConfig z:Id="62">
|
||||
<Id>
|
||||
<u:Value>100</u:Value>
|
||||
</Id>
|
||||
<ClipMode>ClipRight</ClipMode>
|
||||
<FieldName z:Id="63">MDC</FieldName>
|
||||
<Name z:Ref="63" i:nil="true" />
|
||||
<Position>-1</Position>
|
||||
<Width>120</Width>
|
||||
<WindowId>18</WindowId>
|
||||
</ColumnConfig>
|
||||
<ColumnConfig z:Id="64">
|
||||
<Id>
|
||||
<u:Value>101</u:Value>
|
||||
</Id>
|
||||
<ClipMode>ClipRight</ClipMode>
|
||||
<FieldName z:Id="65">Comment</FieldName>
|
||||
<Name z:Ref="65" i:nil="true" />
|
||||
<Position>-1</Position>
|
||||
<Width>120</Width>
|
||||
<WindowId>18</WindowId>
|
||||
</ColumnConfig>
|
||||
<ColumnConfig z:Id="66">
|
||||
<Id>
|
||||
<u:Value>102</u:Value>
|
||||
</Id>
|
||||
<ClipMode>ClipRight</ClipMode>
|
||||
<FieldName z:Id="67">StackTrace</FieldName>
|
||||
<Name z:Ref="67" i:nil="true" />
|
||||
<Position>-1</Position>
|
||||
<Width>120</Width>
|
||||
<WindowId>18</WindowId>
|
||||
</ColumnConfig>
|
||||
<ColumnConfig z:Id="68">
|
||||
<Id>
|
||||
<u:Value>103</u:Value>
|
||||
</Id>
|
||||
<ClipMode>ClipRight</ClipMode>
|
||||
<FieldName z:Id="69">ProcessId</FieldName>
|
||||
<Name z:Ref="69" i:nil="true" />
|
||||
<Position>-1</Position>
|
||||
<Width>120</Width>
|
||||
<WindowId>18</WindowId>
|
||||
</ColumnConfig>
|
||||
<ColumnConfig z:Id="70">
|
||||
<Id>
|
||||
<u:Value>104</u:Value>
|
||||
</Id>
|
||||
<ClipMode>ClipRight</ClipMode>
|
||||
<FieldName z:Id="71">ThreadId</FieldName>
|
||||
<Name z:Ref="71" i:nil="true" />
|
||||
<Position>-1</Position>
|
||||
<Width>120</Width>
|
||||
<WindowId>18</WindowId>
|
||||
</ColumnConfig>
|
||||
<ColumnConfig z:Id="72">
|
||||
<Id>
|
||||
<u:Value>105</u:Value>
|
||||
</Id>
|
||||
<ClipMode>ClipRight</ClipMode>
|
||||
<FieldName z:Id="73">CallStack</FieldName>
|
||||
<Name z:Ref="73" i:nil="true" />
|
||||
<Position>-1</Position>
|
||||
<Width>120</Width>
|
||||
<WindowId>18</WindowId>
|
||||
</ColumnConfig>
|
||||
<ColumnConfig z:Id="74">
|
||||
<Id>
|
||||
<u:Value>106</u:Value>
|
||||
</Id>
|
||||
<ClipMode>ClipRight</ClipMode>
|
||||
<FieldName z:Id="75">assembly</FieldName>
|
||||
<Name z:Ref="75" i:nil="true" />
|
||||
<Position>-1</Position>
|
||||
<Width>120</Width>
|
||||
<WindowId>18</WindowId>
|
||||
</ColumnConfig>
|
||||
</_columns>
|
||||
<_filters z:Id="76" z:Size="0" />
|
||||
<_formats z:Id="77" z:Size="1">
|
||||
<FormatConfig z:Id="78">
|
||||
<Id>
|
||||
<u:Value>0</u:Value>
|
||||
</Id>
|
||||
<ConditionFieldName z:Ref="39" i:nil="true" />
|
||||
<ConditionRelation z:Id="79"></ConditionRelation>
|
||||
<ConditionText z:Ref="79" i:nil="true" />
|
||||
<Formats z:Id="80" z:Size="12">
|
||||
<a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
|
||||
<a:Key z:Id="81" i:type="LogLevelSurrogated">
|
||||
<LevelName z:Id="82">VERBOSE</LevelName>
|
||||
</a:Key>
|
||||
<a:Value z:Id="83">
|
||||
<Id>
|
||||
<u:Value>4</u:Value>
|
||||
</Id>
|
||||
<Backcolor>
|
||||
<b:knownColor>0</b:knownColor>
|
||||
<b:name i:nil="true" />
|
||||
<b:state>0</b:state>
|
||||
<b:value>0</b:value>
|
||||
</Backcolor>
|
||||
<FontName z:Id="84">Tahoma</FontName>
|
||||
<Forecolor>
|
||||
<b:knownColor>0</b:knownColor>
|
||||
<b:name i:nil="true" />
|
||||
<b:state>2</b:state>
|
||||
<b:value>4290032820</b:value>
|
||||
</Forecolor>
|
||||
<Loglevel z:Ref="81" i:nil="true" />
|
||||
<Size>8.25</Size>
|
||||
<Style>Regular</Style>
|
||||
</a:Value>
|
||||
</a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
|
||||
<a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
|
||||
<a:Key z:Id="85" i:type="LogLevelSurrogated">
|
||||
<LevelName z:Id="86">TRACE</LevelName>
|
||||
</a:Key>
|
||||
<a:Value z:Id="87">
|
||||
<Id>
|
||||
<u:Value>5</u:Value>
|
||||
</Id>
|
||||
<Backcolor>
|
||||
<b:knownColor>0</b:knownColor>
|
||||
<b:name i:nil="true" />
|
||||
<b:state>0</b:state>
|
||||
<b:value>0</b:value>
|
||||
</Backcolor>
|
||||
<FontName z:Id="88">Tahoma</FontName>
|
||||
<Forecolor>
|
||||
<b:knownColor>0</b:knownColor>
|
||||
<b:name i:nil="true" />
|
||||
<b:state>2</b:state>
|
||||
<b:value>4288716960</b:value>
|
||||
</Forecolor>
|
||||
<Loglevel z:Ref="85" i:nil="true" />
|
||||
<Size>8.25</Size>
|
||||
<Style>Regular</Style>
|
||||
</a:Value>
|
||||
</a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
|
||||
<a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
|
||||
<a:Key z:Id="89" i:type="LogLevelSurrogated">
|
||||
<LevelName z:Id="90">DEBUG</LevelName>
|
||||
</a:Key>
|
||||
<a:Value z:Id="91">
|
||||
<Id>
|
||||
<u:Value>6</u:Value>
|
||||
</Id>
|
||||
<Backcolor>
|
||||
<b:knownColor>0</b:knownColor>
|
||||
<b:name i:nil="true" />
|
||||
<b:state>0</b:state>
|
||||
<b:value>0</b:value>
|
||||
</Backcolor>
|
||||
<FontName z:Id="92">Tahoma</FontName>
|
||||
<Forecolor>
|
||||
<b:knownColor>0</b:knownColor>
|
||||
<b:name i:nil="true" />
|
||||
<b:state>2</b:state>
|
||||
<b:value>4286743170</b:value>
|
||||
</Forecolor>
|
||||
<Loglevel z:Ref="89" i:nil="true" />
|
||||
<Size>8.25</Size>
|
||||
<Style>Regular</Style>
|
||||
</a:Value>
|
||||
</a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
|
||||
<a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
|
||||
<a:Key z:Id="93" i:type="LogLevelSurrogated">
|
||||
<LevelName z:Id="94">INFO</LevelName>
|
||||
</a:Key>
|
||||
<a:Value z:Id="95">
|
||||
<Id>
|
||||
<u:Value>7</u:Value>
|
||||
</Id>
|
||||
<Backcolor>
|
||||
<b:knownColor>0</b:knownColor>
|
||||
<b:name i:nil="true" />
|
||||
<b:state>0</b:state>
|
||||
<b:value>0</b:value>
|
||||
</Backcolor>
|
||||
<FontName z:Id="96">Tahoma</FontName>
|
||||
<Forecolor>
|
||||
<b:knownColor>0</b:knownColor>
|
||||
<b:name i:nil="true" />
|
||||
<b:state>2</b:state>
|
||||
<b:value>4278190080</b:value>
|
||||
</Forecolor>
|
||||
<Loglevel z:Ref="93" i:nil="true" />
|
||||
<Size>8.25</Size>
|
||||
<Style>Regular</Style>
|
||||
</a:Value>
|
||||
</a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
|
||||
<a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
|
||||
<a:Key z:Id="97" i:type="LogLevelSurrogated">
|
||||
<LevelName z:Id="98">NOTICE</LevelName>
|
||||
</a:Key>
|
||||
<a:Value z:Id="99">
|
||||
<Id>
|
||||
<u:Value>8</u:Value>
|
||||
</Id>
|
||||
<Backcolor>
|
||||
<b:knownColor>0</b:knownColor>
|
||||
<b:name i:nil="true" />
|
||||
<b:state>0</b:state>
|
||||
<b:value>0</b:value>
|
||||
</Backcolor>
|
||||
<FontName z:Id="100">Tahoma</FontName>
|
||||
<Forecolor>
|
||||
<b:knownColor>0</b:knownColor>
|
||||
<b:name i:nil="true" />
|
||||
<b:state>2</b:state>
|
||||
<b:value>4281957177</b:value>
|
||||
</Forecolor>
|
||||
<Loglevel z:Ref="97" i:nil="true" />
|
||||
<Size>8.25</Size>
|
||||
<Style>Regular</Style>
|
||||
</a:Value>
|
||||
</a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
|
||||
<a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
|
||||
<a:Key z:Id="101" i:type="LogLevelSurrogated">
|
||||
<LevelName z:Id="102">WARN</LevelName>
|
||||
</a:Key>
|
||||
<a:Value z:Id="103">
|
||||
<Id>
|
||||
<u:Value>9</u:Value>
|
||||
</Id>
|
||||
<Backcolor>
|
||||
<b:knownColor>0</b:knownColor>
|
||||
<b:name i:nil="true" />
|
||||
<b:state>0</b:state>
|
||||
<b:value>0</b:value>
|
||||
</Backcolor>
|
||||
<FontName z:Id="104">Tahoma</FontName>
|
||||
<Forecolor>
|
||||
<b:knownColor>0</b:knownColor>
|
||||
<b:name i:nil="true" />
|
||||
<b:state>2</b:state>
|
||||
<b:value>4294934528</b:value>
|
||||
</Forecolor>
|
||||
<Loglevel z:Ref="101" i:nil="true" />
|
||||
<Size>8.25</Size>
|
||||
<Style>Regular</Style>
|
||||
</a:Value>
|
||||
</a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
|
||||
<a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
|
||||
<a:Key z:Id="105" i:type="LogLevelSurrogated">
|
||||
<LevelName z:Id="106">ERROR</LevelName>
|
||||
</a:Key>
|
||||
<a:Value z:Id="107">
|
||||
<Id>
|
||||
<u:Value>10</u:Value>
|
||||
</Id>
|
||||
<Backcolor>
|
||||
<b:knownColor>0</b:knownColor>
|
||||
<b:name i:nil="true" />
|
||||
<b:state>0</b:state>
|
||||
<b:value>0</b:value>
|
||||
</Backcolor>
|
||||
<FontName z:Id="108">Tahoma</FontName>
|
||||
<Forecolor>
|
||||
<b:knownColor>0</b:knownColor>
|
||||
<b:name i:nil="true" />
|
||||
<b:state>2</b:state>
|
||||
<b:value>4294901760</b:value>
|
||||
</Forecolor>
|
||||
<Loglevel z:Ref="105" i:nil="true" />
|
||||
<Size>8.25</Size>
|
||||
<Style>Regular</Style>
|
||||
</a:Value>
|
||||
</a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
|
||||
<a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
|
||||
<a:Key z:Id="109" i:type="LogLevelSurrogated">
|
||||
<LevelName z:Id="110">SEVERE</LevelName>
|
||||
</a:Key>
|
||||
<a:Value z:Id="111">
|
||||
<Id>
|
||||
<u:Value>11</u:Value>
|
||||
</Id>
|
||||
<Backcolor>
|
||||
<b:knownColor>0</b:knownColor>
|
||||
<b:name i:nil="true" />
|
||||
<b:state>0</b:state>
|
||||
<b:value>0</b:value>
|
||||
</Backcolor>
|
||||
<FontName z:Id="112">Tahoma</FontName>
|
||||
<Forecolor>
|
||||
<b:knownColor>0</b:knownColor>
|
||||
<b:name i:nil="true" />
|
||||
<b:state>2</b:state>
|
||||
<b:value>4293067295</b:value>
|
||||
</Forecolor>
|
||||
<Loglevel z:Ref="109" i:nil="true" />
|
||||
<Size>8.25</Size>
|
||||
<Style>Regular</Style>
|
||||
</a:Value>
|
||||
</a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
|
||||
<a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
|
||||
<a:Key z:Id="113" i:type="LogLevelSurrogated">
|
||||
<LevelName z:Id="114">CRITICAL</LevelName>
|
||||
</a:Key>
|
||||
<a:Value z:Id="115">
|
||||
<Id>
|
||||
<u:Value>12</u:Value>
|
||||
</Id>
|
||||
<Backcolor>
|
||||
<b:knownColor>0</b:knownColor>
|
||||
<b:name i:nil="true" />
|
||||
<b:state>0</b:state>
|
||||
<b:value>0</b:value>
|
||||
</Backcolor>
|
||||
<FontName z:Id="116">Tahoma</FontName>
|
||||
<Forecolor>
|
||||
<b:knownColor>0</b:knownColor>
|
||||
<b:name i:nil="true" />
|
||||
<b:state>2</b:state>
|
||||
<b:value>4289400377</b:value>
|
||||
</Forecolor>
|
||||
<Loglevel z:Ref="113" i:nil="true" />
|
||||
<Size>8.25</Size>
|
||||
<Style>Regular</Style>
|
||||
</a:Value>
|
||||
</a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
|
||||
<a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
|
||||
<a:Key z:Id="117" i:type="LogLevelSurrogated">
|
||||
<LevelName z:Id="118">ALERT</LevelName>
|
||||
</a:Key>
|
||||
<a:Value z:Id="119">
|
||||
<Id>
|
||||
<u:Value>13</u:Value>
|
||||
</Id>
|
||||
<Backcolor>
|
||||
<b:knownColor>0</b:knownColor>
|
||||
<b:name i:nil="true" />
|
||||
<b:state>0</b:state>
|
||||
<b:value>0</b:value>
|
||||
</Backcolor>
|
||||
<FontName z:Id="120">Tahoma</FontName>
|
||||
<Forecolor>
|
||||
<b:knownColor>0</b:knownColor>
|
||||
<b:name i:nil="true" />
|
||||
<b:state>2</b:state>
|
||||
<b:value>4294902015</b:value>
|
||||
</Forecolor>
|
||||
<Loglevel z:Ref="117" i:nil="true" />
|
||||
<Size>8.25</Size>
|
||||
<Style>Regular</Style>
|
||||
</a:Value>
|
||||
</a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
|
||||
<a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
|
||||
<a:Key z:Id="121" i:type="LogLevelSurrogated">
|
||||
<LevelName z:Id="122">FATAL</LevelName>
|
||||
</a:Key>
|
||||
<a:Value z:Id="123">
|
||||
<Id>
|
||||
<u:Value>14</u:Value>
|
||||
</Id>
|
||||
<Backcolor>
|
||||
<b:knownColor>0</b:knownColor>
|
||||
<b:name i:nil="true" />
|
||||
<b:state>0</b:state>
|
||||
<b:value>0</b:value>
|
||||
</Backcolor>
|
||||
<FontName z:Id="124">Tahoma</FontName>
|
||||
<Forecolor>
|
||||
<b:knownColor>0</b:knownColor>
|
||||
<b:name i:nil="true" />
|
||||
<b:state>2</b:state>
|
||||
<b:value>4287309977</b:value>
|
||||
</Forecolor>
|
||||
<Loglevel z:Ref="121" i:nil="true" />
|
||||
<Size>8.25</Size>
|
||||
<Style>Regular</Style>
|
||||
</a:Value>
|
||||
</a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
|
||||
<a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
|
||||
<a:Key z:Id="125" i:type="LogLevelSurrogated">
|
||||
<LevelName z:Id="126">EMERGENCY</LevelName>
|
||||
</a:Key>
|
||||
<a:Value z:Id="127">
|
||||
<Id>
|
||||
<u:Value>15</u:Value>
|
||||
</Id>
|
||||
<Backcolor>
|
||||
<b:knownColor>0</b:knownColor>
|
||||
<b:name i:nil="true" />
|
||||
<b:state>0</b:state>
|
||||
<b:value>0</b:value>
|
||||
</Backcolor>
|
||||
<FontName z:Id="128">Tahoma</FontName>
|
||||
<Forecolor>
|
||||
<b:knownColor>0</b:knownColor>
|
||||
<b:name i:nil="true" />
|
||||
<b:state>2</b:state>
|
||||
<b:value>4285932413</b:value>
|
||||
</Forecolor>
|
||||
<Loglevel z:Ref="125" i:nil="true" />
|
||||
<Size>8.25</Size>
|
||||
<Style>Regular</Style>
|
||||
</a:Value>
|
||||
</a:KeyValueOfLogLevelLoggerFormatConfigxIppDzWS>
|
||||
</Formats>
|
||||
<IgnoreCase>false</IgnoreCase>
|
||||
<Name z:Id="129">Default Format Settings</Name>
|
||||
</FormatConfig>
|
||||
</_formats>
|
||||
<_logLevels z:Id="130" z:Size="0" />
|
||||
<_loggers z:Id="131" z:Size="1">
|
||||
<LoggerConfig z:Id="132">
|
||||
<Id>
|
||||
<u:Value>77</u:Value>
|
||||
</Id>
|
||||
<LogLevel z:Ref="6" i:nil="true" />
|
||||
<LoggerPath z:Ref="79" i:nil="true" />
|
||||
<ReceiverId>16</ReceiverId>
|
||||
</LoggerConfig>
|
||||
</_loggers>
|
||||
</Presentation>
|
||||
<Version>17</Version>
|
||||
</Config>
|
||||
BIN
Logo/1024.png
|
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 62 KiB |
BIN
Logo/128.png
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 7.1 KiB |
BIN
Logo/16.png
|
Before Width: | Height: | Size: 490 B After Width: | Height: | Size: 707 B |
BIN
Logo/256.png
|
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 15 KiB |
BIN
Logo/32.png
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.6 KiB |
BIN
Logo/400.png
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 22 KiB |
BIN
Logo/48.png
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 2.5 KiB |
BIN
Logo/512.png
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 31 KiB |
BIN
Logo/64.png
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 3.5 KiB |
BIN
Logo/800.png
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 4.2 KiB |
2
NzbDrone.sln.DotSettings
Normal file
@@ -0,0 +1,2 @@
|
||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:Boolean x:Key="/Default/Environment/ExternalSources/Decompiler/DecompileMethodBodies/@EntryValue">True</s:Boolean></wpf:ResourceDictionary>
|
||||
52
README.md
@@ -1,52 +0,0 @@
|
||||
# Sonarr
|
||||
|
||||
Sonarr is a PVR for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new episodes of your favorite shows and will grab, sort and rename them. It can also be configured to automatically upgrade the quality of files already downloaded when a better quality format becomes available.
|
||||
|
||||
## Major Features Include:
|
||||
|
||||
* Support for major platforms: Windows, Linux, macOS, Raspberry Pi, etc.
|
||||
* Automatically detects new episodes
|
||||
* Can scan your existing library and download any missing episodes
|
||||
* Can watch for better quality of the episodes you already have and do an automatic upgrade. *eg. from DVD to Blu-Ray*
|
||||
* Automatic failed download handling will try another release if one fails
|
||||
* Manual search so you can pick any release or to see why a release was not downloaded automatically
|
||||
* Fully configurable episode renaming
|
||||
* Full integration with SABnzbd and NZBGet
|
||||
* Full integration with Kodi, Plex (notification, library update, metadata)
|
||||
* Full support for specials and multi-episode releases
|
||||
* And a beautiful UI
|
||||
|
||||
## Configuring Development Environment:
|
||||
|
||||
### Requirements
|
||||
|
||||
* Visual Studio 2015 (https://www.visualstudio.com/vs/)
|
||||
* [Git](https://git-scm.com/downloads)
|
||||
* [NodeJS](https://nodejs.org/en/download/)
|
||||
|
||||
### Setup
|
||||
|
||||
* Make sure all the required software mentioned above are installed.
|
||||
* Clone the repository into your development machine. [*info*](https://help.github.com/articles/working-with-repositories)
|
||||
* Grab the submodules `git submodule init && git submodule update`
|
||||
* Install the required Node Packages `npm install`
|
||||
* Start gulp to monitor your dev environment for any changes that need post processing using `npm start` command.
|
||||
|
||||
*Please note gulp must be running at all times while you are working with Sonarr client source files.*
|
||||
|
||||
### Development
|
||||
|
||||
* Open `NzbDrone.sln` in Visual Studio
|
||||
* Make sure `NzbDrone.Console` is set as the startup project
|
||||
|
||||
### License
|
||||
|
||||
* [GNU GPL v3](http://www.gnu.org/licenses/gpl.html)
|
||||
* Copyright 2010-2017
|
||||
|
||||
### Sponsors
|
||||
|
||||
* [JetBrains](http://www.jetbrains.com/) for providing us with free licenses to their great tools
|
||||
* [ReSharper](http://www.jetbrains.com/resharper/)
|
||||
* [WebStorm](http://www.jetbrains.com/webstorm/)
|
||||
* [TeamCity](http://www.jetbrains.com/teamcity/)
|
||||
258
build.ps1
@@ -1 +1,257 @@
|
||||
Write-Warning "DEPRECATED -- Please use build.sh instead."
|
||||
$msBuild = 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe'
|
||||
$outputFolder = '.\_output'
|
||||
$outputFolderMono = '.\_output_mono'
|
||||
$outputFolderOsx = '.\_output_osx'
|
||||
$outputFolderOsxApp = '.\_output_osx_app'
|
||||
$testPackageFolder = '.\_tests\'
|
||||
$testSearchPattern = '*.Test\bin\x86\Release'
|
||||
$sourceFolder = '.\src'
|
||||
$updateFolder = $outputFolder + '\NzbDrone.Update'
|
||||
$updateFolderMono = $outputFolderMono + '\NzbDrone.Update'
|
||||
|
||||
Function Build()
|
||||
{
|
||||
Write-Host "##teamcity[progressStart 'Build']"
|
||||
|
||||
$clean = $msbuild + " src\nzbdrone.sln /t:Clean /m"
|
||||
$build = $msbuild + " src\nzbdrone.sln /p:Configuration=Release /p:Platform=x86 /t:Build /m"
|
||||
|
||||
if(Test-Path $outputFolder)
|
||||
{
|
||||
Remove-Item -Recurse -Force $outputFolder -ErrorAction Continue
|
||||
}
|
||||
|
||||
Invoke-Expression $clean
|
||||
CheckExitCode
|
||||
|
||||
Invoke-Expression $build
|
||||
CheckExitCode
|
||||
|
||||
CleanFolder $outputFolder
|
||||
|
||||
AddJsonNet
|
||||
|
||||
Write-Host "Removing Mono.Posix.dll"
|
||||
Remove-Item "$outputFolder\Mono.Posix.dll"
|
||||
|
||||
Write-Host "##teamcity[progressFinish 'Build']"
|
||||
}
|
||||
|
||||
Function CleanFolder($path, $keepConfigFiles)
|
||||
{
|
||||
Write-Host Removing XMLDoc files
|
||||
get-childitem $path -File -Filter *.xml -Recurse | foreach ($_) {
|
||||
|
||||
$filename = $_.FullName
|
||||
$exeFilename = $filename -replace "xml", "exe"
|
||||
$dllFilename = $filename -replace "xml", "dll"
|
||||
|
||||
if (Test-Path $exeFilename) {
|
||||
remove-item $_.fullname
|
||||
}
|
||||
|
||||
if (Test-Path $dllFilename) {
|
||||
remove-item $_.fullname
|
||||
}
|
||||
}
|
||||
|
||||
get-childitem $path -File -Filter *.transform -Recurse | foreach ($_) {remove-item $_.fullname}
|
||||
|
||||
if($keepConfigFiles -ne $true)
|
||||
{
|
||||
get-childitem $path -File -Filter *.dll.config -Recurse | foreach ($_) {remove-item $_.fullname}
|
||||
}
|
||||
|
||||
Write-Host Removing FluentValidation.Resources files
|
||||
get-childitem $path -File -Filter FluentValidation.resources.dll -recurse | foreach ($_) {remove-item $_.fullname}
|
||||
|
||||
get-childitem $path -File -Filter app.config -Recurse | foreach ($_) {remove-item $_.fullname}
|
||||
|
||||
Write-Host Removing .less files
|
||||
get-childitem $path -File -Filter *.less -Recurse | foreach ($_) {remove-item $_.fullname}
|
||||
|
||||
Write-Host Removing vshost files
|
||||
get-childitem $path -File -Filter *.vshost.exe -Recurse | foreach ($_) {remove-item $_.fullname}
|
||||
|
||||
if(Test-Path $$path\NuGet)
|
||||
{
|
||||
Write-Host Removing NuGet
|
||||
Remove-Item -Recurse -Force "$path\NuGet"
|
||||
}
|
||||
|
||||
Write-Host Removing Empty folders
|
||||
while (Get-ChildItem $path -recurse | where {!@(Get-ChildItem -force $_.fullname)} | Test-Path)
|
||||
{
|
||||
Get-ChildItem $path -Directory -recurse | where {!@(Get-ChildItem -force $_.fullname)} | Remove-Item
|
||||
}
|
||||
}
|
||||
|
||||
Function PackageMono()
|
||||
{
|
||||
Write-Host "##teamcity[progressStart 'Creating Mono Package']"
|
||||
|
||||
if(Test-Path $outputFolderMono)
|
||||
{
|
||||
Remove-Item -Recurse -Force $outputFolderMono -ErrorAction Continue
|
||||
}
|
||||
|
||||
Copy-Item $outputFolder $outputFolderMono -recurse
|
||||
|
||||
Write-Host Creating MDBs
|
||||
get-childitem $outputFolderMono -File -Include @("*.exe", "*.dll") -Exclude @("MediaInfo.dll", "sqlite3.dll") -Recurse | foreach ($_) {
|
||||
Write-Host "Creating .mdb for $_"
|
||||
& "tools\pdb2mdb\pdb2mdb.exe" $_.fullname
|
||||
}
|
||||
|
||||
Write-Host Removing PDBs
|
||||
get-childitem $outputFolderMono -File -Filter *.pdb -Recurse | foreach ($_) {remove-item $_.fullname}
|
||||
|
||||
Write-Host Removing Service helpers
|
||||
get-childitem $outputFolderMono -File -Filter ServiceUninstall.* -Recurse | foreach ($_) {remove-item $_.fullname}
|
||||
get-childitem $outputFolderMono -File -Filter ServiceInstall.* -Recurse | foreach ($_) {remove-item $_.fullname}
|
||||
|
||||
Write-Host Removing native windows binaries Sqlite, MediaInfo
|
||||
get-childitem $outputFolderMono -File -Filter sqlite3.* -Recurse | foreach ($_) {remove-item $_.fullname}
|
||||
get-childitem $outputFolderMono -File -Filter MediaInfo.* -Recurse | foreach ($_) {remove-item $_.fullname}
|
||||
|
||||
Write-Host "Adding NzbDrone.Core.dll.config (for dllmap)"
|
||||
Copy-Item "$sourceFolder\NzbDrone.Core\NzbDrone.Core.dll.config" $outputFolderMono
|
||||
|
||||
Write-Host Renaming NzbDrone.Console.exe to NzbDrone.exe
|
||||
Get-ChildItem $outputFolderMono -File -Filter "NzbDrone.exe*" -Recurse | foreach ($_) {remove-item $_.fullname}
|
||||
|
||||
Write-Host Removing NzbDrone.Windows
|
||||
get-childitem $outputFolderMono -File -Filter NzbDrone.Windows.* -Recurse | foreach ($_) {remove-item $_.fullname}
|
||||
|
||||
Get-ChildItem $outputFolderMono -File -Filter "NzbDrone.Console.exe*" -Recurse | foreach ($_) {
|
||||
$newName = $_.fullname -Replace ".Console",""
|
||||
|
||||
Rename-Item $_.fullname $newName
|
||||
}
|
||||
|
||||
Write-Host Adding NzbDrone.Mono to UpdatePackage
|
||||
Copy-Item $outputFolderMono\* $updateFolderMono -Filter NzbDrone.Mono.*
|
||||
|
||||
Write-Host "##teamcity[progressFinish 'Creating Mono Package']"
|
||||
}
|
||||
|
||||
Function PackageOsx()
|
||||
{
|
||||
Write-Host "##teamcity[progressStart 'Creating OS X Package']"
|
||||
|
||||
if(Test-Path $outputFolderOsx)
|
||||
{
|
||||
Remove-Item -Recurse -Force $outputFolderOsx -ErrorAction Continue
|
||||
}
|
||||
|
||||
Copy-Item $outputFolderMono $outputFolderOsx -recurse
|
||||
|
||||
Write-Host "Adding sqlite dylibs"
|
||||
Copy-Item "$sourceFolder\Libraries\sqlite\*.dylib" "$outputFolderOsx"
|
||||
|
||||
Write-Host "Adding MediaInfo dylib"
|
||||
Copy-Item "$sourceFolder\Libraries\MediaInfo\*.dylib" "$outputFolderOsx"
|
||||
|
||||
Write-Host "Adding Startup script"
|
||||
Copy-Item .\osx\Sonarr "$outputFolderOsx"
|
||||
|
||||
Write-Host "##teamcity[progressFinish 'Creating OS X Package']"
|
||||
}
|
||||
|
||||
|
||||
Function PackageOsxApp()
|
||||
{
|
||||
Write-Host "##teamcity[progressStart 'Creating OS X App Package']"
|
||||
|
||||
if(Test-Path $outputFolderOsxApp)
|
||||
{
|
||||
Remove-Item -Recurse -Force $outputFolderOsxApp -ErrorAction Continue
|
||||
}
|
||||
|
||||
Copy-Item .\osx\Sonarr.app $outputFolderOsxApp\Sonarr.app -recurse
|
||||
Copy-Item $outputFolderOsx $outputFolderOsxApp\Sonarr.app\Contents\MacOS -recurse
|
||||
|
||||
Write-Host "##teamcity[progressFinish 'Creating OS X App Package']"
|
||||
}
|
||||
|
||||
Function AddJsonNet()
|
||||
{
|
||||
get-childitem $outputFolder -File -Filter Newtonsoft.Json.* -Recurse | foreach ($_) {remove-item $_.fullname}
|
||||
Copy-Item .\src\packages\Newtonsoft.Json.*.*\lib\net35\*.dll -Destination $outputFolder
|
||||
Copy-Item .\src\packages\Newtonsoft.Json.*.*\lib\net35\*.dll -Destination $outputFolder\NzbDrone.Update
|
||||
}
|
||||
|
||||
Function PackageTests()
|
||||
{
|
||||
|
||||
Write-Host Packaging Tests
|
||||
Write-Host "##teamcity[progressStart 'Creating Test Package']"
|
||||
|
||||
if(Test-Path $testPackageFolder)
|
||||
{
|
||||
Remove-Item -Recurse -Force $testPackageFolder -ErrorAction Continue
|
||||
}
|
||||
|
||||
Get-ChildItem -Recurse -Directory | Where-Object {$_.FullName -like $testSearchPattern} | foreach($_){
|
||||
Copy-Item -Recurse ($_.FullName + "\*") $testPackageFolder -ErrorAction Ignore
|
||||
}
|
||||
|
||||
.\src\.nuget\NuGet.exe install NUnit.Runners -Version 2.6.1 -Output $testPackageFolder
|
||||
|
||||
Copy-Item $outputFolder\*.dll -Destination $testPackageFolder -Force
|
||||
Copy-Item $outputFolder\*.pdb -Destination $testPackageFolder -Force
|
||||
Copy-Item .\*.sh -Destination $testPackageFolder -Force
|
||||
|
||||
Write-Host Creating MDBs for tests
|
||||
get-childitem $testPackageFolder -File -Include @("*.exe", "*.dll") -Exclude @("MediaInfo.dll", "sqlite3.dll") -Recurse | foreach ($_) {
|
||||
Write-Host "Creating .mdb for $_"
|
||||
& "tools\pdb2mdb\pdb2mdb.exe" $_.fullname
|
||||
}
|
||||
|
||||
get-childitem $testPackageFolder -File -Filter *log.config | foreach ($_) {remove-item $_.fullname}
|
||||
|
||||
CleanFolder $testPackageFolder $true
|
||||
|
||||
Write-Host "Adding NzbDrone.Core.dll.config (for dllmap)"
|
||||
Copy-Item "$sourceFolder\NzbDrone.Core\NzbDrone.Core.dll.config" -Destination $testPackageFolder -Force
|
||||
|
||||
Write-Host "##teamcity[progressFinish 'Creating Test Package']"
|
||||
}
|
||||
|
||||
Function RunGulp()
|
||||
{
|
||||
Write-Host "##teamcity[progressStart 'Running Gulp']"
|
||||
Invoke-Expression 'npm install'
|
||||
CheckExitCode
|
||||
|
||||
Invoke-Expression 'gulp build' -ErrorAction Continue -Verbose
|
||||
CheckExitCode
|
||||
|
||||
Write-Host "##teamcity[progressFinish 'Running Gulp']"
|
||||
}
|
||||
|
||||
Function CheckExitCode()
|
||||
{
|
||||
if ($lastexitcode -ne 0)
|
||||
{
|
||||
Write-Host $errorMessage
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
Function CleanupWindowsPackage()
|
||||
{
|
||||
Write-Host Removing NzbDrone.Mono
|
||||
get-childitem $outputFolder -File -Filter NzbDrone.Mono.* -Recurse | foreach ($_) {remove-item $_.fullname}
|
||||
|
||||
Write-Host Adding NzbDrone.Windows to UpdatePackage
|
||||
Copy-Item $outputFolder\* $updateFolder -Filter NzbDrone.Windows.*
|
||||
}
|
||||
|
||||
Build
|
||||
RunGulp
|
||||
PackageMono
|
||||
PackageOsx
|
||||
PackageOsxApp
|
||||
PackageTests
|
||||
CleanupWindowsPackage
|
||||
|
||||
254
build.sh
@@ -1,254 +0,0 @@
|
||||
#! /bin/bash
|
||||
msBuild='/c/Program Files (x86)/MSBuild/14.0/Bin'
|
||||
outputFolder='./_output'
|
||||
outputFolderMono='./_output_mono'
|
||||
outputFolderOsx='./_output_osx'
|
||||
outputFolderOsxApp='./_output_osx_app'
|
||||
testPackageFolder='./_tests/'
|
||||
testSearchPattern='*.Test/bin/x86/Release'
|
||||
sourceFolder='./src'
|
||||
slnFile=$sourceFolder/NzbDrone.sln
|
||||
updateFolder=$outputFolder/NzbDrone.Update
|
||||
updateFolderMono=$outputFolderMono/NzbDrone.Update
|
||||
|
||||
nuget='tools/nuget/nuget.exe';
|
||||
CheckExitCode()
|
||||
{
|
||||
"$@"
|
||||
local status=$?
|
||||
if [ $status -ne 0 ]; then
|
||||
echo "error with $1" >&2
|
||||
exit 1
|
||||
fi
|
||||
return $status
|
||||
}
|
||||
|
||||
CleanFolder()
|
||||
{
|
||||
local path=$1
|
||||
local keepConfigFiles=$2
|
||||
|
||||
|
||||
find $path -name "*.transform" -exec rm "{}" \;
|
||||
|
||||
if [ $keepConfigFiles != true ] ; then
|
||||
find $path -name "*.dll.config" -exec rm "{}" \;
|
||||
fi
|
||||
|
||||
echo "Removing FluentValidation.Resources files"
|
||||
find $path -name "FluentValidation.resources.dll" -exec rm "{}" \;
|
||||
find $path -name "App.config" -exec rm "{}" \;
|
||||
|
||||
echo "Removing .less files"
|
||||
find $path -name "*.less" -exec rm "{}" \;
|
||||
|
||||
echo "Removing vshost files"
|
||||
find $path -name "*.vshost.exe" -exec rm "{}" \;
|
||||
|
||||
echo "Removing dylib files"
|
||||
find $path -name "*.dylib" -exec rm "{}" \;
|
||||
|
||||
echo "Removing Empty folders"
|
||||
find $path -depth -empty -type d -exec rm -r "{}" \;
|
||||
}
|
||||
|
||||
BuildWithMSBuild()
|
||||
{
|
||||
export PATH=$msBuild:$PATH
|
||||
CheckExitCode MSBuild.exe $slnFile //t:Clean //m
|
||||
$nuget restore $slnFile
|
||||
CheckExitCode MSBuild.exe $slnFile //p:Configuration=Release //p:Platform=x86 //t:Build //m //p:AllowedReferenceRelatedFileExtensions=.pdb
|
||||
}
|
||||
|
||||
BuildWithXbuild()
|
||||
{
|
||||
export MONO_IOMAP=case
|
||||
CheckExitCode xbuild /t:Clean $slnFile
|
||||
mono $nuget restore $slnFile
|
||||
CheckExitCode xbuild /p:Configuration=Release /p:Platform=x86 /t:Build /p:AllowedReferenceRelatedFileExtensions=.pdb $slnFile
|
||||
}
|
||||
|
||||
Build()
|
||||
{
|
||||
echo "##teamcity[progressStart 'Build']"
|
||||
|
||||
rm -rf $outputFolder
|
||||
|
||||
if [ $runtime = "dotnet" ] ; then
|
||||
BuildWithMSBuild
|
||||
else
|
||||
BuildWithXbuild
|
||||
fi
|
||||
|
||||
CleanFolder $outputFolder false
|
||||
|
||||
echo "Removing Mono.Posix.dll"
|
||||
rm $outputFolder/Mono.Posix.dll
|
||||
|
||||
echo "##teamcity[progressFinish 'Build']"
|
||||
}
|
||||
|
||||
RunGulp()
|
||||
{
|
||||
echo "##teamcity[progressStart 'npm install']"
|
||||
npm-cache install npm || CheckExitCode npm install
|
||||
echo "##teamcity[progressFinish 'npm install']"
|
||||
|
||||
echo "##teamcity[progressStart 'Running gulp']"
|
||||
CheckExitCode npm run build
|
||||
echo "##teamcity[progressFinish 'Running gulp']"
|
||||
}
|
||||
|
||||
CreateMdbs()
|
||||
{
|
||||
local path=$1
|
||||
if [ $runtime = "dotnet" ] ; then
|
||||
local pdbFiles=( $(find $path -name "*.pdb") )
|
||||
for filename in "${pdbFiles[@]}"
|
||||
do
|
||||
if [ -e ${filename%.pdb}.dll ] ; then
|
||||
tools/pdb2mdb/pdb2mdb.exe ${filename%.pdb}.dll
|
||||
fi
|
||||
if [ -e ${filename%.pdb}.exe ] ; then
|
||||
tools/pdb2mdb/pdb2mdb.exe ${filename%.pdb}.exe
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
PackageMono()
|
||||
{
|
||||
echo "##teamcity[progressStart 'Creating Mono Package']"
|
||||
rm -rf $outputFolderMono
|
||||
cp -r $outputFolder $outputFolderMono
|
||||
|
||||
echo "Creating MDBs"
|
||||
CreateMdbs $outputFolderMono
|
||||
|
||||
echo "Removing PDBs"
|
||||
find $outputFolderMono -name "*.pdb" -exec rm "{}" \;
|
||||
|
||||
echo "Removing Service helpers"
|
||||
rm -f $outputFolderMono/ServiceUninstall.*
|
||||
rm -f $outputFolderMono/ServiceInstall.*
|
||||
|
||||
echo "Removing native windows binaries Sqlite, MediaInfo"
|
||||
rm -f $outputFolderMono/sqlite3.*
|
||||
rm -f $outputFolderMono/MediaInfo.*
|
||||
|
||||
echo "Adding NzbDrone.Core.dll.config (for dllmap)"
|
||||
cp $sourceFolder/NzbDrone.Core/NzbDrone.Core.dll.config $outputFolderMono
|
||||
|
||||
echo "Adding CurlSharp.dll.config (for dllmap)"
|
||||
cp $sourceFolder/NzbDrone.Common/CurlSharp.dll.config $outputFolderMono
|
||||
|
||||
echo "Renaming NzbDrone.Console.exe to NzbDrone.exe"
|
||||
rm $outputFolderMono/NzbDrone.exe*
|
||||
for file in $outputFolderMono/NzbDrone.Console.exe*; do
|
||||
mv "$file" "${file//.Console/}"
|
||||
done
|
||||
|
||||
echo "Removing NzbDrone.Windows"
|
||||
rm $outputFolderMono/NzbDrone.Windows.*
|
||||
|
||||
echo "Adding NzbDrone.Mono to UpdatePackage"
|
||||
cp $outputFolderMono/NzbDrone.Mono.* $updateFolderMono
|
||||
|
||||
echo "##teamcity[progressFinish 'Creating Mono Package']"
|
||||
}
|
||||
|
||||
PackageOsx()
|
||||
{
|
||||
echo "##teamcity[progressStart 'Creating OS X Package']"
|
||||
rm -rf $outputFolderOsx
|
||||
cp -r $outputFolderMono $outputFolderOsx
|
||||
|
||||
echo "Adding sqlite dylibs"
|
||||
cp $sourceFolder/Libraries/Sqlite/*.dylib $outputFolderOsx
|
||||
|
||||
echo "Adding MediaInfo dylib"
|
||||
cp $sourceFolder/Libraries/MediaInfo/*.dylib $outputFolderOsx
|
||||
|
||||
echo "Adding Startup script"
|
||||
cp ./osx/Sonarr $outputFolderOsx
|
||||
|
||||
echo "##teamcity[progressFinish 'Creating OS X Package']"
|
||||
}
|
||||
|
||||
PackageOsxApp()
|
||||
{
|
||||
echo "##teamcity[progressStart 'Creating OS X App Package']"
|
||||
rm -rf $outputFolderOsxApp
|
||||
mkdir $outputFolderOsxApp
|
||||
|
||||
cp -r ./osx/Sonarr.app $outputFolderOsxApp
|
||||
cp -r $outputFolderOsx $outputFolderOsxApp/Sonarr.app/Contents/MacOS
|
||||
|
||||
echo "##teamcity[progressFinish 'Creating OS X App Package']"
|
||||
}
|
||||
|
||||
PackageTests()
|
||||
{
|
||||
echo "Packaging Tests"
|
||||
echo "##teamcity[progressStart 'Creating Test Package']"
|
||||
rm -rf $testPackageFolder
|
||||
mkdir $testPackageFolder
|
||||
|
||||
find $sourceFolder -path $testSearchPattern -exec cp -r -u -T "{}" $testPackageFolder \;
|
||||
|
||||
if [ $runtime = "dotnet" ] ; then
|
||||
$nuget install NUnit.ConsoleRunner -Version 3.2.0 -Output $testPackageFolder
|
||||
else
|
||||
mono $nuget install NUnit.ConsoleRunner -Version 3.2.0 -Output $testPackageFolder
|
||||
fi
|
||||
|
||||
cp $outputFolder/*.dll $testPackageFolder
|
||||
cp ./*.sh $testPackageFolder
|
||||
|
||||
echo "Creating MDBs for tests"
|
||||
CreateMdbs $testPackageFolder
|
||||
|
||||
rm -f $testPackageFolder/*.log.config
|
||||
|
||||
CleanFolder $testPackageFolder true
|
||||
|
||||
echo "Adding NzbDrone.Core.dll.config (for dllmap)"
|
||||
cp $sourceFolder/NzbDrone.Core/NzbDrone.Core.dll.config $testPackageFolder
|
||||
|
||||
echo "Adding CurlSharp.dll.config (for dllmap)"
|
||||
cp $sourceFolder/NzbDrone.Common/CurlSharp.dll.config $testPackageFolder
|
||||
|
||||
echo "Copying CurlSharp libraries"
|
||||
cp $sourceFolder/ExternalModules/CurlSharp/libs/i386/* $testPackageFolder
|
||||
|
||||
echo "##teamcity[progressFinish 'Creating Test Package']"
|
||||
}
|
||||
|
||||
CleanupWindowsPackage()
|
||||
{
|
||||
echo "Removing NzbDrone.Mono"
|
||||
rm -f $outputFolder/NzbDrone.Mono.*
|
||||
|
||||
echo "Adding NzbDrone.Windows to UpdatePackage"
|
||||
cp $outputFolder/NzbDrone.Windows.* $updateFolder
|
||||
}
|
||||
|
||||
# Use mono or .net depending on OS
|
||||
case "$(uname -s)" in
|
||||
CYGWIN*|MINGW32*|MINGW64*|MSYS*)
|
||||
# on windows, use dotnet
|
||||
runtime="dotnet"
|
||||
;;
|
||||
*)
|
||||
# otherwise use mono
|
||||
runtime="mono"
|
||||
;;
|
||||
esac
|
||||
|
||||
Build
|
||||
RunGulp
|
||||
PackageMono
|
||||
PackageOsx
|
||||
PackageOsxApp
|
||||
PackageTests
|
||||
CleanupWindowsPackage
|
||||
50
commonjsCleanup.linq
Normal file
@@ -0,0 +1,50 @@
|
||||
<Query Kind="Program" />
|
||||
|
||||
void Main()
|
||||
{
|
||||
var files = Directory.GetFiles("c:\\git\\sonarr\\src\\UI","*.js", SearchOption.AllDirectories);
|
||||
|
||||
var moduleRegex = new Regex(@"module.exports\s*=\s*\(function\s*\(\)\s*{\n\s*return\s*(\w|\W)*\)\.call\(this\);$");
|
||||
var functionHead = new Regex(@"\s*\(function\s*\(\)\s*{\n\s*return\s*");
|
||||
var functionTail = new Regex(@"\}\).call\(this\);$");
|
||||
var multiVar = new Regex(@"^(?<d>var\s*\w*\s*=\s*require\(.*\)),");
|
||||
var seperateDeclearatuin = new Regex(@"^((\w|\$|_)*\s=\srequire\(.*\))(,|;)", RegexOptions.Multiline);
|
||||
|
||||
foreach (var filePath in files)
|
||||
{
|
||||
var text = File.ReadAllText(filePath);
|
||||
|
||||
var newContent = text.Replace("// Generated by uRequire v0.7.0-beta.14 template: 'nodejs'","");
|
||||
|
||||
newContent = newContent.Replace("var __isAMD = !!(typeof define === 'function' && define.amd),","");
|
||||
newContent = newContent.Replace("__isNode = (typeof exports === 'object'),","");
|
||||
newContent = newContent.Replace("__isWeb = !__isNode;","");
|
||||
newContent = newContent.Replace("\"use strict\";","'use strict';");
|
||||
|
||||
newContent = newContent.Trim();
|
||||
|
||||
|
||||
|
||||
if(moduleRegex.IsMatch(newContent))
|
||||
{
|
||||
filePath.Dump();
|
||||
|
||||
newContent = functionHead.Replace(newContent," ");
|
||||
newContent = functionTail.Replace(newContent,"");
|
||||
}
|
||||
|
||||
if(multiVar.IsMatch(newContent))
|
||||
{
|
||||
newContent = multiVar.Replace(newContent,"$1;"); //first one
|
||||
|
||||
}
|
||||
|
||||
newContent = seperateDeclearatuin.Replace(newContent,"var $1;"); //ones after
|
||||
newContent.Replace("var $ = require('jquery'), var","var $ = require('jquery');");
|
||||
|
||||
File.WriteAllText(filePath,newContent.Trim());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// Define other methods and classes here
|
||||
2
debian/copyright
vendored
@@ -3,7 +3,7 @@ Upstream-Name: nzbdrone
|
||||
Source: https://github.com/Sonarr/Sonarr
|
||||
|
||||
Files: *
|
||||
Copyright: 2010-2016 Sonarr <hello@sonarr.tv>
|
||||
Copyright: 2010-2014 Sonarr <hello@sonarr.tv>
|
||||
|
||||
License: GPL-3.0+
|
||||
|
||||
|
||||
@@ -6,13 +6,7 @@ require('./less');
|
||||
require('./handlebars');
|
||||
require('./copy');
|
||||
|
||||
gulp.task('build', function() {
|
||||
return runSequence('clean', [
|
||||
'webpack',
|
||||
'less',
|
||||
'handlebars',
|
||||
'copyHtml',
|
||||
'copyContent',
|
||||
'copyJs'
|
||||
]);
|
||||
gulp.task('build', function () {
|
||||
return runSequence('clean',
|
||||
['webpack', 'less', 'handlebars', 'copyHtml', 'copyContent', 'copyJs']);
|
||||
});
|
||||
|
||||
@@ -3,6 +3,6 @@ var del = require('del');
|
||||
|
||||
var paths = require('./paths');
|
||||
|
||||
gulp.task('clean', function(cb) {
|
||||
del([paths.dest.root], cb);
|
||||
gulp.task('clean', function (cb) {
|
||||
del([paths.dest.root], cb);
|
||||
});
|
||||
|
||||
30
gulp/copy.js
@@ -1,31 +1,27 @@
|
||||
var gulp = require('gulp');
|
||||
var print = require('gulp-print');
|
||||
var cache = require('gulp-cached');
|
||||
var livereload = require('gulp-livereload');
|
||||
|
||||
var paths = require('./paths.js');
|
||||
|
||||
gulp.task('copyJs', function () {
|
||||
return gulp.src(
|
||||
[
|
||||
paths.src.root + 'polyfills.js',
|
||||
paths.src.root + 'JsLibraries/handlebars.runtime.js'
|
||||
])
|
||||
.pipe(cache('copyJs'))
|
||||
.pipe(print())
|
||||
.pipe(gulp.dest(paths.dest.root))
|
||||
.pipe(livereload());
|
||||
return gulp.src(
|
||||
[
|
||||
paths.src.root + "polyfills.js",
|
||||
paths.src.root + "JsLibraries/handlebars.runtime.js",
|
||||
])
|
||||
.pipe(cache('copyJs'))
|
||||
.pipe(print())
|
||||
.pipe(gulp.dest(paths.dest.root));
|
||||
});
|
||||
|
||||
gulp.task('copyHtml', function () {
|
||||
return gulp.src(paths.src.html)
|
||||
.pipe(cache('copyHtml'))
|
||||
.pipe(gulp.dest(paths.dest.root))
|
||||
.pipe(livereload());
|
||||
return gulp.src(paths.src.html)
|
||||
.pipe(cache('copyHtml'))
|
||||
.pipe(gulp.dest(paths.dest.root));
|
||||
});
|
||||
|
||||
gulp.task('copyContent', function () {
|
||||
return gulp.src([paths.src.content + '**/*.*', '!**/*.less', '!**/*.css'])
|
||||
.pipe(gulp.dest(paths.dest.content))
|
||||
.pipe(livereload());
|
||||
return gulp.src([paths.src.content + '**/*.*', '!**/*.less'])
|
||||
.pipe(gulp.dest(paths.dest.content));
|
||||
});
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
module.exports = {
|
||||
onError : function(error) {
|
||||
onError:function (error) {
|
||||
//If you want details of the error in the console
|
||||
console.log(error.toString());
|
||||
this.emit('end');
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -8,4 +8,5 @@ require('./less.js');
|
||||
require('./stripBom.js');
|
||||
require('./imageMin.js');
|
||||
require('./webpack.js');
|
||||
require('./start.js');
|
||||
|
||||
|
||||
|
||||
@@ -3,25 +3,21 @@ var handlebars = require('gulp-handlebars');
|
||||
var declare = require('gulp-declare');
|
||||
var concat = require('gulp-concat');
|
||||
var wrap = require("gulp-wrap");
|
||||
var livereload = require('gulp-livereload');
|
||||
var path = require('path');
|
||||
var streamqueue = require('streamqueue');
|
||||
var stripbom = require('gulp-stripbom');
|
||||
|
||||
var paths = require('./paths.js');
|
||||
|
||||
gulp.task('handlebars', function() {
|
||||
gulp.task('handlebars', function () {
|
||||
|
||||
var coreStream = gulp.src([
|
||||
paths.src.templates,
|
||||
'!*/**/*Partial.*'
|
||||
])
|
||||
.pipe(stripbom({ showLog : false }))
|
||||
var coreStream = gulp.src([paths.src.templates, '!*/**/*Partial.*'])
|
||||
.pipe(stripbom({ showLog: false }))
|
||||
.pipe(handlebars())
|
||||
.pipe(declare({
|
||||
namespace : 'T',
|
||||
noRedeclare : true,
|
||||
processName : function(filePath) {
|
||||
namespace: 'T',
|
||||
noRedeclare: true,
|
||||
processName: function (filePath) {
|
||||
|
||||
filePath = path.relative(paths.src.root, filePath);
|
||||
|
||||
@@ -33,12 +29,12 @@ gulp.task('handlebars', function() {
|
||||
}));
|
||||
|
||||
var partialStream = gulp.src([paths.src.partials])
|
||||
.pipe(stripbom({ showLog : false }))
|
||||
.pipe(stripbom({ showLog: false }))
|
||||
.pipe(handlebars())
|
||||
.pipe(wrap('Handlebars.template(<%= contents %>)'))
|
||||
.pipe(wrap('Handlebars.registerPartial(<%= processPartialName(file.relative) %>, <%= contents %>)', {}, {
|
||||
imports : {
|
||||
processPartialName : function(fileName) {
|
||||
imports: {
|
||||
processPartialName: function (fileName) {
|
||||
return JSON.stringify(
|
||||
path.basename(fileName, '.js')
|
||||
);
|
||||
@@ -46,10 +42,11 @@ gulp.task('handlebars', function() {
|
||||
}
|
||||
}));
|
||||
|
||||
return streamqueue({ objectMode : true },
|
||||
|
||||
return streamqueue({ objectMode: true },
|
||||
partialStream,
|
||||
coreStream
|
||||
).pipe(concat('templates.js'))
|
||||
.pipe(gulp.dest(paths.dest.root))
|
||||
.pipe(livereload());
|
||||
|
||||
.pipe(gulp.dest(paths.dest.root));
|
||||
});
|
||||
|
||||
@@ -2,13 +2,14 @@ var gulp = require('gulp');
|
||||
var print = require('gulp-print');
|
||||
var paths = require('./paths.js');
|
||||
|
||||
gulp.task('imageMin', function() {
|
||||
|
||||
gulp.task('imageMin', function () {
|
||||
var imagemin = require('gulp-imagemin');
|
||||
return gulp.src(paths.src.images)
|
||||
.pipe(imagemin({
|
||||
progressive : false,
|
||||
optimizationLevel : 4,
|
||||
svgoPlugins : [{ removeViewBox : false }]
|
||||
progressive: false,
|
||||
optimizationLevel :4,
|
||||
svgoPlugins: [{removeViewBox: false}]
|
||||
}))
|
||||
.pipe(print())
|
||||
.pipe(gulp.dest(paths.src.content + 'Images/'));
|
||||
|
||||
@@ -4,11 +4,9 @@ var stylish = require('jshint-stylish');
|
||||
var cache = require('gulp-cached');
|
||||
var paths = require('./paths.js');
|
||||
|
||||
gulp.task('jshint', function() {
|
||||
return gulp.src([
|
||||
paths.src.scripts,
|
||||
paths.src.exclude.libs
|
||||
])
|
||||
|
||||
gulp.task('jshint', function () {
|
||||
return gulp.src([paths.src.scripts, paths.src.exclude.libs])
|
||||
.pipe(cache('jshint'))
|
||||
.pipe(jshint())
|
||||
.pipe(jshint.reporter(stylish));
|
||||
|
||||
63
gulp/less.js
@@ -1,51 +1,34 @@
|
||||
var gulp = require('gulp');
|
||||
|
||||
var less = require('gulp-less');
|
||||
var postcss = require('gulp-postcss');
|
||||
var sourcemaps = require('gulp-sourcemaps');
|
||||
var autoprefixer = require('autoprefixer-core');
|
||||
var livereload = require('gulp-livereload');
|
||||
var cleancss = require('gulp-clean-css');
|
||||
var print = require('gulp-print');
|
||||
|
||||
var paths = require('./paths');
|
||||
var errorHandler = require('./errorHandler');
|
||||
|
||||
gulp.task('less', function() {
|
||||
|
||||
var src = [
|
||||
paths.src.content + 'bootstrap.less',
|
||||
paths.src.content + 'theme.less',
|
||||
paths.src.content + 'overrides.less',
|
||||
paths.src.content + 'bootstrap.toggle-switch.css',
|
||||
paths.src.content + 'fullcalendar.css',
|
||||
paths.src.content + 'Messenger/messenger.css',
|
||||
paths.src.content + 'Messenger/messenger.flat.css',
|
||||
paths.src.root + 'Series/series.less',
|
||||
paths.src.root + 'Activity/activity.less',
|
||||
paths.src.root + 'AddSeries/addSeries.less',
|
||||
paths.src.root + 'Calendar/calendar.less',
|
||||
paths.src.root + 'Cells/cells.less',
|
||||
paths.src.root + 'ManualImport/manualimport.less',
|
||||
paths.src.root + 'Settings/settings.less',
|
||||
paths.src.root + 'System/Logs/logs.less',
|
||||
paths.src.root + 'System/Update/update.less',
|
||||
paths.src.root + 'System/Info/info.less'
|
||||
];
|
||||
|
||||
return gulp.src(src)
|
||||
gulp.task('less', function () {
|
||||
return gulp.src([
|
||||
paths.src.content + 'bootstrap.less',
|
||||
paths.src.content + 'theme.less',
|
||||
paths.src.content + 'overrides.less',
|
||||
paths.src.root + 'Series/series.less',
|
||||
paths.src.root + 'Activity/activity.less',
|
||||
paths.src.root + 'AddSeries/addSeries.less',
|
||||
paths.src.root + 'Calendar/calendar.less',
|
||||
paths.src.root + 'Cells/cells.less',
|
||||
paths.src.root + 'ManualImport/manualimport.less',
|
||||
paths.src.root + 'Settings/settings.less',
|
||||
paths.src.root + 'System/Logs/logs.less',
|
||||
paths.src.root + 'System/Update/update.less',
|
||||
paths.src.root + 'System/Info/info.less',
|
||||
])
|
||||
.pipe(print())
|
||||
.pipe(sourcemaps.init())
|
||||
.pipe(less({
|
||||
dumpLineNumbers : 'false',
|
||||
compress : false,
|
||||
yuicompress : false,
|
||||
ieCompat : true,
|
||||
strictImports : true
|
||||
dumpLineNumbers: 'false',
|
||||
compress: true,
|
||||
yuicompress: true,
|
||||
ieCompat: true,
|
||||
strictImports: true
|
||||
}))
|
||||
.pipe(postcss([ autoprefixer({ browsers: ['last 2 versions'] }) ]))
|
||||
.pipe(cleancss())
|
||||
.on('error', errorHandler.onError)
|
||||
.pipe(sourcemaps.write(paths.dest.content))
|
||||
.pipe(gulp.dest(paths.dest.content))
|
||||
.pipe(livereload());
|
||||
.pipe(gulp.dest(paths.dest.content));
|
||||
});
|
||||
|
||||
@@ -1,21 +1,19 @@
|
||||
var paths = {
|
||||
src : {
|
||||
root : './src/UI/',
|
||||
templates : './src/UI/**/*.hbs',
|
||||
html : './src/UI/*.html',
|
||||
partials : './src/UI/**/*Partial.hbs',
|
||||
scripts : './src/UI/**/*.js',
|
||||
less : ['./src/UI/**/*.less'],
|
||||
content : './src/UI/Content/',
|
||||
images : './src/UI/Content/Images/**/*',
|
||||
exclude : {
|
||||
libs : '!./src/UI/JsLibraries/**'
|
||||
module.exports = {
|
||||
src: {
|
||||
root: './src/UI/',
|
||||
templates: './src/UI/**/*.hbs',
|
||||
html: './src/UI/*.html',
|
||||
partials: './src/UI/**/*Partial.hbs',
|
||||
scripts: './src/UI/**/*.js',
|
||||
less: ['./src/UI/**/*.less'],
|
||||
content: './src/UI/Content/',
|
||||
images: './src/UI/Content/Images/**/*',
|
||||
exclude :{
|
||||
libs:'!./src/UI/JsLibraries/**'
|
||||
}
|
||||
},
|
||||
dest : {
|
||||
root : './_output/UI/',
|
||||
content : './_output/UI/Content/'
|
||||
dest: {
|
||||
root: './_output/UI/',
|
||||
content: './_output/UI/Content/'
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = paths;
|
||||
|
||||
112
gulp/start.js
@@ -1,112 +0,0 @@
|
||||
// will download and run sonarr (server) in a non-windows enviroment
|
||||
// you can use this if you don't care about the server code and just want to work
|
||||
// with the web code.
|
||||
|
||||
var http = require('http');
|
||||
var gulp = require('gulp');
|
||||
var fs = require('fs');
|
||||
var targz = require('tar.gz');
|
||||
var del = require('del');
|
||||
var print = require('gulp-print');
|
||||
var spawn = require('child_process').spawn;
|
||||
|
||||
function download(url, dest, cb) {
|
||||
console.log('Downloading ' + url + ' to ' + dest);
|
||||
var file = fs.createWriteStream(dest);
|
||||
var request = http.get(url, function (response) {
|
||||
response.pipe(file);
|
||||
file.on('finish', function () {
|
||||
console.log('Download completed');
|
||||
file.close(cb);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function getLatest(cb) {
|
||||
var branch = 'develop';
|
||||
process.argv.forEach(function (val) {
|
||||
var branchMatch = /branch=([\S]*)/.exec(val);
|
||||
if (branchMatch && branchMatch.length > 1) {
|
||||
branch = branchMatch[1];
|
||||
}
|
||||
});
|
||||
|
||||
var url = 'http://services.sonarr.tv/v1/update/' + branch + '?os=osx';
|
||||
|
||||
console.log('Checking for latest version:', url);
|
||||
|
||||
http.get(url, function (res) {
|
||||
var data = '';
|
||||
|
||||
res.on('data', function (chunk) {
|
||||
data += chunk;
|
||||
});
|
||||
|
||||
res.on('end', function () {
|
||||
var updatePackage = JSON.parse(data).updatePackage;
|
||||
console.log('Latest version available: ' + updatePackage.version + ' Release Date: ' + updatePackage.releaseDate);
|
||||
cb(updatePackage);
|
||||
});
|
||||
}).on('error', function (e) {
|
||||
console.log('problem with request: ' + e.message);
|
||||
});
|
||||
}
|
||||
|
||||
function extract(source, dest, cb) {
|
||||
console.log('extracting download page to ' + dest);
|
||||
new targz().extract(source, dest, function (err) {
|
||||
if (err) {
|
||||
console.log(err);
|
||||
}
|
||||
console.log('Update package extracted.');
|
||||
cb();
|
||||
});
|
||||
}
|
||||
|
||||
gulp.task('getSonarr', function () {
|
||||
|
||||
//gulp.src('/Users/kayone/git/Sonarr/_start/2.0.0.3288/NzbDrone/*.*')
|
||||
// .pipe(print())
|
||||
// .pipe(gulp.dest('./_output
|
||||
|
||||
//return;
|
||||
try {
|
||||
fs.mkdirSync('./_start/');
|
||||
} catch (e) {
|
||||
if (e.code != 'EEXIST') {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
getLatest(function (package) {
|
||||
var packagePath = "./_start/" + package.filename;
|
||||
var dirName = "./_start/" + package.version;
|
||||
download(package.url, packagePath, function () {
|
||||
extract(packagePath, dirName, function () {
|
||||
// clean old binaries
|
||||
console.log('Cleaning old binaries');
|
||||
del.sync(['./_output/*', '!./_output/UI/']);
|
||||
console.log('copying binaries to target');
|
||||
gulp.src(dirName + '/NzbDrone/*.*')
|
||||
.pipe(gulp.dest('./_output/'));
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
gulp.task('startSonarr', function () {
|
||||
|
||||
var ls = spawn('mono', ['--debug', './_output/NzbDrone.exe']);
|
||||
|
||||
ls.stdout.on('data', function (data) {
|
||||
process.stdout.write('' + data);
|
||||
});
|
||||
|
||||
ls.stderr.on('data', function (data) {
|
||||
process.stdout.write('' + data);
|
||||
});
|
||||
|
||||
ls.on('close', function (code) {
|
||||
console.log('child process exited with code ' + code);
|
||||
});
|
||||
});
|
||||
@@ -7,10 +7,6 @@ var stripBom = function (dest) {
|
||||
.pipe(stripbom({ showLog: false }))
|
||||
.pipe(gulp.dest(dest));
|
||||
|
||||
gulp.src(paths.src.less)
|
||||
.pipe(stripbom({ showLog: false }))
|
||||
.pipe(gulp.dest(dest));
|
||||
|
||||
gulp.src(paths.src.templates)
|
||||
.pipe(stripbom({ showLog: false }))
|
||||
.pipe(gulp.dest(dest));
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
var gulp = require('gulp');
|
||||
var livereload = require('gulp-livereload');
|
||||
//var livereload = require('gulp-livereload');
|
||||
|
||||
|
||||
var paths = require('./paths.js');
|
||||
|
||||
@@ -9,12 +10,24 @@ require('./less.js');
|
||||
require('./copy.js');
|
||||
require('./webpack.js');
|
||||
|
||||
gulp.task('watch', ['jshint', 'handlebars', 'less', 'copyHtml', 'copyContent', 'copyJs'], function () {
|
||||
livereload.listen();
|
||||
gulp.start('webpackWatch');
|
||||
gulp.watch([paths.src.scripts, paths.src.exclude.libs], ['jshint', 'copyJs']);
|
||||
gulp.watch(paths.src.templates, ['handlebars']);
|
||||
gulp.watch([paths.src.less, paths.src.exclude.libs], ['less']);
|
||||
gulp.watch([paths.src.html], ['copyHtml']);
|
||||
gulp.watch([paths.src.content + '**/*.*', '!**/*.less'], ['copyContent']);
|
||||
});
|
||||
|
||||
gulp.task('watch', ['jshint', 'handlebars', 'less','copyHtml', 'copyContent','copyJs'], function () {
|
||||
gulp.start('webpackWatch');
|
||||
gulp.watch([paths.src.scripts, paths.src.exclude.libs], ['jshint','copyJs']);
|
||||
gulp.watch(paths.src.templates, ['handlebars']);
|
||||
gulp.watch([paths.src.less, paths.src.exclude.libs], ['less']);
|
||||
gulp.watch([paths.src.html], ['copyHtml']);
|
||||
gulp.watch([paths.src.content + '**/*.*', '!**/*.less'], ['copyContent']);
|
||||
});
|
||||
|
||||
gulp.task('liveReload', ['jshint', 'handlebars', 'less', 'webPack'], function () {
|
||||
var server = livereload();
|
||||
gulp.watch([
|
||||
'app/**/*.js',
|
||||
'app/**/*.css',
|
||||
'app/index.html',
|
||||
'app/login.html'
|
||||
]).on('change', function (file) {
|
||||
server.changed(file.path);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,13 +1,20 @@
|
||||
var gulp = require('gulp');
|
||||
var webpackStream = require('webpack-stream');
|
||||
var livereload = require('gulp-livereload');
|
||||
|
||||
var gulpWebpack = require('gulp-webpack');
|
||||
var webpack = require('webpack');
|
||||
var webpackConfig = require('../webpack.config');
|
||||
|
||||
webpackConfig.devtool = "#source-map";
|
||||
|
||||
gulp.task('webpack', function() {
|
||||
return gulp.src('main.js').pipe(webpackStream(webpackConfig)).pipe(gulp.dest(''));
|
||||
return gulp.src('main.js')
|
||||
.pipe(gulpWebpack(webpackConfig, webpack))
|
||||
.pipe(gulp.dest(''));
|
||||
});
|
||||
|
||||
gulp.task('webpackWatch', function() {
|
||||
webpackConfig.watch = true;
|
||||
return gulp.src('main.js').pipe(webpackStream(webpackConfig)).pipe(gulp.dest('')).pipe(livereload());
|
||||
webpackConfig.watch = true;
|
||||
return gulp.src('main.js')
|
||||
.pipe(gulpWebpack(webpackConfig, webpack))
|
||||
.pipe(gulp.dest(''));
|
||||
});
|
||||
|
||||
7
integration_mono.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
EXCLUDE="-exclude:Windows -include:IntegrationTest"
|
||||
TESTDIR="."
|
||||
NUNIT="$TESTDIR/NUnit.Runners.2.6.1/tools/nunit-console-x86.exe"
|
||||
|
||||
mono --debug --runtime=v4.0 $NUNIT $EXCLUDE -xml:NzbDrone.Api.Result.xml $TESTDIR/NzbDrone.Api.Test.dll
|
||||
mono --debug --runtime=v4.0 $NUNIT $EXCLUDE -xml:NzbDrone.Core.Result.xml $TESTDIR/NzbDrone.Core.Test.dll
|
||||
mono --debug --runtime=v4.0 $NUNIT $EXCLUDE -xml:NzbDrone.Integration.Result.xml $TESTDIR/NzbDrone.Integration.Test.dll
|
||||
33
osx/Sonarr
@@ -1,35 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
#get the bundle's MacOS directory full path
|
||||
DIR=$(cd "$(dirname "$0")"; pwd)
|
||||
|
||||
|
||||
#change these values to match your app
|
||||
EXE_PATH="$DIR/NzbDrone.exe"
|
||||
APPNAME="Sonarr"
|
||||
|
||||
#set up environment
|
||||
if [[ -x '/opt/local/bin/mono' ]]; then
|
||||
# Macports and mono-supplied installer path
|
||||
export PATH="/opt/local/bin:$PATH"
|
||||
elif [[ -x '/usr/local/bin/mono' ]]; then
|
||||
# Homebrew-supplied path to mono
|
||||
export PATH="/usr/local/bin:$PATH"
|
||||
fi
|
||||
|
||||
export DYLD_FALLBACK_LIBRARY_PATH="$DIR"
|
||||
|
||||
if [ -e /Library/Frameworks/Mono.framework ]; then
|
||||
MONO_FRAMEWORK_PATH=/Library/Frameworks/Mono.framework/Versions/Current
|
||||
export PATH="$MONO_FRAMEWORK_PATH/bin:$PATH"
|
||||
export DYLD_FALLBACK_LIBRARY_PATH="$DYLD_FALLBACK_LIBRARY_PATH:$MONO_FRAMEWORK_PATH/lib"
|
||||
fi
|
||||
|
||||
if [[ -f '/opt/local/lib/libsqlite3.0.dylib' ]]; then
|
||||
export DYLD_FALLBACK_LIBRARY_PATH="/opt/local/lib:$DYLD_FALLBACK_LIBRARY_PATH"
|
||||
fi
|
||||
|
||||
export DYLD_FALLBACK_LIBRARY_PATH="$DYLD_FALLBACK_LIBRARY_PATH:$HOME/lib:/usr/local/lib:/lib:/usr/lib"
|
||||
|
||||
MONO_FRAMEWORK_PATH=/Library/Frameworks/Mono.framework/Versions/Current
|
||||
export DYLD_FALLBACK_LIBRARY_PATH="$DIR:$MONO_FRAMEWORK_PATH/lib:/lib:/usr/lib"
|
||||
export PATH="$MONO_FRAMEWORK_PATH/bin:$PATH"
|
||||
|
||||
#mono version check
|
||||
REQUIRED_MAJOR=3
|
||||
REQUIRED_MINOR=10
|
||||
@@ -39,9 +21,6 @@ VERSION_MSG="$APPNAME requires Mono Runtime Environment(MRE) $REQUIRED_MAJOR.$RE
|
||||
DOWNLOAD_URL="http://www.mono-project.com/download/#download-mac"
|
||||
|
||||
MONO_VERSION="$(mono --version | grep 'Mono JIT compiler version ' | cut -f5 -d\ )"
|
||||
# if [[ -o DEBUG ]]; then osascript -e "display dialog \"MONO_VERSION: $MONO_VERSION\""; fi
|
||||
|
||||
|
||||
MONO_VERSION_MAJOR="$(echo $MONO_VERSION | cut -f1 -d.)"
|
||||
MONO_VERSION_MINOR="$(echo $MONO_VERSION | cut -f2 -d.)"
|
||||
if [ -z "$MONO_VERSION" ] \
|
||||
|
||||
44
package.json
@@ -4,44 +4,36 @@
|
||||
"description": "Sonarr",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
"build": "gulp build",
|
||||
"start": "gulp watch"
|
||||
"preinstall": ""
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/Sonarr/Sonarr.git"
|
||||
},
|
||||
"author": "",
|
||||
"license": "GPL-3.0",
|
||||
"license": "BSD",
|
||||
"gitHead": "9ff7aa1bf7fe38c4c5bdb92f56c8ad556916ed67",
|
||||
"readmeFilename": "readme.md",
|
||||
"dependencies": {
|
||||
"autoprefixer-core": "5.2.1",
|
||||
"del": "1.2.0",
|
||||
"gulp": "3.9.0",
|
||||
"gulp-cached": "1.1.0",
|
||||
"gulp-clean-css": "^3.0.4",
|
||||
"gulp-concat": "2.6.0",
|
||||
"del": "1.1.1",
|
||||
"gulp": "3.8.10",
|
||||
"gulp-cached": "1.0.2",
|
||||
"gulp-concat": "2.4.3",
|
||||
"gulp-declare": "0.3.0",
|
||||
"gulp-handlebars": "3.0.1",
|
||||
"gulp-jshint": "1.11.2",
|
||||
"gulp-less": "3.0.3",
|
||||
"gulp-livereload": "3.8.0",
|
||||
"gulp-postcss": "6.0.0",
|
||||
"gulp-jshint": "1.9.2",
|
||||
"gulp-less": "2.0.1",
|
||||
"gulp-print": "1.1.0",
|
||||
"gulp-replace": "0.5.3",
|
||||
"gulp-run": "1.6.8",
|
||||
"gulp-sourcemaps": "1.5.2",
|
||||
"gulp-replace": "0.5.2",
|
||||
"gulp-stripbom": "1.0.4",
|
||||
"gulp-webpack": "1.5.0",
|
||||
"gulp-wrap": "0.11.0",
|
||||
"handlebars": "3.0.3",
|
||||
"jshint-loader": "0.8.3",
|
||||
"jshint-stylish": "2.0.1",
|
||||
"run-sequence": "1.1.1",
|
||||
"streamqueue": "1.1.0",
|
||||
"tar.gz": "0.1.1",
|
||||
"webpack": "1.12.0",
|
||||
"webpack-stream": "2.1.0"
|
||||
"gulp-run": "1.6.6",
|
||||
"gulp-webpack": "1.2.0",
|
||||
"gulp-wrap": "0.10.1",
|
||||
"handlebars": "2.0.0",
|
||||
"jshint-loader": "0.8.1",
|
||||
"jshint-stylish": "1.0.0",
|
||||
"run-sequence": "1.0.2",
|
||||
"streamqueue": "0.1.1",
|
||||
"webpack": "1.5.3"
|
||||
}
|
||||
}
|
||||
|
||||
54
readme.md
Normal file
@@ -0,0 +1,54 @@
|
||||
# Sonarr #
|
||||
|
||||
|
||||
Sonarr is a PVR for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new episodes of your favorite shows and will grab, sort and rename them. It can also be configured to automatically upgrade the quality of files already downloaded when a better quality format becomes available.
|
||||
|
||||
## Major Features Include: ##
|
||||
|
||||
* Support for major platforms: Windows, Linux, OSX, Raspberry Pi, etc.
|
||||
* Automatically detects new episodes
|
||||
* Can scan your existing library and download any missing episodes
|
||||
* Can watch for better quality of the episodes you already have and do an automatic upgrade. *eg. from DVD to Blu-Ray*
|
||||
* Automatic failed download handling will try another release if one fails
|
||||
* Manual search so you can pick any release or to see why a release was not downloaded automatically
|
||||
* Fully configurable episode renaming
|
||||
* Full integration with SABNzbd and NzbGet
|
||||
* Full integration with XBMC, Plex (notification, library update, metadata)
|
||||
* Full support for specials and multi-episode releases
|
||||
* And a beautiful UI
|
||||
|
||||
|
||||
## Configuring Development Environment: ##
|
||||
|
||||
### Requirements ###
|
||||
- Visual Studio 2013 ([Express Edition](http://www.microsoft.com/visualstudio/eng/products/visual-studio-express-for-web "Express Edition") might work but not tested.)
|
||||
- [Git](http://git-scm.com/downloads)
|
||||
- [NodeJS](http://nodejs.org/download/)
|
||||
- [Gulp](http://gulpjs.com)
|
||||
|
||||
### Setup ###
|
||||
|
||||
- Make sure all the required software mentioned above are installed.
|
||||
- Clone the repository into your development machine. [*info*](https://help.github.com/articles/working-with-repositories)
|
||||
- install the required Node Packages `npm install`
|
||||
- install gulp `npm install gulp -g`
|
||||
- start gulp to monitor your dev environment for any changes that need post processing using `gulp watch` command.
|
||||
|
||||
*Please note gulp must be running at all times while you are working with NzbDrone client source files.*
|
||||
|
||||
|
||||
### Development ###
|
||||
- Open `NzbDrone.sln` in Visual Studio
|
||||
- Make sure `NzbDrone.Console` is set as the startup project
|
||||
|
||||
|
||||
### License ###
|
||||
* [GNU GPL v3](http://www.gnu.org/licenses/gpl.html)
|
||||
Copyright 2010-2014
|
||||
|
||||
|
||||
### Sponsors ###
|
||||
- [JetBrains](http://www.jetbrains.com/) for providing us with free licenses to their great tools
|
||||
- [ReSharper](http://www.jetbrains.com/resharper/)
|
||||
- [WebStorm](http://www.jetbrains.com/webstorm/)
|
||||
- [TeamCity](http://www.jetbrains.com/teamcity/)
|
||||
17
rename.ps1
Normal file
@@ -0,0 +1,17 @@
|
||||
Param(
|
||||
[Parameter(Mandatory=$true, Position=0, HelpMessage="A branch name is #requires required")]
|
||||
[string]$branch,
|
||||
[Parameter(Mandatory=$true, Position=1, HelpMessage="A version is required")]
|
||||
[string]$version
|
||||
)
|
||||
|
||||
if ($branch -eq "<default>")
|
||||
{
|
||||
$branch = "teamcity";
|
||||
}
|
||||
|
||||
Write-Host $branch;
|
||||
Write-Host $version;
|
||||
Write-Host "NzbDrone.$branch.$version.zip";
|
||||
|
||||
Rename-Item "nzbdrone.zip" "NzbDrone.$branch.$version.zip"
|
||||
@@ -75,8 +75,6 @@
|
||||
<xs:enumeration value="seedtype" /> <!-- TBD, which criteria must be met. was going for 'ratio,seedtime,both' but afaik it's always 'either' -->
|
||||
<xs:enumeration value="minimumratio" />
|
||||
<xs:enumeration value="minimumseedtime" />
|
||||
<xs:enumeration value="downloadvolumefactor" /> <!-- factor for the download volume, in most cases it should be set to 1, if a torrent is set to freeleech set it to 0, if only 50% is counted set it to 0.5 -->
|
||||
<xs:enumeration value="uploadvolumefactor" /> <!-- factor for the upload volume, in most cases it should be set to 1, if a torrent is set to neutral leech (upload is not counted) set it to 0, if it's set to double upload set it to 2 -->
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:element name="attr">
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
REM SET BUILD_NUMBER=1
|
||||
REM SET branch=develop
|
||||
#SET BUILD_NUMBER=1
|
||||
#SET branch=develop
|
||||
inno\ISCC.exe nzbdrone.iss
|
||||
@@ -40,11 +40,8 @@ VersionInfoVersion={#BuildNumber}
|
||||
Name: "english"; MessagesFile: "compiler:Default.isl"
|
||||
|
||||
[Tasks]
|
||||
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"
|
||||
Name: "windowsService"; Description: "Install Windows Service (Starts when the computer starts)"; GroupDescription: "Start automatically"; Flags: exclusive
|
||||
Name: "startupShortcut"; Description: "Create shortcut in Startup folder (Starts when you log into Windows)"; GroupDescription: "Start automatically"; Flags: exclusive unchecked
|
||||
Name: "none"; Description: "Do not start automatically"; GroupDescription: "Start automatically"; Flags: exclusive unchecked
|
||||
|
||||
;Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
|
||||
Name: "windowsService"; Description: "Install as a Windows Service"
|
||||
|
||||
[Files]
|
||||
Source: "..\_output\NzbDrone.exe"; DestDir: "{app}"; Flags: ignoreversion
|
||||
@@ -54,13 +51,10 @@ Source: "..\_output\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs cr
|
||||
[Icons]
|
||||
Name: "{group}\{#AppName}"; Filename: "{app}\{#AppExeName}"; Parameters: "/icon"
|
||||
Name: "{commondesktop}\{#AppName}"; Filename: "{app}\{#AppExeName}"; Parameters: "/icon"
|
||||
Name: "{userstartup}\{#AppName}"; Filename: "{app}\NzbDrone.exe"; WorkingDir: "{app}"; Tasks: startupShortcut
|
||||
|
||||
[Run]
|
||||
Filename: "{app}\nzbdrone.console.exe"; Parameters: "/u"; Flags: runhidden waituntilterminated;
|
||||
Filename: "{app}\nzbdrone.console.exe"; Parameters: "/i"; Flags: runhidden waituntilterminated; Tasks: windowsService
|
||||
Filename: "{app}\NzbDrone.exe"; Description: "Open Sonarr"; Flags: postinstall skipifsilent nowait; Tasks: windowsService;
|
||||
Filename: "{app}\NzbDrone.exe"; Description: "Start Sonarr"; Flags: postinstall skipifsilent nowait; Tasks: startupShortcut none;
|
||||
Filename: "{app}\nzbdrone.console.exe"; Parameters: "/u"; Flags: waituntilterminated;
|
||||
Filename: "{app}\nzbdrone.console.exe"; Parameters: "/i"; Flags: waituntilterminated; Tasks: windowsService
|
||||
|
||||
[UninstallRun]
|
||||
Filename: "{app}\nzbdrone.console.exe"; Parameters: "/u"; Flags: waituntilterminated skipifdoesntexist
|
||||
|
||||
6
src/.nuget/NuGet.Config
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<solution>
|
||||
<add key="disableSourceControlIntegration" value="true" />
|
||||
</solution>
|
||||
</configuration>
|
||||
BIN
src/.nuget/NuGet.exe
Normal file
136
src/.nuget/NuGet.targets
Normal file
@@ -0,0 +1,136 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>
|
||||
|
||||
<!-- Enable the restore command to run before builds -->
|
||||
<RestorePackages Condition=" '$(RestorePackages)' == '' ">false</RestorePackages>
|
||||
|
||||
<!-- Property that enables building a package from a project -->
|
||||
<BuildPackage Condition=" '$(BuildPackage)' == '' ">false</BuildPackage>
|
||||
|
||||
<!-- Determines if package restore consent is required to restore packages -->
|
||||
<RequireRestoreConsent Condition=" '$(RequireRestoreConsent)' != 'false' ">true</RequireRestoreConsent>
|
||||
|
||||
<!-- Download NuGet.exe if it does not already exist -->
|
||||
<DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' ">false</DownloadNuGetExe>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition=" '$(PackageSources)' == '' ">
|
||||
<!-- Package sources used to restore packages. By default, registered sources under %APPDATA%\NuGet\NuGet.Config will be used -->
|
||||
<!-- The official NuGet package source (https://www.nuget.org/api/v2/) will be excluded if package sources are specified and it does not appear in the list -->
|
||||
<!--
|
||||
<PackageSource Include="https://www.nuget.org/api/v2/" />
|
||||
<PackageSource Include="https://my-nuget-source/nuget/" />
|
||||
-->
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(OS)' == 'Windows_NT'">
|
||||
<!-- Windows specific commands -->
|
||||
<NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), ".nuget"))</NuGetToolsPath>
|
||||
<PackagesConfig>$([System.IO.Path]::Combine($(ProjectDir), "packages.config"))</PackagesConfig>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(OS)' != 'Windows_NT'">
|
||||
<!-- We need to launch nuget.exe with the mono command if we're not on windows -->
|
||||
<NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>
|
||||
<PackagesConfig>packages.config</PackagesConfig>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- NuGet command -->
|
||||
<NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(NuGetToolsPath)\NuGet.exe</NuGetExePath>
|
||||
<PackageSources Condition=" $(PackageSources) == '' ">@(PackageSource)</PackageSources>
|
||||
|
||||
<NuGetCommand Condition=" '$(OS)' == 'Windows_NT'">"$(NuGetExePath)"</NuGetCommand>
|
||||
<NuGetCommand Condition=" '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 $(NuGetExePath)</NuGetCommand>
|
||||
|
||||
<PackageOutputDir Condition="$(PackageOutputDir) == ''">$(TargetDir.Trim('\\'))</PackageOutputDir>
|
||||
|
||||
<RequireConsentSwitch Condition=" $(RequireRestoreConsent) == 'true' ">-RequireConsent</RequireConsentSwitch>
|
||||
<NonInteractiveSwitch Condition=" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' ">-NonInteractive</NonInteractiveSwitch>
|
||||
|
||||
<PaddedSolutionDir Condition=" '$(OS)' == 'Windows_NT'">"$(SolutionDir) "</PaddedSolutionDir>
|
||||
<PaddedSolutionDir Condition=" '$(OS)' != 'Windows_NT' ">"$(SolutionDir)"</PaddedSolutionDir>
|
||||
|
||||
<!-- Commands -->
|
||||
<RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir)</RestoreCommand>
|
||||
<BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -Properties "Configuration=$(Configuration);Platform=$(Platform)" $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols</BuildCommand>
|
||||
|
||||
<!-- We need to ensure packages are restored prior to assembly resolve -->
|
||||
<BuildDependsOn Condition="$(RestorePackages) == 'true'">
|
||||
RestorePackages;
|
||||
$(BuildDependsOn);
|
||||
</BuildDependsOn>
|
||||
|
||||
<!-- Make the build depend on restore packages -->
|
||||
<BuildDependsOn Condition="$(BuildPackage) == 'true'">
|
||||
$(BuildDependsOn);
|
||||
BuildPackage;
|
||||
</BuildDependsOn>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="CheckPrerequisites">
|
||||
<!-- Raise an error if we're unable to locate nuget.exe -->
|
||||
<Error Condition="'$(DownloadNuGetExe)' != 'true' AND !Exists('$(NuGetExePath)')" Text="Unable to locate '$(NuGetExePath)'" />
|
||||
<!--
|
||||
Take advantage of MsBuild's build dependency tracking to make sure that we only ever download nuget.exe once.
|
||||
This effectively acts as a lock that makes sure that the download operation will only happen once and all
|
||||
parallel builds will have to wait for it to complete.
|
||||
-->
|
||||
<MsBuild Targets="_DownloadNuGet" Projects="$(MSBuildThisFileFullPath)" Properties="Configuration=NOT_IMPORTANT;DownloadNuGetExe=$(DownloadNuGetExe)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="_DownloadNuGet">
|
||||
<DownloadNuGet OutputFilename="$(NuGetExePath)" Condition=" '$(DownloadNuGetExe)' == 'true' AND !Exists('$(NuGetExePath)')" />
|
||||
</Target>
|
||||
|
||||
<Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites">
|
||||
<Exec Command="$(RestoreCommand)"
|
||||
Condition="'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')" />
|
||||
|
||||
<Exec Command="$(RestoreCommand)"
|
||||
LogStandardErrorAsError="true"
|
||||
Condition="'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')" />
|
||||
</Target>
|
||||
|
||||
<Target Name="BuildPackage" DependsOnTargets="CheckPrerequisites">
|
||||
<Exec Command="$(BuildCommand)"
|
||||
Condition=" '$(OS)' != 'Windows_NT' " />
|
||||
|
||||
<Exec Command="$(BuildCommand)"
|
||||
LogStandardErrorAsError="true"
|
||||
Condition=" '$(OS)' == 'Windows_NT' " />
|
||||
</Target>
|
||||
|
||||
<UsingTask TaskName="DownloadNuGet" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
|
||||
<ParameterGroup>
|
||||
<OutputFilename ParameterType="System.String" Required="true" />
|
||||
</ParameterGroup>
|
||||
<Task>
|
||||
<Reference Include="System.Core" />
|
||||
<Using Namespace="System" />
|
||||
<Using Namespace="System.IO" />
|
||||
<Using Namespace="System.Net" />
|
||||
<Using Namespace="Microsoft.Build.Framework" />
|
||||
<Using Namespace="Microsoft.Build.Utilities" />
|
||||
<Code Type="Fragment" Language="cs">
|
||||
<![CDATA[
|
||||
try {
|
||||
OutputFilename = Path.GetFullPath(OutputFilename);
|
||||
|
||||
Log.LogMessage("Downloading latest version of NuGet.exe...");
|
||||
WebClient webClient = new WebClient();
|
||||
webClient.DownloadFile("https://www.nuget.org/nuget.exe", OutputFilename);
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex) {
|
||||
Log.LogErrorFromException(ex);
|
||||
return false;
|
||||
}
|
||||
]]>
|
||||
</Code>
|
||||
</Task>
|
||||
</UsingTask>
|
||||
</Project>
|
||||
BIN
src/Libraries/Manifest Tool/mt.exe
Normal file
9
src/Libraries/Manifest Tool/mt.exe.config
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version ="1.0"?>
|
||||
<!-- This allows mt.exe to run on machines with the CLR v4 installed but not 1.1 or 2.0 -->
|
||||
<configuration>
|
||||
<startup useLegacyV2RuntimeActivationPolicy="true">
|
||||
<supportedRuntime version="v4.0"/>
|
||||
<supportedRuntime version="v2.0.50727"/>
|
||||
<supportedRuntime version="v1.1.4322"/>
|
||||
</startup>
|
||||
</configuration>
|
||||
@@ -296,7 +296,7 @@ namespace LogentriesCore
|
||||
WriteDebugMessages("HostName parameter is not defined - trying to get it from System.Environment.MachineName");
|
||||
m_HostName = "HostName=" + System.Environment.MachineName + " ";
|
||||
}
|
||||
catch (InvalidOperationException)
|
||||
catch (InvalidOperationException ex)
|
||||
{
|
||||
// Cannot get host name automatically, so assume that HostName is not used
|
||||
// and log message is sent without it.
|
||||
|
||||
@@ -73,6 +73,13 @@
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
|
||||
</Target>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
|
||||
@@ -51,15 +51,11 @@
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NLog.4.5.3\lib\net40-client\NLog.dll</HintPath>
|
||||
<Reference Include="NLog">
|
||||
<HintPath>..\packages\NLog.2.1.0\lib\net40\NLog.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.Transactions" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
@@ -83,13 +79,19 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="fastJSON\license.txt" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
|
||||
</Target>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
|
||||
@@ -24,7 +24,6 @@ namespace LogentriesNLog.fastJSON
|
||||
SerializeNullValues = false;
|
||||
UseOptimizedDatasetSchema = false;
|
||||
UsingGlobalTypes = false;
|
||||
UseUTCDateTime = true;
|
||||
}
|
||||
public bool UseOptimizedDatasetSchema = true;
|
||||
public bool UseFastGuid = true;
|
||||
@@ -40,7 +39,7 @@ namespace LogentriesNLog.fastJSON
|
||||
return ToJSON(obj, UseSerializerExtension, UseFastGuid, UseOptimizedDatasetSchema, SerializeNullValues);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public string ToJSON(object obj,
|
||||
bool enableSerializerExtensions,
|
||||
bool enableFastGuid,
|
||||
@@ -50,13 +49,13 @@ namespace LogentriesNLog.fastJSON
|
||||
return new JSONSerializer(enableOptimizedDatasetSchema, enableFastGuid, enableSerializerExtensions, serializeNullValues, IndentOutput).ConvertToJSON(obj);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public T ToObject<T>(string json)
|
||||
{
|
||||
return (T)ToObject(json, typeof(T));
|
||||
}
|
||||
|
||||
|
||||
|
||||
public object ToObject(string json, Type type)
|
||||
{
|
||||
var ht = new JsonParser(json).Decode() as Dictionary<string, object>;
|
||||
@@ -321,7 +320,7 @@ namespace LogentriesNLog.fastJSON
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
_getterscache.Add(type, getters);
|
||||
return getters;
|
||||
}
|
||||
@@ -449,7 +448,7 @@ namespace LogentriesNLog.fastJSON
|
||||
#if !SILVERLIGHT
|
||||
else if (pi.isDictionary || pi.isHashtable)
|
||||
oset = CreateDictionary((ArrayList)v, pi.pt, pi.GenericTypes, globaltypes);
|
||||
#else
|
||||
#else
|
||||
else if (pi.isDictionary)
|
||||
oset = CreateDictionary((List<object>)v, pi.pt, pi.GenericTypes, globaltypes);
|
||||
#endif
|
||||
@@ -818,4 +817,4 @@ namespace LogentriesNLog.fastJSON
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -170,8 +170,6 @@ namespace LogentriesNLog.fastJSON
|
||||
_output.Append(dt.Minute.ToString("00", NumberFormatInfo.InvariantInfo));
|
||||
_output.Append(":");
|
||||
_output.Append(dt.Second.ToString("00", NumberFormatInfo.InvariantInfo));
|
||||
_output.Append(".");
|
||||
_output.Append(dt.Millisecond.ToString("000", NumberFormatInfo.InvariantInfo));
|
||||
|
||||
if (JSON.Instance.UseUTCDateTime)
|
||||
_output.Append("Z");
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="NLog" version="4.5.3" targetFramework="net40" />
|
||||
</packages>
|
||||
<package id="NLog" version="2.1.0" targetFramework="net40" />
|
||||
</packages>
|
||||
|
||||
@@ -198,8 +198,7 @@ namespace Marr.Data.Mapping
|
||||
{
|
||||
return AutoMapPropertiesWhere(m =>
|
||||
m.MemberType == MemberTypes.Property &&
|
||||
!DataHelper.IsSimpleType((m as PropertyInfo).PropertyType) &&
|
||||
!MapRepository.Instance.TypeConverters.ContainsKey((m as PropertyInfo).PropertyType));
|
||||
!DataHelper.IsSimpleType((m as PropertyInfo).PropertyType));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -144,6 +144,7 @@
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq.Expressions;
|
||||
using System.Reflection;
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq.Expressions;
|
||||
using System.Reflection;
|
||||
using System.Threading;
|
||||
|
||||
namespace Microsoft.AspNet.SignalR.Infrastructure
|
||||
|
||||
@@ -4,7 +4,7 @@ using System.Diagnostics;
|
||||
|
||||
namespace Microsoft.AspNet.SignalR.Infrastructure
|
||||
{
|
||||
public class NoOpPerformanceCounter : IPerformanceCounter
|
||||
internal class NoOpPerformanceCounter : IPerformanceCounter
|
||||
{
|
||||
public string CounterName
|
||||
{
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace Microsoft.AspNet.SignalR.Infrastructure
|
||||
}
|
||||
catch(NotImplementedException)
|
||||
{
|
||||
// This happens on mono
|
||||
// This happens on mono
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -43,9 +43,9 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net40\Newtonsoft.Json.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\Newtonsoft.Json.6.0.6\lib\net40\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
@@ -276,9 +276,10 @@
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
</Project>
|
||||
|
||||
@@ -6,6 +6,7 @@ using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.SignalR.Configuration;
|
||||
using Microsoft.AspNet.SignalR.Hosting;
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.SignalR.Infrastructure;
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.SignalR.Hosting;
|
||||
using Microsoft.AspNet.SignalR.Infrastructure;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net40" />
|
||||
<package id="Newtonsoft.Json" version="6.0.6" targetFramework="net40" />
|
||||
</packages>
|
||||
@@ -102,6 +102,7 @@
|
||||
</ItemGroup>
|
||||
<Import Project="..\Common\Microsoft.AspNet.SignalR.targets" />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
@@ -109,4 +110,4 @@
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
</Project>
|
||||
@@ -5,10 +5,13 @@ using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Security.Principal;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.SignalR.Owin.Infrastructure;
|
||||
using Microsoft.AspNet.SignalR.Hosting;
|
||||
|
||||
namespace Microsoft.AspNet.SignalR.Owin
|
||||
{
|
||||
using WebSocketFunc = Func<IDictionary<string, object>, Task>;
|
||||
public partial class ServerRequest :
|
||||
#if NET45
|
||||
IWebSocketRequest
|
||||
|
||||
@@ -774,8 +774,7 @@ namespace MonoTorrent
|
||||
break;
|
||||
|
||||
case ("nodes"):
|
||||
if (keypair.Value.ToString().Length != 0)
|
||||
this.nodes = (BEncodedList)keypair.Value;
|
||||
this.nodes = (BEncodedList)keypair.Value;
|
||||
break;
|
||||
|
||||
case ("comment.utf-8"):
|
||||
|
||||
@@ -21,33 +21,20 @@ namespace NzbDrone.Api.Test.ClientSchemaTests
|
||||
public void schema_should_have_proper_fields()
|
||||
{
|
||||
var model = new TestModel
|
||||
{
|
||||
FirstName = "Bob",
|
||||
LastName = "Poop"
|
||||
};
|
||||
{
|
||||
FirstName = "Bob",
|
||||
LastName = "Poop"
|
||||
};
|
||||
|
||||
var schema = SchemaBuilder.ToSchema(model);
|
||||
|
||||
schema.Should().Contain(c => c.Order == 1 && c.Name == "LastName" && c.Label == "Last Name" && c.HelpText == "Your Last Name" && (string)c.Value == "Poop");
|
||||
schema.Should().Contain(c => c.Order == 0 && c.Name == "FirstName" && c.Label == "First Name" && c.HelpText == "Your First Name" && (string)c.Value == "Bob");
|
||||
schema.Should().Contain(c => c.Order == 1 && c.Name == "LastName" && c.Label == "Last Name" && c.HelpText == "Your Last Name" && (string) c.Value == "Poop");
|
||||
schema.Should().Contain(c => c.Order == 0 && c.Name == "FirstName" && c.Label == "First Name" && c.HelpText == "Your First Name" && (string) c.Value == "Bob");
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void schema_should_have_nested_fields()
|
||||
{
|
||||
var model = new NestedTestModel();
|
||||
model.Name.FirstName = "Bob";
|
||||
model.Name.LastName = "Poop";
|
||||
|
||||
var schema = SchemaBuilder.ToSchema(model);
|
||||
|
||||
schema.Should().Contain(c => c.Order == 0 && c.Name == "Name.FirstName" && c.Label == "First Name" && c.HelpText == "Your First Name" && (string)c.Value == "Bob");
|
||||
schema.Should().Contain(c => c.Order == 1 && c.Name == "Name.LastName" && c.Label == "Last Name" && c.HelpText == "Your Last Name" && (string)c.Value == "Poop");
|
||||
schema.Should().Contain(c => c.Order == 2 && c.Name == "Quote" && c.Label == "Quote" && c.HelpText == "Your Favorite Quote");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class TestModel
|
||||
{
|
||||
[FieldDefinition(0, Label = "First Name", HelpText = "Your First Name")]
|
||||
@@ -58,13 +45,4 @@ namespace NzbDrone.Api.Test.ClientSchemaTests
|
||||
|
||||
public string Other { get; set; }
|
||||
}
|
||||
|
||||
public class NestedTestModel
|
||||
{
|
||||
[FieldDefinition(0)]
|
||||
public TestModel Name { get; set; } = new TestModel();
|
||||
|
||||
[FieldDefinition(1, Label = "Quote", HelpText = "Your Favorite Quote")]
|
||||
public string Quote { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
168
src/NzbDrone.Api.Test/MappingTests/ResourceMappingFixture.cs
Normal file
@@ -0,0 +1,168 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using FizzWare.NBuilder;
|
||||
using FluentAssertions;
|
||||
using Marr.Data;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Api.Commands;
|
||||
using NzbDrone.Api.Config;
|
||||
using NzbDrone.Api.Episodes;
|
||||
using NzbDrone.Api.History;
|
||||
using NzbDrone.Api.Indexers;
|
||||
using NzbDrone.Api.Logs;
|
||||
using NzbDrone.Api.Mapping;
|
||||
using NzbDrone.Api.Profiles;
|
||||
using NzbDrone.Api.RootFolders;
|
||||
using NzbDrone.Api.Series;
|
||||
using NzbDrone.Core.DecisionEngine;
|
||||
using NzbDrone.Core.Instrumentation;
|
||||
using NzbDrone.Core.Messaging.Commands;
|
||||
using NzbDrone.Core.Organizer;
|
||||
using NzbDrone.Core.Parser.Model;
|
||||
using NzbDrone.Core.Profiles;
|
||||
using NzbDrone.Core.Qualities;
|
||||
using NzbDrone.Core.RootFolders;
|
||||
using NzbDrone.Core.Tv;
|
||||
using NzbDrone.Core.Update.Commands;
|
||||
using NzbDrone.Test.Common;
|
||||
using System.Linq;
|
||||
|
||||
namespace NzbDrone.Api.Test.MappingTests
|
||||
{
|
||||
[TestFixture]
|
||||
public class ResourceMappingFixture : TestBase
|
||||
{
|
||||
[TestCase(typeof(Core.Tv.Series), typeof(SeriesResource))]
|
||||
[TestCase(typeof(Episode), typeof(EpisodeResource))]
|
||||
[TestCase(typeof(RootFolder), typeof(RootFolderResource))]
|
||||
[TestCase(typeof(NamingConfig), typeof(NamingConfigResource))]
|
||||
// [TestCase(typeof(IndexerDefinition), typeof(IndexerResource))] //TODO: Ignoring because we don't have a good way to ignore properties with value injector
|
||||
[TestCase(typeof(ReleaseInfo), typeof(ReleaseResource))]
|
||||
[TestCase(typeof(ParsedEpisodeInfo), typeof(ReleaseResource))]
|
||||
[TestCase(typeof(DownloadDecision), typeof(ReleaseResource))]
|
||||
[TestCase(typeof(Core.History.History), typeof(HistoryResource))]
|
||||
[TestCase(typeof(Profile), typeof(ProfileResource))]
|
||||
[TestCase(typeof(ProfileQualityItem), typeof(ProfileQualityItemResource))]
|
||||
[TestCase(typeof(Log), typeof(LogResource))]
|
||||
[TestCase(typeof(Command), typeof(CommandResource))]
|
||||
public void matching_fields(Type modelType, Type resourceType)
|
||||
{
|
||||
MappingValidation.ValidateMapping(modelType, resourceType);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_map_lazy_loaded_values_should_not_be_inject_if_not_loaded()
|
||||
{
|
||||
var modelWithLazy = new ModelWithLazy()
|
||||
{
|
||||
Guid = new TestLazyLoaded<Guid>()
|
||||
};
|
||||
|
||||
modelWithLazy.InjectTo<ModelWithNoLazy>().Guid.Should().BeEmpty();
|
||||
|
||||
modelWithLazy.Guid.IsLoaded.Should().BeFalse();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_map_lay_loaded_values_should_be_inject_if_loaded()
|
||||
{
|
||||
|
||||
var guid = Guid.NewGuid();
|
||||
|
||||
var modelWithLazy = new ModelWithLazy()
|
||||
{
|
||||
Guid = new LazyLoaded<Guid>(guid)
|
||||
};
|
||||
|
||||
modelWithLazy.InjectTo<ModelWithNoLazy>().Guid.Should().Be(guid);
|
||||
|
||||
modelWithLazy.Guid.IsLoaded.Should().BeTrue();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_be_able_to_map_lists()
|
||||
{
|
||||
var modelList = Builder<TestModel>.CreateListOfSize(10).Build();
|
||||
|
||||
var resourceList = modelList.InjectTo<List<TestResource>>();
|
||||
|
||||
resourceList.Should().HaveSameCount(modelList);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_map_wrapped_models()
|
||||
{
|
||||
var modelList = Builder<TestModel>.CreateListOfSize(10).Build().ToList();
|
||||
|
||||
var wrapper = new TestModelWrapper
|
||||
{
|
||||
TestlList = modelList
|
||||
};
|
||||
|
||||
wrapper.InjectTo<TestResourceWrapper>();
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void should_map_profile()
|
||||
{
|
||||
var profileResource = new ProfileResource
|
||||
{
|
||||
Cutoff = Quality.WEBDL1080p,
|
||||
Items = new List<ProfileQualityItemResource> { new ProfileQualityItemResource { Quality = Quality.WEBDL1080p, Allowed = true } }
|
||||
};
|
||||
|
||||
|
||||
profileResource.InjectTo<Profile>();
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_map_tracked_command()
|
||||
{
|
||||
var commandResource = new CommandModel { Body = new ApplicationUpdateCommand() };
|
||||
commandResource.InjectTo<CommandResource>();
|
||||
}
|
||||
}
|
||||
|
||||
public class ModelWithLazy
|
||||
{
|
||||
public LazyLoaded<Guid> Guid { get; set; }
|
||||
}
|
||||
|
||||
public class ModelWithNoLazy
|
||||
{
|
||||
public Guid Guid { get; set; }
|
||||
}
|
||||
|
||||
public class TestLazyLoaded<T> : LazyLoaded<T>
|
||||
{
|
||||
public override void Prepare(Func<IDataMapper> dataMapperFactory, object parent)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class TestModelWrapper
|
||||
{
|
||||
public List<TestModel> TestlList { get; set; }
|
||||
}
|
||||
|
||||
public class TestResourceWrapper
|
||||
{
|
||||
public List<TestResource> TestList { get; set; }
|
||||
}
|
||||
|
||||
public class TestModel
|
||||
{
|
||||
public string Field1 { get; set; }
|
||||
public string Field2 { get; set; }
|
||||
}
|
||||
|
||||
public class TestResource
|
||||
{
|
||||
public string Field1 { get; set; }
|
||||
public string Field2 { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -38,21 +38,17 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="FizzWare.NBuilder, Version=4.0.0.115, Culture=neutral, PublicKeyToken=5651b03e12e42c12, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NBuilder.4.0.0\lib\net40\FizzWare.NBuilder.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Reference Include="FluentAssertions, Version=3.2.1.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\FluentAssertions.3.2.1\lib\net40\FluentAssertions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FluentAssertions, Version=4.19.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\FluentAssertions.4.19.0\lib\net40\FluentAssertions.dll</HintPath>
|
||||
<Reference Include="FluentAssertions.Core, Version=3.2.1.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\FluentAssertions.3.2.1\lib\net40\FluentAssertions.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FluentAssertions.Core, Version=4.19.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\FluentAssertions.4.19.0\lib\net40\FluentAssertions.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Moq, Version=4.0.10827.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework, Version=3.6.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NUnit.3.6.0\lib\net40\nunit.framework.dll</HintPath>
|
||||
<Reference Include="nunit.framework, Version=2.6.3.13283, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
@@ -61,12 +57,19 @@
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="FizzWare.NBuilder">
|
||||
<HintPath>..\packages\NBuilder.3.0.1.1\lib\FizzWare.NBuilder.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Moq">
|
||||
<HintPath>..\packages\Moq.4.0.10827\lib\NET40\Moq.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Omu.ValueInjecter">
|
||||
<HintPath>..\packages\ValueInjecter.2.3.3\lib\net35\Omu.ValueInjecter.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ClientSchemaTests\SchemaBuilderFixture.cs" />
|
||||
<Compile Include="MappingTests\ResourceMappingFixture.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -101,6 +104,7 @@
|
||||
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
@@ -108,4 +112,4 @@
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
</Project>
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="FluentAssertions" version="4.19.0" targetFramework="net40" />
|
||||
<package id="Moq" version="4.0.10827" targetFramework="net40" />
|
||||
<package id="NBuilder" version="4.0.0" targetFramework="net40" />
|
||||
<package id="NUnit" version="3.6.0" targetFramework="net40" />
|
||||
</packages>
|
||||
<package id="FluentAssertions" version="3.2.1" targetFramework="net40" />
|
||||
<package id="Moq" version="4.0.10827" />
|
||||
<package id="NBuilder" version="3.0.1.1" targetFramework="net40" />
|
||||
<package id="NUnit" version="2.6.3" targetFramework="net40" />
|
||||
<package id="ValueInjecter" version="2.3.3" targetFramework="net40" />
|
||||
</packages>
|
||||
|
||||
@@ -3,7 +3,6 @@ using Nancy;
|
||||
using Nancy.Authentication.Forms;
|
||||
using Nancy.Extensions;
|
||||
using Nancy.ModelBinding;
|
||||
using NzbDrone.Common.EnsureThat;
|
||||
using NzbDrone.Core.Authentication;
|
||||
using NzbDrone.Core.Configuration;
|
||||
|
||||
@@ -24,11 +23,6 @@ namespace NzbDrone.Api.Authentication
|
||||
|
||||
private Response Login(LoginResource resource)
|
||||
{
|
||||
Ensure.That(resource.Username, () => resource.Username).IsNotNullOrWhiteSpace();
|
||||
|
||||
// TODO: A null or empty password should not be allowed, uncomment in v3
|
||||
//Ensure.That(resource.Password, () => resource.Password).IsNotNullOrWhiteSpace();
|
||||
|
||||
var user = _userService.FindUser(resource.Username, resource.Password);
|
||||
|
||||
if (user == null)
|
||||
@@ -43,7 +37,7 @@ namespace NzbDrone.Api.Authentication
|
||||
expiry = DateTime.UtcNow.AddDays(7);
|
||||
}
|
||||
|
||||
return this.LoginAndRedirect(user.Identifier, expiry, _configFileProvider.UrlBase + "/");
|
||||
return this.LoginAndRedirect(user.Identifier, expiry);
|
||||
}
|
||||
|
||||
private Response Logout()
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace NzbDrone.Api.Authentication
|
||||
private readonly IUserService _userService;
|
||||
private static readonly NzbDroneUser AnonymousUser = new NzbDroneUser { UserName = "Anonymous" };
|
||||
|
||||
private static string API_KEY;
|
||||
private static String API_KEY;
|
||||
private static AuthenticationType AUTH_METHOD;
|
||||
|
||||
public AuthenticationService(IConfigFileProvider configFileProvider, IUserService userService)
|
||||
|
||||
@@ -27,22 +27,20 @@ namespace NzbDrone.Api.Authentication
|
||||
_configFileProvider = configFileProvider;
|
||||
}
|
||||
|
||||
public int Order => 10;
|
||||
|
||||
public void Register(IPipelines pipelines)
|
||||
{
|
||||
if (_configFileProvider.AuthenticationMethod == AuthenticationType.Forms)
|
||||
{
|
||||
RegisterFormsAuth(pipelines);
|
||||
RegisterFormsAuth(pipelines);
|
||||
}
|
||||
|
||||
else if (_configFileProvider.AuthenticationMethod == AuthenticationType.Basic)
|
||||
{
|
||||
pipelines.EnableBasicAuthentication(new BasicAuthenticationConfiguration(_authenticationService, "Sonarr"));
|
||||
pipelines.EnableBasicAuthentication(new BasicAuthenticationConfiguration(_authenticationService, "Sonarr"));
|
||||
}
|
||||
|
||||
pipelines.BeforeRequest.AddItemToEndOfPipeline((Func<NancyContext, Response>) RequiresAuthentication);
|
||||
pipelines.AfterRequest.AddItemToEndOfPipeline((Action<NancyContext>) RemoveLoginHooksForApiCalls);
|
||||
pipelines.BeforeRequest.AddItemToEndOfPipeline(RequiresAuthentication);
|
||||
pipelines.AfterRequest.AddItemToEndOfPipeline(RemoveLoginHooksForApiCalls);
|
||||
}
|
||||
|
||||
private Response RequiresAuthentication(NancyContext context)
|
||||
@@ -64,13 +62,10 @@ namespace NzbDrone.Api.Authentication
|
||||
new DefaultHmacProvider(new PassphraseKeyGenerator(_configService.HmacPassphrase, Encoding.ASCII.GetBytes(_configService.HmacSalt)))
|
||||
);
|
||||
|
||||
FormsAuthentication.FormsAuthenticationCookieName = "_ncfa_sonarr";
|
||||
|
||||
FormsAuthentication.Enable(pipelines, new FormsAuthenticationConfiguration
|
||||
{
|
||||
RedirectUrl = _configFileProvider.UrlBase + "/login",
|
||||
UserMapper = _authenticationService,
|
||||
Path = _configFileProvider.UrlBase,
|
||||
CryptographyConfiguration = cryptographyConfiguration
|
||||
});
|
||||
}
|
||||
@@ -80,7 +75,7 @@ namespace NzbDrone.Api.Authentication
|
||||
if (context.Request.IsApiRequest())
|
||||
{
|
||||
if ((context.Response.StatusCode == HttpStatusCode.SeeOther &&
|
||||
context.Response.Headers["Location"].StartsWith($"{_configFileProvider.UrlBase}/login", StringComparison.InvariantCultureIgnoreCase)) ||
|
||||
context.Response.Headers["Location"].StartsWith("/login", StringComparison.InvariantCultureIgnoreCase)) ||
|
||||
context.Response.StatusCode == HttpStatusCode.Unauthorized)
|
||||
{
|
||||
context.Response = new { Error = "Unauthorized" }.AsResponse(HttpStatusCode.Unauthorized);
|
||||
|
||||
@@ -16,9 +16,15 @@ namespace NzbDrone.Api.Blacklist
|
||||
|
||||
private PagingResource<BlacklistResource> GetBlacklist(PagingResource<BlacklistResource> pagingResource)
|
||||
{
|
||||
var pagingSpec = pagingResource.MapToPagingSpec<BlacklistResource, Core.Blacklisting.Blacklist>("id", SortDirection.Ascending);
|
||||
var pagingSpec = new PagingSpec<Core.Blacklisting.Blacklist>
|
||||
{
|
||||
Page = pagingResource.Page,
|
||||
PageSize = pagingResource.PageSize,
|
||||
SortKey = pagingResource.SortKey,
|
||||
SortDirection = pagingResource.SortDirection
|
||||
};
|
||||
|
||||
return ApplyToPage(_blacklistService.Paged, pagingSpec, BlacklistResourceMapper.MapToResource);
|
||||
return ApplyToPage(_blacklistService.Paged, pagingSpec);
|
||||
}
|
||||
|
||||
private void DeleteBlacklist(int id)
|
||||
@@ -26,4 +32,4 @@ namespace NzbDrone.Api.Blacklist
|
||||
_blacklistService.Delete(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||