New home view layout (#58)
* Home layout refactor, moved new download to dialog * sort downloads by date
This commit is contained in:
@@ -116,7 +116,10 @@ func (p *Process) Start(path, filename string) {
|
||||
if err != nil {
|
||||
log.Println("Cannot retrieve info for", p.url)
|
||||
}
|
||||
info := DownloadInfo{URL: p.url}
|
||||
info := DownloadInfo{
|
||||
URL: p.url,
|
||||
CreatedAt: time.Now(),
|
||||
}
|
||||
json.Unmarshal(stdout, &info)
|
||||
p.mem.UpdateInfo(p.id, info)
|
||||
}()
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package server
|
||||
|
||||
import "time"
|
||||
|
||||
// Progress for the Running call
|
||||
type DownloadProgress struct {
|
||||
Percentage string `json:"percentage"`
|
||||
@@ -9,14 +11,15 @@ type DownloadProgress struct {
|
||||
|
||||
// Used to deser the yt-dlp -J output
|
||||
type DownloadInfo struct {
|
||||
URL string `json:"url"`
|
||||
Title string `json:"title"`
|
||||
Thumbnail string `json:"thumbnail"`
|
||||
Resolution string `json:"resolution"`
|
||||
Size int32 `json:"filesize_approx"`
|
||||
VCodec string `json:"vcodec"`
|
||||
ACodec string `json:"acodec"`
|
||||
Extension string `json:"ext"`
|
||||
URL string `json:"url"`
|
||||
Title string `json:"title"`
|
||||
Thumbnail string `json:"thumbnail"`
|
||||
Resolution string `json:"resolution"`
|
||||
Size int32 `json:"filesize_approx"`
|
||||
VCodec string `json:"vcodec"`
|
||||
ACodec string `json:"acodec"`
|
||||
Extension string `json:"ext"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
}
|
||||
|
||||
// Used to deser the formats in the -J output
|
||||
|
||||
Reference in New Issue
Block a user