Private GIT
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
Jackett
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vlbox
Jackett
Commits
4f5d7a3d
Commit
4f5d7a3d
authored
9 years ago
by
Azerelat
Browse files
Options
Downloads
Patches
Plain Diff
Make category mapping a little less confusing #255
parent
f26f2d6f
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Jackett/Indexers/BaseIndexer.cs
+4
-24
4 additions, 24 deletions
src/Jackett/Indexers/BaseIndexer.cs
with
4 additions
and
24 deletions
src/Jackett/Indexers/BaseIndexer.cs
+
4
−
24
View file @
4f5d7a3d
...
@@ -436,43 +436,23 @@ namespace Jackett.Indexers
...
@@ -436,43 +436,23 @@ namespace Jackett.Indexers
}
}
}
}
protected
void
AddCategoryMapping
(
string
trackerCategory
,
int
newznabCategory
)
{
categoryMapping
.
Add
(
new
CategoryMapping
(
trackerCategory
,
newznabCategory
));
}
protected
void
AddCategoryMapping
(
int
trackerCategory
,
TorznabCategory
newznabCategory
)
{
categoryMapping
.
Add
(
new
CategoryMapping
(
trackerCategory
.
ToString
(),
newznabCategory
.
ID
));
if
(!
TorznabCaps
.
Categories
.
Contains
(
newznabCategory
))
TorznabCaps
.
Categories
.
Add
(
newznabCategory
);
}
protected
void
AddCategoryMapping
(
string
trackerCategory
,
TorznabCategory
newznabCategory
)
protected
void
AddCategoryMapping
(
string
trackerCategory
,
TorznabCategory
newznabCategory
)
{
{
categoryMapping
.
Add
(
new
CategoryMapping
(
trackerCategory
.
ToString
()
,
newznabCategory
.
ID
));
categoryMapping
.
Add
(
new
CategoryMapping
(
trackerCategory
,
newznabCategory
.
ID
));
if
(!
TorznabCaps
.
Categories
.
Contains
(
newznabCategory
))
if
(!
TorznabCaps
.
Categories
.
Contains
(
newznabCategory
))
TorznabCaps
.
Categories
.
Add
(
newznabCategory
);
TorznabCaps
.
Categories
.
Add
(
newznabCategory
);
}
}
protected
void
AddCategoryMapping
(
int
trackerCategory
,
int
newznabCategory
)
protected
void
AddCategoryMapping
(
int
trackerCategory
,
TorznabCategory
newznabCategory
)
{
{
categoryMapping
.
Add
(
new
CategoryMapping
(
trackerCategory
.
ToString
(),
newznabCategory
)
)
;
Add
CategoryMapping
(
trackerCategory
.
ToString
(),
newznabCategory
);
}
}
protected
void
AddMultiCategoryMapping
(
TorznabCategory
newznabCategory
,
params
int
[]
trackerCategories
)
protected
void
AddMultiCategoryMapping
(
TorznabCategory
newznabCategory
,
params
int
[]
trackerCategories
)
{
{
foreach
(
var
trackerCat
in
trackerCategories
)
foreach
(
var
trackerCat
in
trackerCategories
)
{
{
categoryMapping
.
Add
(
new
CategoryMapping
(
trackerCat
.
ToString
(),
newznabCategory
.
ID
));
AddCategoryMapping
(
trackerCat
,
newznabCategory
);
}
}
protected
void
AddMultiCategoryMapping
(
int
trackerCategory
,
params
TorznabCategory
[]
newznabCategories
)
{
foreach
(
var
newznabCat
in
newznabCategories
)
{
categoryMapping
.
Add
(
new
CategoryMapping
(
trackerCategory
.
ToString
(),
newznabCat
.
ID
));
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment