Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Room Park Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vladislav Bogdashkin
Room Park Android
Commits
8bd9691c
Commit
8bd9691c
authored
Jul 28, 2020
by
Vladislav Bogdashkin
🎣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usage file destionation
parent
de08b6cb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
TourDownloadData.kt
...visual/roompark/data/service/download/TourDownloadData.kt
+4
-1
TourDownloadService.kt
...ual/roompark/data/service/download/TourDownloadService.kt
+1
-1
No files found.
app/src/main/java/com/biganto/visual/roompark/data/service/download/TourDownloadData.kt
View file @
8bd9691c
...
@@ -18,7 +18,9 @@ data class TourFileData(
...
@@ -18,7 +18,9 @@ data class TourFileData(
var
fileDownloadedSize
:
Long
=
0L
,
var
fileDownloadedSize
:
Long
=
0L
,
var
tempTourTotalDiff
:
Long
=
0L
,
var
tempTourTotalDiff
:
Long
=
0L
,
var
isDownloaded
:
Boolean
=
false
,
var
isDownloaded
:
Boolean
=
false
,
val
fatalState
:
DownloadState
?
=
null
val
fatalState
:
DownloadState
?
=
null
,
var
destination
:
String
)
{
)
{
constructor
(
entity
:
FileEntity
,
junction
:
TourFileJunctionEntity
)
:
this
(
constructor
(
entity
:
FileEntity
,
junction
:
TourFileJunctionEntity
)
:
this
(
fileUrl
=
junction
.
file
fileUrl
=
junction
.
file
...
@@ -28,5 +30,6 @@ data class TourFileData(
...
@@ -28,5 +30,6 @@ data class TourFileData(
,
fileDownloadedSize
=
entity
.
downloadedSize
,
fileDownloadedSize
=
entity
.
downloadedSize
,
tempTourTotalDiff
=
0L
,
tempTourTotalDiff
=
0L
,
isDownloaded
=
entity
.
isDownloaded
,
isDownloaded
=
entity
.
isDownloaded
,
destination
=
entity
.
destination
)
)
}
}
app/src/main/java/com/biganto/visual/roompark/data/service/download/TourDownloadService.kt
View file @
8bd9691c
...
@@ -333,7 +333,7 @@ class DownloadManagerService @Inject constructor(
...
@@ -333,7 +333,7 @@ class DownloadManagerService @Inject constructor(
if
(
model
.
fileDownloadedSize
>
0
)
if
(
model
.
fileDownloadedSize
>
0
)
header
=
hashMapOf
(
Pair
(
"Range"
,
"bytes=${model.fileDownloadedSize}-"
))
header
=
hashMapOf
(
Pair
(
"Range"
,
"bytes=${model.fileDownloadedSize}-"
))
api
.
downloadFile
(
model
.
fileUrl
.
revisionUri
()
,
header
)
api
.
downloadFile
(
model
.
destination
,
header
)
.
doOnError
{
.
doOnError
{
Timber
.
e
(
it
)
Timber
.
e
(
it
)
setTourStatus
(
model
.
tourId
,
DownloadState
.
Crushed
)
setTourStatus
(
model
.
tourId
,
DownloadState
.
Crushed
)
...
...
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