Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
mycard
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
syntax_j
mycard
Commits
6ae00cd1
Commit
6ae00cd1
authored
Dec 11, 2016
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aria2 强制IPv4
parent
ce76a122
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
app/download.service.ts
app/download.service.ts
+3
-5
package.json
package.json
+1
-1
No files found.
app/download.service.ts
View file @
6ae00cd1
...
@@ -3,11 +3,8 @@
...
@@ -3,11 +3,8 @@
*/
*/
import
{
Injectable
,
NgZone
,
EventEmitter
}
from
"
@angular/core
"
;
import
{
Injectable
,
NgZone
,
EventEmitter
}
from
"
@angular/core
"
;
import
{
Http
}
from
"
@angular/http
"
;
import
{
Http
}
from
"
@angular/http
"
;
import
{
Observable
}
from
"
rxjs/Observable
"
;
import
{
App
}
from
"
./app
"
;
import
{
Observer
}
from
"
rxjs
"
;
import
Timer
=
NodeJS
.
Timer
;
import
{
error
}
from
"
util
"
;
import
{
error
}
from
"
util
"
;
import
Timer
=
NodeJS
.
Timer
;
const
Logger
=
{
const
Logger
=
{
"
error
"
:
(
message
:
string
)
=>
{
"
error
"
:
(
message
:
string
)
=>
{
console
.
error
(
"
DownloadService:
"
,
message
);
console
.
error
(
"
DownloadService:
"
,
message
);
...
@@ -97,7 +94,8 @@ export class DownloadStatus {
...
@@ -97,7 +94,8 @@ export class DownloadStatus {
@
Injectable
()
@
Injectable
()
export
class
DownloadService
{
export
class
DownloadService
{
aria2
=
new
Aria2
();
// 强制指定IPv4,接到过一个反馈无法监听v6的。默认的host值是localhost,会连v6。
aria2
=
new
Aria2
({
host
:
'
127.0.0.1
'
});
open
=
this
.
aria2
.
open
();
open
=
this
.
aria2
.
open
();
updateEmitter
=
new
EventEmitter
<
void
>
();
updateEmitter
=
new
EventEmitter
<
void
>
();
...
...
package.json
View file @
6ae00cd1
{
{
"name"
:
"mycard"
,
"name"
:
"mycard"
,
"version"
:
"3.0.
2
"
,
"version"
:
"3.0.
3
"
,
"description"
:
"mycard"
,
"description"
:
"mycard"
,
"keywords"
:
[],
"keywords"
:
[],
"author"
:
"zh99998 <zh99998@gmail.com>"
,
"author"
:
"zh99998 <zh99998@gmail.com>"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment