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
1879ed89
Commit
1879ed89
authored
Feb 17, 2016
by
flightlevel
Browse files
Options
Downloads
Patches
Plain Diff
DanishBits: Fix publish time
DanishBits: Fix publish time
parent
f8fcf2fb
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Jackett/Indexers/DanishBits.cs
+10
-11
10 additions, 11 deletions
src/Jackett/Indexers/DanishBits.cs
with
10 additions
and
11 deletions
src/Jackett/Indexers/DanishBits.cs
+
10
−
11
View file @
1879ed89
using
CsQuery
;
using
CsQuery
;
using
Jackett.Indexers
;
using
Jackett.Models
;
using
Jackett.Models
;
using
Jackett.Services
;
using
Jackett.Services
;
using
Jackett.Utils
;
using
Jackett.Utils.Clients
;
using
Jackett.Utils.Clients
;
using
Newtonsoft.Json.Linq
;
using
Newtonsoft.Json.Linq
;
using
NLog
;
using
NLog
;
...
@@ -10,14 +8,9 @@ using System;
...
@@ -10,14 +8,9 @@ using System;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Globalization
;
using
System.Globalization
;
using
System.Linq
;
using
System.Linq
;
using
System.Net
;
using
System.Net.Http
;
using
System.Net.Http.Headers
;
using
System.Text
;
using
System.Text.RegularExpressions
;
using
System.Text.RegularExpressions
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
System.Web
;
using
System.Web
;
using
System.Web.UI.WebControls
;
using
CsQuery.ExtensionMethods
;
using
CsQuery.ExtensionMethods
;
using
Jackett.Models.IndexerConfig
;
using
Jackett.Models.IndexerConfig
;
...
@@ -38,7 +31,7 @@ namespace Jackett.Indexers
...
@@ -38,7 +31,7 @@ namespace Jackett.Indexers
:
base
(
name
:
"DanishBits"
,
:
base
(
name
:
"DanishBits"
,
description
:
"A danish closed torrent tracker"
,
description
:
"A danish closed torrent tracker"
,
link
:
"https://danishbits.org/"
,
link
:
"https://danishbits.org/"
,
caps
:
Torznab
Util
.
CreateDefaultTorznabTVCap
s
(),
caps
:
new
Torznab
Capabilitie
s
(),
manager
:
i
,
manager
:
i
,
client
:
c
,
client
:
c
,
logger
:
l
,
logger
:
l
,
...
@@ -151,6 +144,13 @@ namespace Jackett.Indexers
...
@@ -151,6 +144,13 @@ namespace Jackett.Indexers
public
async
Task
<
IEnumerable
<
ReleaseInfo
>>
PerformQuery
(
TorznabQuery
query
)
public
async
Task
<
IEnumerable
<
ReleaseInfo
>>
PerformQuery
(
TorznabQuery
query
)
{
{
TimeZoneInfo
.
TransitionTime
startTransition
=
TimeZoneInfo
.
TransitionTime
.
CreateFloatingDateRule
(
new
DateTime
(
1
,
1
,
1
,
2
,
0
,
0
),
3
,
5
,
DayOfWeek
.
Sunday
);
TimeZoneInfo
.
TransitionTime
endTransition
=
TimeZoneInfo
.
TransitionTime
.
CreateFloatingDateRule
(
new
DateTime
(
1
,
1
,
1
,
3
,
0
,
0
),
10
,
5
,
DayOfWeek
.
Sunday
);
TimeSpan
delta
=
new
TimeSpan
(
1
,
0
,
0
);
TimeZoneInfo
.
AdjustmentRule
adjustment
=
TimeZoneInfo
.
AdjustmentRule
.
CreateAdjustmentRule
(
new
DateTime
(
1999
,
10
,
1
),
DateTime
.
MaxValue
.
Date
,
delta
,
startTransition
,
endTransition
);
TimeZoneInfo
.
AdjustmentRule
[]
adjustments
=
{
adjustment
};
TimeZoneInfo
denmarkTz
=
TimeZoneInfo
.
CreateCustomTimeZone
(
"Denmark Time"
,
new
TimeSpan
(
1
,
0
,
0
),
"(GMT+01:00) Denmark Time"
,
"Denmark Time"
,
"Denmark DST"
,
adjustments
);
var
releasesPerPage
=
100
;
var
releasesPerPage
=
100
;
var
releases
=
new
List
<
ReleaseInfo
>();
var
releases
=
new
List
<
ReleaseInfo
>();
...
@@ -244,8 +244,7 @@ namespace Jackett.Indexers
...
@@ -244,8 +244,7 @@ namespace Jackett.Indexers
var
addedElement
=
qRow
.
Find
(
"span.time"
).
FirstElement
();
var
addedElement
=
qRow
.
Find
(
"span.time"
).
FirstElement
();
var
addedStr
=
addedElement
.
GetAttribute
(
"title"
);
var
addedStr
=
addedElement
.
GetAttribute
(
"title"
);
release
.
PublishDate
=
DateTime
.
ParseExact
(
addedStr
,
"MMM dd yyyy, HH:mm"
,
release
.
PublishDate
=
TimeZoneInfo
.
ConvertTimeToUtc
(
DateTime
.
ParseExact
(
addedStr
,
"MMM dd yyyy, HH:mm"
,
CultureInfo
.
InvariantCulture
),
denmarkTz
).
ToLocalTime
();
CultureInfo
.
InvariantCulture
);
var
columns
=
qRow
.
Children
();
var
columns
=
qRow
.
Children
();
var
seedersElement
=
columns
.
Reverse
().
Skip
(
1
).
First
();
var
seedersElement
=
columns
.
Reverse
().
Skip
(
1
).
First
();
...
...
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