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
db45d968
Commit
db45d968
authored
Nov 08, 2016
by
wudizhanche1000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ygopro特殊路径
parent
b7ea0516
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
87 additions
and
32 deletions
+87
-32
app/download.service.ts
app/download.service.ts
+4
-1
app/install.service.ts
app/install.service.ts
+8
-1
apps.json
apps.json
+75
-30
No files found.
app/download.service.ts
View file @
db45d968
...
...
@@ -13,7 +13,7 @@ const Aria2 = require('aria2');
@
Injectable
()
export
class
DownloadService
{
aria2
=
new
Aria2
();
baseURL
=
'
http://thief.mycard.moe/metalinks/
'
baseURL
=
'
http://thief.mycard.moe/metalinks/
'
;
appGidMap
=
new
Map
<
App
,
string
>
();
gidAppMap
=
new
Map
<
string
,
App
>
();
eventEmitter
=
new
EventEmitter
();
...
...
@@ -106,6 +106,9 @@ export class DownloadService {
return
app
;
}
else
{
let
meta4link
=
`
${
this
.
baseURL
}${
id
}
.meta4`
;
if
(
id
===
"
ygopro
"
)
{
meta4link
=
`
${
this
.
baseURL
}${
id
}
-
${
process
.
platform
}
.meta4`
}
let
response
=
await
this
.
http
.
get
(
meta4link
).
toPromise
();
let
meta4
=
btoa
(
response
.
text
());
let
gid
=
(
await
this
.
aria2
.
addMetalink
(
meta4
,
{
dir
:
path
}))[
0
];
...
...
app/install.service.ts
View file @
db45d968
...
...
@@ -121,7 +121,11 @@ export class InstallService {
}
async
getChecksumFile
(
app
:
App
):
Promise
<
Map
<
string
,
string
>
>
{
let
checksumMap
:
Map
<
string
,
string
>
=
await
this
.
http
.
get
(
this
.
checksumUri
+
app
.
id
)
let
checksumUrl
=
this
.
checksumUri
+
app
.
id
;
if
(
app
.
id
===
"
ygopro
"
)
{
checksumUrl
=
this
.
checksumUri
+
app
.
id
+
"
-
"
+
process
.
platform
;
}
let
checksumMap
:
Map
<
string
,
string
>
=
await
this
.
http
.
get
(
checksumUrl
)
.
map
((
response
)
=>
{
let
map
=
new
Map
<
string
,
string
>
();
for
(
let
line
of
response
.
text
().
split
(
'
\n
'
))
{
...
...
@@ -144,6 +148,9 @@ export class InstallService {
let
options
=
this
.
installQueue
.
get
(
app
);
let
checksumMap
=
await
this
.
getChecksumFile
(
app
);
let
packagePath
=
path
.
join
(
options
.
installLibrary
,
'
downloading
'
,
`
${
app
.
id
}
.tar.xz`
);
if
(
app
.
id
===
"
ygopro
"
)
{
packagePath
=
path
.
join
(
options
.
installLibrary
,
'
downloading
'
,
`
${
app
.
id
}
-
${
process
.
platform
}
.tar.xz`
);
}
let
destPath
:
string
;
if
(
app
.
parent
)
{
let
differenceSet
=
new
Set
<
string
>
();
...
...
apps.json
View file @
db45d968
...
...
@@ -217,9 +217,12 @@
"language"
],
"dependencies"
:
{
"win32"
:
[],
"win32"
:
[
"th07"
],
"darwin"
:
[
"wine"
"wine"
,
"th07"
]
},
"references"
:
{
...
...
@@ -336,9 +339,12 @@
"language"
],
"dependencies"
:
{
"win32"
:
[],
"win32"
:
[
"th075"
],
"darwin"
:
[
"wine"
"wine"
,
"th075"
]
},
"references"
:
{
...
...
@@ -455,9 +461,12 @@
"language"
],
"dependencies"
:
{
"win32"
:
[],
"win32"
:
[
"th08"
],
"darwin"
:
[
"wine"
"wine"
,
"th08"
]
},
"references"
:
{
...
...
@@ -574,9 +583,12 @@
"language"
],
"dependencies"
:
{
"win32"
:
[],
"win32"
:
[
"th09"
],
"darwin"
:
[
"wine"
"wine"
,
"th09"
]
},
"references"
:
{
...
...
@@ -693,9 +705,12 @@
"language"
],
"dependencies"
:
{
"win32"
:
[],
"win32"
:
[
"th095"
],
"darwin"
:
[
"wine"
"wine"
,
"th095"
]
},
"references"
:
{
...
...
@@ -812,9 +827,12 @@
"language"
],
"dependencies"
:
{
"win32"
:
[],
"win32"
:
[
"th1"
],
"darwin"
:
[
"wine"
"wine"
,
"th1"
]
},
"references"
:
{
...
...
@@ -931,9 +949,12 @@
"language"
],
"dependencies"
:
{
"win32"
:
[],
"win32"
:
[
"th10"
],
"darwin"
:
[
"wine"
"wine"
,
"th10"
]
},
"references"
:
{
...
...
@@ -1050,9 +1071,12 @@
"language"
],
"dependencies"
:
{
"win32"
:
[],
"win32"
:
[
"th105"
],
"darwin"
:
[
"wine"
"wine"
,
"th105"
]
},
"references"
:
{
...
...
@@ -1169,9 +1193,12 @@
"language"
],
"dependencies"
:
{
"win32"
:
[],
"win32"
:
[
"th11"
],
"darwin"
:
[
"wine"
"wine"
,
"th11"
]
},
"references"
:
{
...
...
@@ -1288,9 +1315,12 @@
"language"
],
"dependencies"
:
{
"win32"
:
[],
"win32"
:
[
"th12"
],
"darwin"
:
[
"wine"
"wine"
,
"th12"
]
},
"references"
:
{
...
...
@@ -1421,9 +1451,12 @@
"language"
],
"dependencies"
:
{
"win32"
:
[],
"win32"
:
[
"th123"
],
"darwin"
:
[
"wine"
"wine"
,
"th123"
]
},
"references"
:
{
...
...
@@ -1540,9 +1573,12 @@
"language"
],
"dependencies"
:
{
"win32"
:
[],
"win32"
:
[
"th2"
],
"darwin"
:
[
"wine"
"wine"
,
"th2"
]
},
"references"
:
{
...
...
@@ -1659,9 +1695,12 @@
"language"
],
"dependencies"
:
{
"win32"
:
[],
"win32"
:
[
"th3"
],
"darwin"
:
[
"wine"
"wine"
,
"th3"
]
},
"references"
:
{
...
...
@@ -1778,9 +1817,12 @@
"language"
],
"dependencies"
:
{
"win32"
:
[],
"win32"
:
[
"th4"
],
"darwin"
:
[
"wine"
"wine"
,
"th4"
]
},
"references"
:
{
...
...
@@ -1897,9 +1939,12 @@
"language"
],
"dependencies"
:
{
"win32"
:
[],
"win32"
:
[
"th5"
],
"darwin"
:
[
"wine"
"wine"
,
"th5"
]
},
"references"
:
{
...
...
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