mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-15 21:03:41 +00:00
feat: queue extractions (#1227)
This commit is contained in:
1 parent
de0afb1481
commit
24db9bb58b
35 files changed
+1047
-159
No files matched your search
+118
-61
@@ -52,6 +52,8 @@ type ExtractStatus string
|
|||||||
const (
|
const (
|
||||||
// ExtractStatusNone indicates extraction has not started
|
// ExtractStatusNone indicates extraction has not started
|
||||||
ExtractStatusNone ExtractStatus = ""
|
ExtractStatusNone ExtractStatus = ""
|
||||||
|
// ExtractStatusQueued indicates extraction is waiting in the queue
|
||||||
|
ExtractStatusQueued ExtractStatus = "queued"
|
||||||
// ExtractStatusWaitingParts indicates waiting for other multi-part archive parts to complete
|
// ExtractStatusWaitingParts indicates waiting for other multi-part archive parts to complete
|
||||||
ExtractStatusWaitingParts ExtractStatus = "waitingParts"
|
ExtractStatusWaitingParts ExtractStatus = "waitingParts"
|
||||||
// ExtractStatusExtracting indicates extraction is in progress
|
// ExtractStatusExtracting indicates extraction is in progress
|
||||||
@@ -102,6 +104,10 @@ type Downloader struct {
|
|||||||
checkDuplicateLock *sync.Mutex
|
checkDuplicateLock *sync.Mutex
|
||||||
closed atomic.Bool
|
closed atomic.Bool
|
||||||
|
|
||||||
|
// claimedExtractions tracks which multi-part archives have been claimed for extraction
|
||||||
|
// Key: fullBaseName (e.g., "/path/archive.7z"), Value: taskID that claimed it
|
||||||
|
claimedExtractions sync.Map
|
||||||
|
|
||||||
extensions []*Extension
|
extensions []*Extension
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -736,6 +742,9 @@ func (d *Downloader) emit(eventKey EventKey, task *Task, errs ...error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (d *Downloader) GetTask(id string) *Task {
|
func (d *Downloader) GetTask(id string) *Task {
|
||||||
|
d.lock.Lock()
|
||||||
|
defer d.lock.Unlock()
|
||||||
|
|
||||||
for _, task := range d.tasks {
|
for _, task := range d.tasks {
|
||||||
if task.ID == id {
|
if task.ID == id {
|
||||||
return task
|
return task
|
||||||
@@ -745,12 +754,18 @@ func (d *Downloader) GetTask(id string) *Task {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (d *Downloader) GetTasks() []*Task {
|
func (d *Downloader) GetTasks() []*Task {
|
||||||
|
d.lock.Lock()
|
||||||
|
defer d.lock.Unlock()
|
||||||
|
|
||||||
return d.tasks
|
return d.tasks
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetTasksByFilter get tasks by filter, if filter is nil, return all tasks
|
// GetTasksByFilter get tasks by filter, if filter is nil, return all tasks
|
||||||
// return tasks and if match all tasks
|
// return tasks and if match all tasks
|
||||||
func (d *Downloader) GetTasksByFilter(filter *TaskFilter) []*Task {
|
func (d *Downloader) GetTasksByFilter(filter *TaskFilter) []*Task {
|
||||||
|
d.lock.Lock()
|
||||||
|
defer d.lock.Unlock()
|
||||||
|
|
||||||
if filter == nil || filter.IsEmpty() {
|
if filter == nil || filter.IsEmpty() {
|
||||||
return d.tasks
|
return d.tasks
|
||||||
}
|
}
|
||||||
@@ -905,9 +920,10 @@ func (d *Downloader) watch(task *Task) {
|
|||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Auto-extract archive files
|
// Auto-extract archive files using the extraction queue
|
||||||
|
// This ensures only one extraction runs at a time to prevent resource exhaustion
|
||||||
if e.AutoExtract && isArchiveFile(downloadFilePath) {
|
if e.AutoExtract && isArchiveFile(downloadFilePath) {
|
||||||
go d.handleAutoExtract(task, downloadFilePath, e)
|
d.enqueueExtraction(task, downloadFilePath, e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1200,55 +1216,93 @@ func (d *Downloader) buildFetcher(url string) (fetcher.Fetcher, error) {
|
|||||||
return fetcher, nil
|
return fetcher, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// handleAutoExtract handles automatic extraction of archive files, including multi-part archives
|
// enqueueExtraction adds an extraction job to the global extraction queue
|
||||||
func (d *Downloader) handleAutoExtract(task *Task, downloadFilePath string, opts *http.OptsExtra) {
|
// This ensures only one extraction (or one multi-part archive extraction) runs at a time
|
||||||
// Check if this is a multi-part archive
|
// to prevent resource exhaustion
|
||||||
|
func (d *Downloader) enqueueExtraction(task *Task, downloadFilePath string, opts *http.OptsExtra) {
|
||||||
partInfo := getArchivePartInfo(downloadFilePath)
|
partInfo := getArchivePartInfo(downloadFilePath)
|
||||||
|
|
||||||
if partInfo.IsMultiPart {
|
if partInfo.IsMultiPart {
|
||||||
// Set multi-part info on the task
|
// For multi-part archives, handle specially
|
||||||
task.Progress.MultiPartBaseName = partInfo.BaseName
|
d.enqueueMultiPartExtraction(task, downloadFilePath, partInfo, opts)
|
||||||
task.Progress.MultiPartNumber = partInfo.PartNumber
|
} else {
|
||||||
task.Progress.MultiPartIsFirst = isFirstPart(downloadFilePath)
|
// For single archives, queue immediately
|
||||||
d.storage.Put(bucketTask, task.ID, task.clone())
|
d.enqueueSingleExtraction(task, downloadFilePath, opts)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Check if all parts are downloaded
|
// enqueueSingleExtraction queues extraction for a single (non-multi-part) archive
|
||||||
destDir := task.Meta.Opts.Path
|
func (d *Downloader) enqueueSingleExtraction(task *Task, downloadFilePath string, opts *http.OptsExtra) {
|
||||||
allPartsReady, missingParts := d.checkMultiPartArchiveReady(downloadFilePath, destDir, partInfo)
|
jobID := "single:" + task.ID
|
||||||
|
|
||||||
if !allPartsReady {
|
// Set extraction status to queued
|
||||||
// Not all parts are ready yet, set status to waiting
|
task.Progress.ExtractStatus = ExtractStatusQueued
|
||||||
task.Progress.ExtractStatus = ExtractStatusWaitingParts
|
d.emit(EventKeyProgress, task)
|
||||||
d.emit(EventKeyProgress, task)
|
d.storage.Put(bucketTask, task.ID, task.clone())
|
||||||
d.storage.Put(bucketTask, task.ID, task.clone())
|
d.Logger.Info().Msgf("extraction queued, task id: %s, job id: %s", task.ID, jobID)
|
||||||
d.Logger.Info().Msgf("multi-part archive waiting for other parts, task id: %s, missing: %v", task.ID, missingParts)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// All parts are ready!
|
// Create and enqueue the extraction job
|
||||||
// Only one task should perform extraction - we'll use the one that completes last
|
job := NewExtractionJob(jobID, func() {
|
||||||
// Check if extraction has already been started by another part
|
d.performExtraction(task, downloadFilePath, task.Meta.Opts.Path, opts)
|
||||||
if d.isMultiPartExtractionInProgress(partInfo.BaseName) {
|
})
|
||||||
// Another part already started extraction, mark this as done
|
|
||||||
task.Progress.ExtractStatus = ExtractStatusDone
|
|
||||||
task.Progress.ExtractProgress = 100
|
|
||||||
d.emit(EventKeyProgress, task)
|
|
||||||
d.storage.Put(bucketTask, task.ID, task.clone())
|
|
||||||
d.Logger.Info().Msgf("multi-part archive part completed, extraction handled by another part, task id: %s", task.ID)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// This task will handle extraction - mark as extracting first to prevent others
|
go func() {
|
||||||
task.Progress.ExtractStatus = ExtractStatusExtracting
|
GetExtractionQueue().Enqueue(job)
|
||||||
|
}()
|
||||||
|
}
|
||||||
|
|
||||||
|
// enqueueMultiPartExtraction handles queueing for multi-part archives
|
||||||
|
// It ensures only ONE extraction job is queued when ALL parts are ready
|
||||||
|
func (d *Downloader) enqueueMultiPartExtraction(task *Task, downloadFilePath string, partInfo ArchivePartInfo, opts *http.OptsExtra) {
|
||||||
|
// Set multi-part info on the task
|
||||||
|
task.Progress.MultiPartBaseName = partInfo.BaseName
|
||||||
|
task.Progress.MultiPartNumber = partInfo.PartNumber
|
||||||
|
task.Progress.MultiPartIsFirst = isFirstPart(downloadFilePath)
|
||||||
|
|
||||||
|
// Check if all parts are downloaded
|
||||||
|
destDir := task.Meta.Opts.Path
|
||||||
|
allPartsReady, missingParts := d.checkMultiPartArchiveReady(downloadFilePath, destDir, partInfo)
|
||||||
|
|
||||||
|
if !allPartsReady {
|
||||||
|
// Not all parts are ready yet - just set status to waiting, don't queue anything
|
||||||
|
task.Progress.ExtractStatus = ExtractStatusWaitingParts
|
||||||
d.emit(EventKeyProgress, task)
|
d.emit(EventKeyProgress, task)
|
||||||
d.storage.Put(bucketTask, task.ID, task.clone())
|
d.storage.Put(bucketTask, task.ID, task.clone())
|
||||||
|
d.Logger.Info().Msgf("multi-part archive waiting for other parts, task id: %s, missing: %v", task.ID, missingParts)
|
||||||
// Extract the multi-part archive
|
return
|
||||||
d.performMultiPartExtraction(task, partInfo.FirstPartPath, destDir, opts)
|
|
||||||
} else {
|
|
||||||
// Regular (non-multi-part) archive
|
|
||||||
d.performExtraction(task, downloadFilePath, task.Meta.Opts.Path, opts)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// All parts are ready! Atomically check if extraction has already been started/queued
|
||||||
|
// and if not, mark this task as the one that will handle it
|
||||||
|
// Use GetMultiPartArchiveBaseName to get the full path for comparison
|
||||||
|
fullBaseName := GetMultiPartArchiveBaseName(downloadFilePath)
|
||||||
|
shouldQueue := d.tryClaimMultiPartExtraction(task, fullBaseName)
|
||||||
|
|
||||||
|
if !shouldQueue {
|
||||||
|
// Another part already started/queued extraction, mark this task as done
|
||||||
|
task.Progress.ExtractStatus = ExtractStatusDone
|
||||||
|
task.Progress.ExtractProgress = 100
|
||||||
|
d.emit(EventKeyProgress, task)
|
||||||
|
d.storage.Put(bucketTask, task.ID, task.clone())
|
||||||
|
d.Logger.Info().Msgf("multi-part archive extraction already handled by another part, task id: %s", task.ID)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// This task claimed the extraction - status already set to queued in tryClaimMultiPartExtraction
|
||||||
|
d.emit(EventKeyProgress, task)
|
||||||
|
d.storage.Put(bucketTask, task.ID, task.clone())
|
||||||
|
|
||||||
|
jobID := "multipart:" + fullBaseName
|
||||||
|
d.Logger.Info().Msgf("multi-part extraction queued, task id: %s, job id: %s", task.ID, jobID)
|
||||||
|
|
||||||
|
// Create and enqueue the extraction job
|
||||||
|
job := NewExtractionJob(jobID, func() {
|
||||||
|
d.performMultiPartExtraction(task, partInfo.FirstPartPath, destDir, opts)
|
||||||
|
})
|
||||||
|
|
||||||
|
go func() {
|
||||||
|
GetExtractionQueue().Enqueue(job)
|
||||||
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
// checkMultiPartArchiveReady checks if all parts of a multi-part archive are downloaded
|
// checkMultiPartArchiveReady checks if all parts of a multi-part archive are downloaded
|
||||||
@@ -1298,28 +1352,25 @@ func (d *Downloader) checkAllMultiPartTasksDone(baseName string) (bool, []string
|
|||||||
return len(notDoneParts) == 0, notDoneParts
|
return len(notDoneParts) == 0, notDoneParts
|
||||||
}
|
}
|
||||||
|
|
||||||
// isMultiPartExtractionInProgress checks if any task for this multi-part archive
|
// tryClaimMultiPartExtraction atomically checks if extraction can be claimed for a multi-part archive
|
||||||
// has already started extraction (to prevent duplicate extractions)
|
// and if so, marks the task as queued. Returns true if this task should proceed with queueing.
|
||||||
func (d *Downloader) isMultiPartExtractionInProgress(baseName string) bool {
|
// This uses sync.Map.LoadOrStore for atomic claim to prevent race conditions.
|
||||||
d.lock.Lock()
|
func (d *Downloader) tryClaimMultiPartExtraction(task *Task, baseName string) bool {
|
||||||
defer d.lock.Unlock()
|
// Use LoadOrStore for atomic claim - if another goroutine already stored a value, we get that value back
|
||||||
|
_, alreadyClaimed := d.claimedExtractions.LoadOrStore(baseName, task.ID)
|
||||||
for _, task := range d.tasks {
|
if alreadyClaimed {
|
||||||
taskBaseName := ""
|
return false // Another task already claimed it
|
||||||
if task.Meta != nil && task.Meta.Res != nil && len(task.Meta.Res.Files) > 0 {
|
|
||||||
taskBaseName = GetMultiPartArchiveBaseName(task.Meta.SingleFilepath())
|
|
||||||
}
|
|
||||||
if taskBaseName == baseName {
|
|
||||||
// Check if this task is already extracting or has completed extraction
|
|
||||||
if task.Progress.ExtractStatus == ExtractStatusExtracting ||
|
|
||||||
task.Progress.ExtractStatus == ExtractStatusDone ||
|
|
||||||
task.Progress.ExtractStatus == ExtractStatusError {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false
|
// This task successfully claimed it
|
||||||
|
task.Progress.ExtractStatus = ExtractStatusQueued
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// releaseMultiPartExtractionClaim releases the extraction claim for a multi-part archive
|
||||||
|
// This is primarily used for testing purposes
|
||||||
|
func (d *Downloader) releaseMultiPartExtractionClaim(baseName string) {
|
||||||
|
d.claimedExtractions.Delete(baseName)
|
||||||
}
|
}
|
||||||
|
|
||||||
// performExtraction performs extraction for a regular (non-multi-part) archive
|
// performExtraction performs extraction for a regular (non-multi-part) archive
|
||||||
@@ -1341,6 +1392,9 @@ func (d *Downloader) performExtraction(task *Task, archivePath string, destDir s
|
|||||||
|
|
||||||
// performMultiPartExtraction performs extraction for a multi-part archive
|
// performMultiPartExtraction performs extraction for a multi-part archive
|
||||||
func (d *Downloader) performMultiPartExtraction(task *Task, firstPartPath string, destDir string, opts *http.OptsExtra) {
|
func (d *Downloader) performMultiPartExtraction(task *Task, firstPartPath string, destDir string, opts *http.OptsExtra) {
|
||||||
|
// Get the baseName for releasing the claim later
|
||||||
|
fullBaseName := GetMultiPartArchiveBaseName(firstPartPath)
|
||||||
|
|
||||||
// Set extraction status to extracting
|
// Set extraction status to extracting
|
||||||
task.Progress.ExtractStatus = ExtractStatusExtracting
|
task.Progress.ExtractStatus = ExtractStatusExtracting
|
||||||
task.Progress.ExtractProgress = 0
|
task.Progress.ExtractProgress = 0
|
||||||
@@ -1362,6 +1416,9 @@ func (d *Downloader) performMultiPartExtraction(task *Task, firstPartPath string
|
|||||||
|
|
||||||
// Update status for all related multi-part tasks
|
// Update status for all related multi-part tasks
|
||||||
d.updateMultiPartTasksStatus(task, extractErr)
|
d.updateMultiPartTasksStatus(task, extractErr)
|
||||||
|
|
||||||
|
// Release the claim so future downloads of the same archive can be extracted
|
||||||
|
d.releaseMultiPartExtractionClaim(fullBaseName)
|
||||||
}
|
}
|
||||||
|
|
||||||
// collectMultiPartFiles collects all files belonging to a multi-part archive
|
// collectMultiPartFiles collects all files belonging to a multi-part archive
|
||||||
|
|||||||
@@ -1420,6 +1420,7 @@ func TestExtractStatus(t *testing.T) {
|
|||||||
expected string
|
expected string
|
||||||
}{
|
}{
|
||||||
{ExtractStatusNone, ""},
|
{ExtractStatusNone, ""},
|
||||||
|
{ExtractStatusQueued, "queued"},
|
||||||
{ExtractStatusExtracting, "extracting"},
|
{ExtractStatusExtracting, "extracting"},
|
||||||
{ExtractStatusDone, "done"},
|
{ExtractStatusDone, "done"},
|
||||||
{ExtractStatusError, "error"},
|
{ExtractStatusError, "error"},
|
||||||
@@ -2083,7 +2084,7 @@ func TestDownloader_CheckAllMultiPartTasksDone_NoRelatedTasks(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestDownloader_IsMultiPartExtractionInProgress(t *testing.T) {
|
func TestDownloader_TryClaimMultiPartExtraction(t *testing.T) {
|
||||||
downloader := NewDownloader(nil)
|
downloader := NewDownloader(nil)
|
||||||
if err := downloader.Setup(); err != nil {
|
if err := downloader.Setup(); err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
@@ -2097,50 +2098,58 @@ func TestDownloader_IsMultiPartExtractionInProgress(t *testing.T) {
|
|||||||
defer os.RemoveAll(tempDir)
|
defer os.RemoveAll(tempDir)
|
||||||
|
|
||||||
baseName := "archive.7z"
|
baseName := "archive.7z"
|
||||||
basePath := filepath.Join(tempDir, baseName)
|
// GetMultiPartArchiveBaseName returns filepath.Join(dir, baseName)
|
||||||
|
fullBaseName := filepath.Join(tempDir, baseName)
|
||||||
|
|
||||||
// Create task with no extraction status
|
// Create tasks
|
||||||
task1 := &Task{
|
task1 := &Task{
|
||||||
ID: "task1",
|
ID: "task1",
|
||||||
Status: base.DownloadStatusDone,
|
Status: base.DownloadStatusDone,
|
||||||
Meta: &fetcher.FetcherMeta{
|
Meta: &fetcher.FetcherMeta{
|
||||||
Opts: &base.Options{Path: tempDir},
|
Opts: &base.Options{Path: tempDir},
|
||||||
Res: &base.Resource{
|
Res: &base.Resource{
|
||||||
Files: []*base.FileInfo{{Name: baseName + ".001"}},
|
Files: []*base.FileInfo{{Name: baseName + ".001", Path: ""}},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Progress: &Progress{ExtractStatus: ExtractStatusNone},
|
Progress: &Progress{ExtractStatus: ExtractStatusNone},
|
||||||
}
|
}
|
||||||
initTask(task1)
|
initTask(task1)
|
||||||
downloader.tasks = []*Task{task1}
|
|
||||||
|
|
||||||
// No extraction in progress
|
task2 := &Task{
|
||||||
if downloader.isMultiPartExtractionInProgress(basePath) {
|
ID: "task2",
|
||||||
t.Error("isMultiPartExtractionInProgress() = true, want false")
|
Status: base.DownloadStatusDone,
|
||||||
|
Meta: &fetcher.FetcherMeta{
|
||||||
|
Opts: &base.Options{Path: tempDir},
|
||||||
|
Res: &base.Resource{
|
||||||
|
Files: []*base.FileInfo{{Name: baseName + ".002", Path: ""}},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Progress: &Progress{ExtractStatus: ExtractStatusNone},
|
||||||
|
}
|
||||||
|
initTask(task2)
|
||||||
|
|
||||||
|
downloader.tasks = []*Task{task1, task2}
|
||||||
|
|
||||||
|
// Task1 should be able to claim extraction (no one has claimed yet)
|
||||||
|
if !downloader.tryClaimMultiPartExtraction(task1, fullBaseName) {
|
||||||
|
t.Error("tryClaimMultiPartExtraction() = false, want true (first claim)")
|
||||||
|
}
|
||||||
|
// task1's status should now be Queued
|
||||||
|
if task1.Progress.ExtractStatus != ExtractStatusQueued {
|
||||||
|
t.Errorf("task1.ExtractStatus = %v, want %v", task1.Progress.ExtractStatus, ExtractStatusQueued)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set to extracting
|
// Task2 should NOT be able to claim (task1 already claimed via sync.Map)
|
||||||
task1.Progress.ExtractStatus = ExtractStatusExtracting
|
if downloader.tryClaimMultiPartExtraction(task2, fullBaseName) {
|
||||||
if !downloader.isMultiPartExtractionInProgress(basePath) {
|
t.Error("tryClaimMultiPartExtraction() = true, want false (already claimed)")
|
||||||
t.Error("isMultiPartExtractionInProgress() = false, want true (extracting)")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set to done
|
// Release the claim
|
||||||
task1.Progress.ExtractStatus = ExtractStatusDone
|
downloader.releaseMultiPartExtractionClaim(fullBaseName)
|
||||||
if !downloader.isMultiPartExtractionInProgress(basePath) {
|
|
||||||
t.Error("isMultiPartExtractionInProgress() = false, want true (done)")
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set to error
|
// Now task2 CAN claim (claim was released)
|
||||||
task1.Progress.ExtractStatus = ExtractStatusError
|
if !downloader.tryClaimMultiPartExtraction(task2, fullBaseName) {
|
||||||
if !downloader.isMultiPartExtractionInProgress(basePath) {
|
t.Error("tryClaimMultiPartExtraction() = false, want true (claim was released)")
|
||||||
t.Error("isMultiPartExtractionInProgress() = false, want true (error)")
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set to waiting parts (not in progress)
|
|
||||||
task1.Progress.ExtractStatus = ExtractStatusWaitingParts
|
|
||||||
if downloader.isMultiPartExtractionInProgress(basePath) {
|
|
||||||
t.Error("isMultiPartExtractionInProgress() = true, want false (waitingParts)")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,199 @@
|
|||||||
|
package download
|
||||||
|
|
||||||
|
import (
|
||||||
|
"sync"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ExtractionJob represents a single extraction job in the queue
|
||||||
|
type ExtractionJob struct {
|
||||||
|
// ID is a unique identifier for this job (usually task ID or multi-part base name)
|
||||||
|
ID string
|
||||||
|
// Execute is the function that performs the actual extraction
|
||||||
|
Execute func()
|
||||||
|
// done channel is signaled when the job has been executed
|
||||||
|
done chan struct{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewExtractionJob creates a new extraction job
|
||||||
|
func NewExtractionJob(id string, execute func()) *ExtractionJob {
|
||||||
|
return &ExtractionJob{
|
||||||
|
ID: id,
|
||||||
|
Execute: execute,
|
||||||
|
done: make(chan struct{}),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Wait blocks until the job has been executed
|
||||||
|
func (j *ExtractionJob) Wait() {
|
||||||
|
<-j.done
|
||||||
|
}
|
||||||
|
|
||||||
|
// ExtractionQueue manages a queue of extraction jobs to prevent resource exhaustion
|
||||||
|
// by ensuring only one extraction (or one multi-part archive extraction) runs at a time
|
||||||
|
type ExtractionQueue struct {
|
||||||
|
mu sync.Mutex
|
||||||
|
cond *sync.Cond
|
||||||
|
jobs []*ExtractionJob
|
||||||
|
running bool
|
||||||
|
shutdown bool
|
||||||
|
wg sync.WaitGroup
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewExtractionQueue creates a new extraction queue
|
||||||
|
func NewExtractionQueue() *ExtractionQueue {
|
||||||
|
q := &ExtractionQueue{
|
||||||
|
jobs: make([]*ExtractionJob, 0),
|
||||||
|
}
|
||||||
|
q.cond = sync.NewCond(&q.mu)
|
||||||
|
return q
|
||||||
|
}
|
||||||
|
|
||||||
|
// Start starts the queue worker that processes jobs sequentially
|
||||||
|
func (q *ExtractionQueue) Start() {
|
||||||
|
q.mu.Lock()
|
||||||
|
if q.running {
|
||||||
|
q.mu.Unlock()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
q.running = true
|
||||||
|
q.shutdown = false
|
||||||
|
q.mu.Unlock()
|
||||||
|
|
||||||
|
q.wg.Add(1)
|
||||||
|
go q.worker()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Stop stops the queue worker gracefully
|
||||||
|
// It waits for the current job to complete but discards pending jobs
|
||||||
|
func (q *ExtractionQueue) Stop() {
|
||||||
|
q.mu.Lock()
|
||||||
|
if !q.running {
|
||||||
|
q.mu.Unlock()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
q.shutdown = true
|
||||||
|
q.cond.Signal()
|
||||||
|
q.mu.Unlock()
|
||||||
|
|
||||||
|
q.wg.Wait()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Enqueue adds a new extraction job to the queue
|
||||||
|
// The job will be executed when its turn comes (FIFO order)
|
||||||
|
// Returns the job so the caller can wait for completion if needed
|
||||||
|
func (q *ExtractionQueue) Enqueue(job *ExtractionJob) *ExtractionJob {
|
||||||
|
q.mu.Lock()
|
||||||
|
defer q.mu.Unlock()
|
||||||
|
|
||||||
|
if q.shutdown {
|
||||||
|
// Queue is shutting down, signal done immediately without executing
|
||||||
|
close(job.done)
|
||||||
|
return job
|
||||||
|
}
|
||||||
|
|
||||||
|
q.jobs = append(q.jobs, job)
|
||||||
|
q.cond.Signal()
|
||||||
|
return job
|
||||||
|
}
|
||||||
|
|
||||||
|
// EnqueueAndWait adds a new extraction job to the queue and waits for it to complete
|
||||||
|
func (q *ExtractionQueue) EnqueueAndWait(job *ExtractionJob) {
|
||||||
|
q.Enqueue(job)
|
||||||
|
job.Wait()
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueueLength returns the current number of pending jobs in the queue
|
||||||
|
func (q *ExtractionQueue) QueueLength() int {
|
||||||
|
q.mu.Lock()
|
||||||
|
defer q.mu.Unlock()
|
||||||
|
return len(q.jobs)
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRunning returns true if the queue worker is running
|
||||||
|
func (q *ExtractionQueue) IsRunning() bool {
|
||||||
|
q.mu.Lock()
|
||||||
|
defer q.mu.Unlock()
|
||||||
|
return q.running
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasPendingJob checks if there's a pending job with the given ID
|
||||||
|
func (q *ExtractionQueue) HasPendingJob(id string) bool {
|
||||||
|
q.mu.Lock()
|
||||||
|
defer q.mu.Unlock()
|
||||||
|
|
||||||
|
for _, job := range q.jobs {
|
||||||
|
if job.ID == id {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// RemovePendingJob removes a pending job with the given ID from the queue
|
||||||
|
// Returns true if a job was removed, false if not found
|
||||||
|
// Note: This cannot remove a job that is currently being executed
|
||||||
|
func (q *ExtractionQueue) RemovePendingJob(id string) bool {
|
||||||
|
q.mu.Lock()
|
||||||
|
defer q.mu.Unlock()
|
||||||
|
|
||||||
|
for i, job := range q.jobs {
|
||||||
|
if job.ID == id {
|
||||||
|
// Close the done channel to unblock any waiters
|
||||||
|
close(job.done)
|
||||||
|
// Remove from queue
|
||||||
|
q.jobs = append(q.jobs[:i], q.jobs[i+1:]...)
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// worker is the main loop that processes jobs sequentially
|
||||||
|
func (q *ExtractionQueue) worker() {
|
||||||
|
defer q.wg.Done()
|
||||||
|
|
||||||
|
for {
|
||||||
|
q.mu.Lock()
|
||||||
|
// Wait for a job or shutdown signal
|
||||||
|
for len(q.jobs) == 0 && !q.shutdown {
|
||||||
|
q.cond.Wait()
|
||||||
|
}
|
||||||
|
|
||||||
|
if q.shutdown {
|
||||||
|
// Close done channels for all remaining jobs
|
||||||
|
for _, job := range q.jobs {
|
||||||
|
close(job.done)
|
||||||
|
}
|
||||||
|
q.jobs = nil
|
||||||
|
q.running = false
|
||||||
|
q.mu.Unlock()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Dequeue the first job
|
||||||
|
job := q.jobs[0]
|
||||||
|
q.jobs = q.jobs[1:]
|
||||||
|
q.mu.Unlock()
|
||||||
|
|
||||||
|
// Execute the job outside the lock
|
||||||
|
if job.Execute != nil {
|
||||||
|
job.Execute()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Signal that the job is done
|
||||||
|
close(job.done)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Global extraction queue instance
|
||||||
|
var globalExtractionQueue *ExtractionQueue
|
||||||
|
var extractionQueueOnce sync.Once
|
||||||
|
|
||||||
|
// GetExtractionQueue returns the global extraction queue instance
|
||||||
|
func GetExtractionQueue() *ExtractionQueue {
|
||||||
|
extractionQueueOnce.Do(func() {
|
||||||
|
globalExtractionQueue = NewExtractionQueue()
|
||||||
|
globalExtractionQueue.Start()
|
||||||
|
})
|
||||||
|
return globalExtractionQueue
|
||||||
|
}
|
||||||
File diff suppressed because it is too large.
Load diff
@@ -17,7 +17,9 @@ enum ExtractStatus {
|
|||||||
@JsonValue('done')
|
@JsonValue('done')
|
||||||
done,
|
done,
|
||||||
@JsonValue('error')
|
@JsonValue('error')
|
||||||
error
|
error,
|
||||||
|
@JsonValue('waitingParts')
|
||||||
|
waitingParts
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonSerializable(explicitToJson: true)
|
@JsonSerializable(explicitToJson: true)
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ const _$ExtractStatusEnumMap = {
|
|||||||
ExtractStatus.extracting: 'extracting',
|
ExtractStatus.extracting: 'extracting',
|
||||||
ExtractStatus.done: 'done',
|
ExtractStatus.done: 'done',
|
||||||
ExtractStatus.error: 'error',
|
ExtractStatus.error: 'error',
|
||||||
|
ExtractStatus.waitingParts: 'waitingParts',
|
||||||
};
|
};
|
||||||
|
|
||||||
Progress _$ProgressFromJson(Map<String, dynamic> json) => Progress(
|
Progress _$ProgressFromJson(Map<String, dynamic> json) => Progress(
|
||||||
@@ -66,9 +67,9 @@ Progress _$ProgressFromJson(Map<String, dynamic> json) => Progress(
|
|||||||
downloaded: (json['downloaded'] as num).toInt(),
|
downloaded: (json['downloaded'] as num).toInt(),
|
||||||
uploadSpeed: (json['uploadSpeed'] as num).toInt(),
|
uploadSpeed: (json['uploadSpeed'] as num).toInt(),
|
||||||
uploaded: (json['uploaded'] as num).toInt(),
|
uploaded: (json['uploaded'] as num).toInt(),
|
||||||
extractStatus: $enumDecodeNullable(
|
extractStatus:
|
||||||
_$ExtractStatusEnumMap, json['extractStatus']) ??
|
$enumDecodeNullable(_$ExtractStatusEnumMap, json['extractStatus']) ??
|
||||||
ExtractStatus.none,
|
ExtractStatus.none,
|
||||||
extractProgress: (json['extractProgress'] as num?)?.toInt() ?? 0,
|
extractProgress: (json['extractProgress'] as num?)?.toInt() ?? 0,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -2,12 +2,12 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter_foreground_task/flutter_foreground_task.dart';
|
import 'package:flutter_foreground_task/flutter_foreground_task.dart';
|
||||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:window_manager/window_manager.dart'; // Import the required packages
|
import 'package:window_manager/window_manager.dart'; // Import the required packages
|
||||||
|
|
||||||
import '../../../../i18n/message.dart';
|
import '../../../../i18n/message.dart';
|
||||||
import '../../../../theme/theme.dart';
|
import '../../../../theme/theme.dart';
|
||||||
import '../../../../util/locale_manager.dart';
|
import '../../../../util/locale_manager.dart';
|
||||||
import '../../../../util/util.dart'; // Import the required packages
|
import '../../../../util/util.dart'; // Import the required packages
|
||||||
import '../../../routes/app_pages.dart';
|
import '../../../routes/app_pages.dart';
|
||||||
import '../controllers/app_controller.dart';
|
import '../controllers/app_controller.dart';
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ class AppView extends GetView<AppController> {
|
|||||||
// Add listening to theme changes, set the title bar color according to the current system theme.
|
// Add listening to theme changes, set the title bar color according to the current system theme.
|
||||||
builder: (context, child) {
|
builder: (context, child) {
|
||||||
// if platform is desktop
|
// if platform is desktop
|
||||||
if (Util.isDesktop()){
|
if (Util.isDesktop()) {
|
||||||
// actual brightness of the UI
|
// actual brightness of the UI
|
||||||
Brightness brightness = Theme.of(context).brightness;
|
Brightness brightness = Theme.of(context).brightness;
|
||||||
// Set the title bar to use the actual brightness of the UI
|
// Set the title bar to use the actual brightness of the UI
|
||||||
@@ -46,7 +46,6 @@ class AppView extends GetView<AppController> {
|
|||||||
}
|
}
|
||||||
return child!;
|
return child!;
|
||||||
},
|
},
|
||||||
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -626,10 +626,11 @@ class CreateView extends GetView<CreateController> {
|
|||||||
child: CompactCheckbox(
|
child: CompactCheckbox(
|
||||||
label: 'autoExtract'.tr,
|
label: 'autoExtract'.tr,
|
||||||
value: _autoExtractController
|
value: _autoExtractController
|
||||||
.value ?? false,
|
.value ??
|
||||||
|
false,
|
||||||
onChanged: (bool? value) {
|
onChanged: (bool? value) {
|
||||||
_autoExtractController
|
_autoExtractController.value =
|
||||||
.value = value ?? false;
|
value ?? false;
|
||||||
},
|
},
|
||||||
textStyle: const TextStyle(
|
textStyle: const TextStyle(
|
||||||
color: Colors.grey,
|
color: Colors.grey,
|
||||||
@@ -638,33 +639,49 @@ class CreateView extends GetView<CreateController> {
|
|||||||
),
|
),
|
||||||
Obx(
|
Obx(
|
||||||
() => Visibility(
|
() => Visibility(
|
||||||
visible: _autoExtractController.value ?? false,
|
visible: _autoExtractController
|
||||||
|
.value ??
|
||||||
|
false,
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding:
|
||||||
const EdgeInsets.only(top: 10),
|
const EdgeInsets.only(
|
||||||
|
top: 10),
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _archivePasswordController,
|
controller:
|
||||||
|
_archivePasswordController,
|
||||||
obscureText: true,
|
obscureText: true,
|
||||||
decoration: InputDecoration(
|
decoration:
|
||||||
labelText: 'archivePassword'.tr,
|
InputDecoration(
|
||||||
hintText: 'archivePasswordHint'.tr,
|
labelText:
|
||||||
|
'archivePassword'
|
||||||
|
.tr,
|
||||||
|
hintText:
|
||||||
|
'archivePasswordHint'
|
||||||
|
.tr,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding:
|
||||||
const EdgeInsets.only(top: 10),
|
const EdgeInsets.only(
|
||||||
|
top: 10),
|
||||||
child: CompactCheckbox(
|
child: CompactCheckbox(
|
||||||
label: 'deleteAfterExtract'.tr,
|
label:
|
||||||
value: _deleteAfterExtractController
|
'deleteAfterExtract'
|
||||||
.value ?? false,
|
.tr,
|
||||||
|
value:
|
||||||
|
_deleteAfterExtractController
|
||||||
|
.value ??
|
||||||
|
false,
|
||||||
onChanged: (bool? value) {
|
onChanged: (bool? value) {
|
||||||
_deleteAfterExtractController
|
_deleteAfterExtractController
|
||||||
.value = value ?? false;
|
.value =
|
||||||
|
value ?? false;
|
||||||
},
|
},
|
||||||
textStyle: const TextStyle(
|
textStyle:
|
||||||
|
const TextStyle(
|
||||||
color: Colors.grey,
|
color: Colors.grey,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -1031,7 +1048,8 @@ class CreateView extends GetView<CreateController> {
|
|||||||
padding: const EdgeInsets.only(right: 8),
|
padding: const EdgeInsets.only(right: 8),
|
||||||
child: OutlinedButton(
|
child: OutlinedButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
_pathController.text = renderPathPlaceholders(category.path);
|
_pathController.text =
|
||||||
|
renderPathPlaceholders(category.path);
|
||||||
},
|
},
|
||||||
style: OutlinedButton.styleFrom(
|
style: OutlinedButton.styleFrom(
|
||||||
padding: const EdgeInsets.symmetric(
|
padding: const EdgeInsets.symmetric(
|
||||||
|
|||||||
@@ -179,7 +179,8 @@ class SettingView extends GetView<SettingController> {
|
|||||||
return Container(
|
return Container(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
child: Switch(
|
child: Switch(
|
||||||
value: appController.downloaderConfig.value.archive.deleteAfterExtract,
|
value:
|
||||||
|
appController.downloaderConfig.value.archive.deleteAfterExtract,
|
||||||
onChanged: (bool value) async {
|
onChanged: (bool value) async {
|
||||||
appController.downloaderConfig.update((val) {
|
appController.downloaderConfig.update((val) {
|
||||||
val!.archive.deleteAfterExtract = value;
|
val!.archive.deleteAfterExtract = value;
|
||||||
|
|||||||
@@ -195,6 +195,8 @@ class BuildTaskListView extends GetView {
|
|||||||
return 'extractDone'.tr;
|
return 'extractDone'.tr;
|
||||||
case ExtractStatus.error:
|
case ExtractStatus.error:
|
||||||
return 'extractError'.tr;
|
return 'extractError'.tr;
|
||||||
|
case ExtractStatus.waitingParts:
|
||||||
|
return 'waitingParts'.tr;
|
||||||
default:
|
default:
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
@@ -333,13 +335,19 @@ class BuildTaskListView extends GetView {
|
|||||||
// Extraction status row
|
// Extraction status row
|
||||||
if (task.progress.extractStatus != ExtractStatus.none)
|
if (task.progress.extractStatus != ExtractStatus.none)
|
||||||
Builder(builder: (context) {
|
Builder(builder: (context) {
|
||||||
final isExtracting =
|
final isExtracting = task.progress.extractStatus ==
|
||||||
task.progress.extractStatus == ExtractStatus.extracting;
|
ExtractStatus.extracting;
|
||||||
final isExtractDone =
|
final isExtractDone =
|
||||||
task.progress.extractStatus == ExtractStatus.done;
|
task.progress.extractStatus == ExtractStatus.done;
|
||||||
|
final isWaitingParts = task.progress.extractStatus ==
|
||||||
|
ExtractStatus.waitingParts;
|
||||||
final statusColor = isExtracting
|
final statusColor = isExtracting
|
||||||
? Get.theme.colorScheme.primary
|
? Get.theme.colorScheme.primary
|
||||||
: (isExtractDone ? Colors.green : Colors.red);
|
: (isExtractDone
|
||||||
|
? Colors.green
|
||||||
|
: isWaitingParts
|
||||||
|
? Colors.orange
|
||||||
|
: Colors.red);
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
@@ -367,7 +375,7 @@ class BuildTaskListView extends GetView {
|
|||||||
).padding(left: 18),
|
).padding(left: 18),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
).padding(top: 4, bottom: isExtracting ? 0 : 8),
|
).padding(top: 4, bottom: 8),
|
||||||
// Extraction progress bar
|
// Extraction progress bar
|
||||||
if (isExtracting)
|
if (isExtracting)
|
||||||
LinearProgressIndicator(
|
LinearProgressIndicator(
|
||||||
|
|||||||
@@ -52,9 +52,9 @@ class _CompactCheckboxState extends State<CompactCheckbox> {
|
|||||||
widget.scale == null
|
widget.scale == null
|
||||||
? checkbox
|
? checkbox
|
||||||
: Transform.scale(
|
: Transform.scale(
|
||||||
scale: widget.scale,
|
scale: widget.scale,
|
||||||
child: checkbox,
|
child: checkbox,
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
widget.label,
|
widget.label,
|
||||||
style: widget.textStyle,
|
style: widget.textStyle,
|
||||||
|
|||||||
@@ -246,7 +246,8 @@ class _DirectorySelectorState extends State<DirectorySelector> {
|
|||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Icon(Icons.arrow_forward, size: 14, color: Colors.blue[700]),
|
Icon(Icons.arrow_forward,
|
||||||
|
size: 14, color: Colors.blue[700]),
|
||||||
const SizedBox(width: 4),
|
const SizedBox(width: 4),
|
||||||
Flexible(
|
Flexible(
|
||||||
child: Text(
|
child: Text(
|
||||||
@@ -263,9 +264,10 @@ class _DirectorySelectorState extends State<DirectorySelector> {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return TextFormField(
|
return TextFormField(
|
||||||
readOnly: widget.allowEdit ? false : (Util.isWeb() ? false : true),
|
readOnly:
|
||||||
|
widget.allowEdit ? false : (Util.isWeb() ? false : true),
|
||||||
controller: widget.controller,
|
controller: widget.controller,
|
||||||
decoration: widget.showLabel
|
decoration: widget.showLabel
|
||||||
? InputDecoration(
|
? InputDecoration(
|
||||||
|
|||||||
@@ -107,7 +107,8 @@ const deDE = {
|
|||||||
'browserExtension': 'Browsererweiterung',
|
'browserExtension': 'Browsererweiterung',
|
||||||
'launchAtStartup': 'Beim Start starten',
|
'launchAtStartup': 'Beim Start starten',
|
||||||
'runAsMenubarApp': 'Als Menüleisten-App ausführen',
|
'runAsMenubarApp': 'Als Menüleisten-App ausführen',
|
||||||
'runAsMenubarAppDesc': 'Dock-Symbol ausblenden und nur in der Menüleiste ausführen',
|
'runAsMenubarAppDesc':
|
||||||
|
'Dock-Symbol ausblenden und nur in der Menüleiste ausführen',
|
||||||
'seedConfig': 'Seed-Konfiguration',
|
'seedConfig': 'Seed-Konfiguration',
|
||||||
'seedKeep': 'Weiter-seeden bis manuell gestoppt',
|
'seedKeep': 'Weiter-seeden bis manuell gestoppt',
|
||||||
'seedRatio': 'Seed Verhältniss',
|
'seedRatio': 'Seed Verhältniss',
|
||||||
@@ -126,6 +127,7 @@ const deDE = {
|
|||||||
'extracting': 'Wird entpackt',
|
'extracting': 'Wird entpackt',
|
||||||
'extractDone': 'Entpacken abgeschlossen',
|
'extractDone': 'Entpacken abgeschlossen',
|
||||||
'extractError': 'Entpacken fehlgeschlagen',
|
'extractError': 'Entpacken fehlgeschlagen',
|
||||||
|
'waitingParts': 'Warte auf Teile',
|
||||||
'name': 'Name',
|
'name': 'Name',
|
||||||
'size': 'Größe',
|
'size': 'Größe',
|
||||||
'unknown': 'Unbekannt',
|
'unknown': 'Unbekannt',
|
||||||
|
|||||||
@@ -134,6 +134,7 @@ const enUS = {
|
|||||||
'extracting': 'Extracting',
|
'extracting': 'Extracting',
|
||||||
'extractDone': 'Extraction completed',
|
'extractDone': 'Extraction completed',
|
||||||
'extractError': 'Extraction failed',
|
'extractError': 'Extraction failed',
|
||||||
|
'waitingParts': 'Waiting for parts',
|
||||||
'name': 'Name',
|
'name': 'Name',
|
||||||
'size': 'Size',
|
'size': 'Size',
|
||||||
'unknown': 'Unknown',
|
'unknown': 'Unknown',
|
||||||
|
|||||||
@@ -100,7 +100,8 @@ const esES = {
|
|||||||
'browserExtension': 'Extensión del Navegador',
|
'browserExtension': 'Extensión del Navegador',
|
||||||
'launchAtStartup': 'Iniciar al Arranque',
|
'launchAtStartup': 'Iniciar al Arranque',
|
||||||
'runAsMenubarApp': 'Ejecutar como aplicación de barra de menú',
|
'runAsMenubarApp': 'Ejecutar como aplicación de barra de menú',
|
||||||
'runAsMenubarAppDesc': 'Ocultar icono del Dock y ejecutar solo en la barra de menú',
|
'runAsMenubarAppDesc':
|
||||||
|
'Ocultar icono del Dock y ejecutar solo en la barra de menú',
|
||||||
'seedConfig': 'Configuración de Semilla',
|
'seedConfig': 'Configuración de Semilla',
|
||||||
'seedKeep': 'Mantener sembrado',
|
'seedKeep': 'Mantener sembrado',
|
||||||
'seedRatio': 'Ratio de semilla',
|
'seedRatio': 'Ratio de semilla',
|
||||||
@@ -118,6 +119,7 @@ const esES = {
|
|||||||
'extracting': 'Extrayendo',
|
'extracting': 'Extrayendo',
|
||||||
'extractDone': 'Extracción completada',
|
'extractDone': 'Extracción completada',
|
||||||
'extractError': 'Error en la extracción',
|
'extractError': 'Error en la extracción',
|
||||||
|
'waitingParts': 'Esperando partes',
|
||||||
'insertPlaceholder': 'Insertar marcador de posición',
|
'insertPlaceholder': 'Insertar marcador de posición',
|
||||||
'placeholderYear': 'Año actual',
|
'placeholderYear': 'Año actual',
|
||||||
'placeholderMonth': 'Mes actual (01-12)',
|
'placeholderMonth': 'Mes actual (01-12)',
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ const faIR = {
|
|||||||
'extracting': 'در حال استخراج',
|
'extracting': 'در حال استخراج',
|
||||||
'extractDone': 'استخراج کامل شد',
|
'extractDone': 'استخراج کامل شد',
|
||||||
'extractError': 'استخراج ناموفق بود',
|
'extractError': 'استخراج ناموفق بود',
|
||||||
|
'waitingParts': 'در انتظار قسمتها',
|
||||||
'insertPlaceholder': 'درج نگهدارنده',
|
'insertPlaceholder': 'درج نگهدارنده',
|
||||||
'placeholderYear': 'سال جاری',
|
'placeholderYear': 'سال جاری',
|
||||||
'placeholderMonth': 'ماه جاری (01-12)',
|
'placeholderMonth': 'ماه جاری (01-12)',
|
||||||
|
|||||||
@@ -100,7 +100,8 @@ const frFR = {
|
|||||||
'browserExtension': 'Extension du navigateur',
|
'browserExtension': 'Extension du navigateur',
|
||||||
'launchAtStartup': 'Lancer au démarrage',
|
'launchAtStartup': 'Lancer au démarrage',
|
||||||
'runAsMenubarApp': 'Exécuter en tant qu\'application de barre de menus',
|
'runAsMenubarApp': 'Exécuter en tant qu\'application de barre de menus',
|
||||||
'runAsMenubarAppDesc': 'Masquer l\'icône du Dock et exécuter uniquement dans la barre de menus',
|
'runAsMenubarAppDesc':
|
||||||
|
'Masquer l\'icône du Dock et exécuter uniquement dans la barre de menus',
|
||||||
'skipVerifyCert': 'Ignorer la vérification du certificat',
|
'skipVerifyCert': 'Ignorer la vérification du certificat',
|
||||||
'archives': 'Archives',
|
'archives': 'Archives',
|
||||||
'autoExtract': 'Extraire automatiquement les archives',
|
'autoExtract': 'Extraire automatiquement les archives',
|
||||||
@@ -110,6 +111,7 @@ const frFR = {
|
|||||||
'extracting': 'Extraction en cours',
|
'extracting': 'Extraction en cours',
|
||||||
'extractDone': 'Extraction terminée',
|
'extractDone': 'Extraction terminée',
|
||||||
'extractError': 'Échec de l\'extraction',
|
'extractError': 'Échec de l\'extraction',
|
||||||
|
'waitingParts': 'En attente des parties',
|
||||||
'insertPlaceholder': 'Insérer un espace réservé',
|
'insertPlaceholder': 'Insérer un espace réservé',
|
||||||
'placeholderYear': 'Année en cours',
|
'placeholderYear': 'Année en cours',
|
||||||
'placeholderMonth': 'Mois en cours (01-12)',
|
'placeholderMonth': 'Mois en cours (01-12)',
|
||||||
|
|||||||
@@ -107,7 +107,8 @@ const huHU = {
|
|||||||
'browserExtension': 'Böngésző bővítmény',
|
'browserExtension': 'Böngésző bővítmény',
|
||||||
'launchAtStartup': 'Indítás indításkor',
|
'launchAtStartup': 'Indítás indításkor',
|
||||||
'runAsMenubarApp': 'Futtatás menüsáv alkalmazásként',
|
'runAsMenubarApp': 'Futtatás menüsáv alkalmazásként',
|
||||||
'runAsMenubarAppDesc': 'Dock ikon elrejtése és csak a menüsávban való futtatás',
|
'runAsMenubarAppDesc':
|
||||||
|
'Dock ikon elrejtése és csak a menüsávban való futtatás',
|
||||||
'seedConfig': 'Seed beállítás',
|
'seedConfig': 'Seed beállítás',
|
||||||
'seedKeep': 'Tartsa a seedet amíg manuálisan le nem állítják',
|
'seedKeep': 'Tartsa a seedet amíg manuálisan le nem állítják',
|
||||||
'seedRatio': 'Seed arány',
|
'seedRatio': 'Seed arány',
|
||||||
@@ -126,6 +127,7 @@ const huHU = {
|
|||||||
'extracting': 'Kicsomagolás',
|
'extracting': 'Kicsomagolás',
|
||||||
'extractDone': 'Kicsomagolás befejezve',
|
'extractDone': 'Kicsomagolás befejezve',
|
||||||
'extractError': 'Kicsomagolás sikertelen',
|
'extractError': 'Kicsomagolás sikertelen',
|
||||||
|
'waitingParts': 'Várakozás a részekre',
|
||||||
'name': 'Név',
|
'name': 'Név',
|
||||||
'size': 'Méret',
|
'size': 'Méret',
|
||||||
'unknown': 'Ismeretlen',
|
'unknown': 'Ismeretlen',
|
||||||
|
|||||||
@@ -102,7 +102,8 @@ const idID = {
|
|||||||
'browserExtension': 'Ekstensi Perambanan',
|
'browserExtension': 'Ekstensi Perambanan',
|
||||||
'launchAtStartup': 'Luncurkan saat Startup',
|
'launchAtStartup': 'Luncurkan saat Startup',
|
||||||
'runAsMenubarApp': 'Jalankan sebagai aplikasi bilah menu',
|
'runAsMenubarApp': 'Jalankan sebagai aplikasi bilah menu',
|
||||||
'runAsMenubarAppDesc': 'Sembunyikan ikon Dock dan jalankan hanya di bilah menu',
|
'runAsMenubarAppDesc':
|
||||||
|
'Sembunyikan ikon Dock dan jalankan hanya di bilah menu',
|
||||||
'seedConfig': 'Konfigurasi Seed',
|
'seedConfig': 'Konfigurasi Seed',
|
||||||
'seedKeep': 'Terus seeding hingga dihentikan secara manual',
|
'seedKeep': 'Terus seeding hingga dihentikan secara manual',
|
||||||
'seedRatio': 'Rasio Seed',
|
'seedRatio': 'Rasio Seed',
|
||||||
@@ -120,6 +121,7 @@ const idID = {
|
|||||||
'extracting': 'Mengekstrak',
|
'extracting': 'Mengekstrak',
|
||||||
'extractDone': 'Ekstraksi selesai',
|
'extractDone': 'Ekstraksi selesai',
|
||||||
'extractError': 'Ekstraksi gagal',
|
'extractError': 'Ekstraksi gagal',
|
||||||
|
'waitingParts': 'Menunggu bagian',
|
||||||
'insertPlaceholder': 'Sisipkan placeholder',
|
'insertPlaceholder': 'Sisipkan placeholder',
|
||||||
'placeholderYear': 'Tahun saat ini',
|
'placeholderYear': 'Tahun saat ini',
|
||||||
'placeholderMonth': 'Bulan saat ini (01-12)',
|
'placeholderMonth': 'Bulan saat ini (01-12)',
|
||||||
|
|||||||
@@ -98,7 +98,8 @@ const itIT = {
|
|||||||
'browserExtension': 'Estensione del browser',
|
'browserExtension': 'Estensione del browser',
|
||||||
'launchAtStartup': "Lancia all'avvio",
|
'launchAtStartup': "Lancia all'avvio",
|
||||||
'runAsMenubarApp': 'Esegui come app della barra dei menu',
|
'runAsMenubarApp': 'Esegui come app della barra dei menu',
|
||||||
'runAsMenubarAppDesc': 'Nascondi icona Dock ed esegui solo nella barra dei menu',
|
'runAsMenubarAppDesc':
|
||||||
|
'Nascondi icona Dock ed esegui solo nella barra dei menu',
|
||||||
'skipVerifyCert': 'Salta la verifica del certificato',
|
'skipVerifyCert': 'Salta la verifica del certificato',
|
||||||
'archives': 'Archivi',
|
'archives': 'Archivi',
|
||||||
'autoExtract': 'Estrai automaticamente gli archivi',
|
'autoExtract': 'Estrai automaticamente gli archivi',
|
||||||
@@ -108,6 +109,7 @@ const itIT = {
|
|||||||
'extracting': 'Estrazione in corso',
|
'extracting': 'Estrazione in corso',
|
||||||
'extractDone': 'Estrazione completata',
|
'extractDone': 'Estrazione completata',
|
||||||
'extractError': 'Estrazione fallita',
|
'extractError': 'Estrazione fallita',
|
||||||
|
'waitingParts': 'In attesa delle parti',
|
||||||
'insertPlaceholder': 'Inserisci segnaposto',
|
'insertPlaceholder': 'Inserisci segnaposto',
|
||||||
'placeholderYear': 'Anno corrente',
|
'placeholderYear': 'Anno corrente',
|
||||||
'placeholderMonth': 'Mese corrente (01-12)',
|
'placeholderMonth': 'Mese corrente (01-12)',
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ const jaJP = {
|
|||||||
'extracting': '展開中',
|
'extracting': '展開中',
|
||||||
'extractDone': '展開完了',
|
'extractDone': '展開完了',
|
||||||
'extractError': '展開失敗',
|
'extractError': '展開失敗',
|
||||||
|
'waitingParts': '分割ファイルを待っています',
|
||||||
'insertPlaceholder': 'プレースホルダーを挿入',
|
'insertPlaceholder': 'プレースホルダーを挿入',
|
||||||
'placeholderYear': '現在の年',
|
'placeholderYear': '現在の年',
|
||||||
'placeholderMonth': '現在の月 (01-12)',
|
'placeholderMonth': '現在の月 (01-12)',
|
||||||
|
|||||||
@@ -106,6 +106,7 @@ const plPL = {
|
|||||||
'extracting': 'Rozpakowywanie',
|
'extracting': 'Rozpakowywanie',
|
||||||
'extractDone': 'Rozpakowywanie zakończone',
|
'extractDone': 'Rozpakowywanie zakończone',
|
||||||
'extractError': 'Rozpakowywanie nie powiodło się',
|
'extractError': 'Rozpakowywanie nie powiodło się',
|
||||||
|
'waitingParts': 'Oczekiwanie na części',
|
||||||
'insertPlaceholder': 'Wstaw placeholder',
|
'insertPlaceholder': 'Wstaw placeholder',
|
||||||
'placeholderYear': 'Bieżący rok',
|
'placeholderYear': 'Bieżący rok',
|
||||||
'placeholderMonth': 'Bieżący miesiąc (01-12)',
|
'placeholderMonth': 'Bieżący miesiąc (01-12)',
|
||||||
|
|||||||
@@ -104,7 +104,8 @@ const ptBR = {
|
|||||||
'browserExtension': 'Extensões para Navegadores',
|
'browserExtension': 'Extensões para Navegadores',
|
||||||
'launchAtStartup': 'Launch at Startup',
|
'launchAtStartup': 'Launch at Startup',
|
||||||
'runAsMenubarApp': 'Executar como aplicativo da barra de menus',
|
'runAsMenubarApp': 'Executar como aplicativo da barra de menus',
|
||||||
'runAsMenubarAppDesc': 'Ocultar ícone do Dock e executar apenas na barra de menus',
|
'runAsMenubarAppDesc':
|
||||||
|
'Ocultar ícone do Dock e executar apenas na barra de menus',
|
||||||
'seedConfig': 'Seed Config',
|
'seedConfig': 'Seed Config',
|
||||||
'seedKeep': 'Keep seeding until manually stopped',
|
'seedKeep': 'Keep seeding until manually stopped',
|
||||||
'seedRatio': 'Seed ratio',
|
'seedRatio': 'Seed ratio',
|
||||||
@@ -123,6 +124,7 @@ const ptBR = {
|
|||||||
'extracting': 'Extraindo',
|
'extracting': 'Extraindo',
|
||||||
'extractDone': 'Extração concluída',
|
'extractDone': 'Extração concluída',
|
||||||
'extractError': 'Falha na extração',
|
'extractError': 'Falha na extração',
|
||||||
|
'waitingParts': 'Aguardando partes',
|
||||||
'name': 'Nome',
|
'name': 'Nome',
|
||||||
'size': 'Tamanho',
|
'size': 'Tamanho',
|
||||||
'unknown': 'Desconhecido',
|
'unknown': 'Desconhecido',
|
||||||
|
|||||||
@@ -104,7 +104,8 @@ const ruRU = {
|
|||||||
'browserExtension': 'Расширение браузера',
|
'browserExtension': 'Расширение браузера',
|
||||||
'launchAtStartup': 'Запускать при загрузке системы',
|
'launchAtStartup': 'Запускать при загрузке системы',
|
||||||
'runAsMenubarApp': 'Запускать как приложение в строке меню',
|
'runAsMenubarApp': 'Запускать как приложение в строке меню',
|
||||||
'runAsMenubarAppDesc': 'Скрыть значок в Dock и запускать только в строке меню',
|
'runAsMenubarAppDesc':
|
||||||
|
'Скрыть значок в Dock и запускать только в строке меню',
|
||||||
'seedConfig': 'Настройка раздачи',
|
'seedConfig': 'Настройка раздачи',
|
||||||
'seedKeep': 'Раздавать пока не остановлю вручную',
|
'seedKeep': 'Раздавать пока не остановлю вручную',
|
||||||
'seedRatio': 'Коэффициент раздачи',
|
'seedRatio': 'Коэффициент раздачи',
|
||||||
@@ -123,6 +124,7 @@ const ruRU = {
|
|||||||
'extracting': 'Распаковка',
|
'extracting': 'Распаковка',
|
||||||
'extractDone': 'Распаковка завершена',
|
'extractDone': 'Распаковка завершена',
|
||||||
'extractError': 'Ошибка распаковки',
|
'extractError': 'Ошибка распаковки',
|
||||||
|
'waitingParts': 'Ожидание частей',
|
||||||
'name': 'Название',
|
'name': 'Название',
|
||||||
'size': 'Размер',
|
'size': 'Размер',
|
||||||
'unknown': 'Неизвестно',
|
'unknown': 'Неизвестно',
|
||||||
|
|||||||
@@ -108,6 +108,7 @@ const taTA = {
|
|||||||
'extracting': 'பிரித்தெடுக்கிறது',
|
'extracting': 'பிரித்தெடுக்கிறது',
|
||||||
'extractDone': 'பிரித்தெடுத்தல் முடிந்தது',
|
'extractDone': 'பிரித்தெடுத்தல் முடிந்தது',
|
||||||
'extractError': 'பிரித்தெடுத்தல் தோல்வியடைந்தது',
|
'extractError': 'பிரித்தெடுத்தல் தோல்வியடைந்தது',
|
||||||
|
'waitingParts': 'பாகங்களுக்காக காத்திருக்கிறது',
|
||||||
'insertPlaceholder': 'இடங்காட்டி செருக',
|
'insertPlaceholder': 'இடங்காட்டி செருக',
|
||||||
'placeholderYear': 'தற்போதைய ஆண்டு',
|
'placeholderYear': 'தற்போதைய ஆண்டு',
|
||||||
'placeholderMonth': 'தற்போதைய மாதம் (01-12)',
|
'placeholderMonth': 'தற்போதைய மாதம் (01-12)',
|
||||||
|
|||||||
@@ -105,7 +105,8 @@ const trTR = {
|
|||||||
'browserExtension': 'Tarayıcı Eklentisi',
|
'browserExtension': 'Tarayıcı Eklentisi',
|
||||||
'launchAtStartup': 'Başlangıçta Çalıştır',
|
'launchAtStartup': 'Başlangıçta Çalıştır',
|
||||||
'runAsMenubarApp': 'Menü çubuğu uygulaması olarak çalıştır',
|
'runAsMenubarApp': 'Menü çubuğu uygulaması olarak çalıştır',
|
||||||
'runAsMenubarAppDesc': 'Dock simgesini gizle ve yalnızca menü çubuğunda çalıştır',
|
'runAsMenubarAppDesc':
|
||||||
|
'Dock simgesini gizle ve yalnızca menü çubuğunda çalıştır',
|
||||||
'seedConfig': 'Seed Ayarları',
|
'seedConfig': 'Seed Ayarları',
|
||||||
'seedKeep': 'Manuel olarak durdurulana kadar seed etmeye devam et',
|
'seedKeep': 'Manuel olarak durdurulana kadar seed etmeye devam et',
|
||||||
'seedRatio': 'Seed oranı',
|
'seedRatio': 'Seed oranı',
|
||||||
@@ -124,6 +125,7 @@ const trTR = {
|
|||||||
'extracting': 'Çıkarılıyor',
|
'extracting': 'Çıkarılıyor',
|
||||||
'extractDone': 'Çıkarma tamamlandı',
|
'extractDone': 'Çıkarma tamamlandı',
|
||||||
'extractError': 'Çıkarma başarısız',
|
'extractError': 'Çıkarma başarısız',
|
||||||
|
'waitingParts': 'Parçalar bekleniyor',
|
||||||
'name': 'Ad',
|
'name': 'Ad',
|
||||||
'size': 'Boyut',
|
'size': 'Boyut',
|
||||||
'unknown': 'Bilinmeyen',
|
'unknown': 'Bilinmeyen',
|
||||||
|
|||||||
@@ -104,7 +104,8 @@ const ukUA = {
|
|||||||
'browserExtension': 'Розширення для браузера',
|
'browserExtension': 'Розширення для браузера',
|
||||||
'launchAtStartup': 'Запускати під час завантаження системи',
|
'launchAtStartup': 'Запускати під час завантаження системи',
|
||||||
'runAsMenubarApp': 'Запускати як додаток у рядку меню',
|
'runAsMenubarApp': 'Запускати як додаток у рядку меню',
|
||||||
'runAsMenubarAppDesc': 'Приховати значок у Dock і запускати лише в рядку меню',
|
'runAsMenubarAppDesc':
|
||||||
|
'Приховати значок у Dock і запускати лише в рядку меню',
|
||||||
'seedConfig': 'Налаштування роздачі',
|
'seedConfig': 'Налаштування роздачі',
|
||||||
'seedKeep': 'Роздавати доки не зупиню вручну',
|
'seedKeep': 'Роздавати доки не зупиню вручну',
|
||||||
'seedRatio': 'Коефіцієнт роздачі',
|
'seedRatio': 'Коефіцієнт роздачі',
|
||||||
@@ -123,6 +124,7 @@ const ukUA = {
|
|||||||
'extracting': 'Розпакування',
|
'extracting': 'Розпакування',
|
||||||
'extractDone': 'Розпакування завершено',
|
'extractDone': 'Розпакування завершено',
|
||||||
'extractError': 'Помилка розпакування',
|
'extractError': 'Помилка розпакування',
|
||||||
|
'waitingParts': 'Очікування частин',
|
||||||
'name': 'Назва',
|
'name': 'Назва',
|
||||||
'size': 'Розмір',
|
'size': 'Розмір',
|
||||||
'unknown': 'Невідомо',
|
'unknown': 'Невідомо',
|
||||||
|
|||||||
@@ -99,6 +99,7 @@ const viVN = {
|
|||||||
'extracting': 'Đang giải nén',
|
'extracting': 'Đang giải nén',
|
||||||
'extractDone': 'Giải nén hoàn tất',
|
'extractDone': 'Giải nén hoàn tất',
|
||||||
'extractError': 'Giải nén thất bại',
|
'extractError': 'Giải nén thất bại',
|
||||||
|
'waitingParts': 'Đang chờ các phần',
|
||||||
'insertPlaceholder': 'Chèn placeholder',
|
'insertPlaceholder': 'Chèn placeholder',
|
||||||
'placeholderYear': 'Năm hiện tại',
|
'placeholderYear': 'Năm hiện tại',
|
||||||
'placeholderMonth': 'Tháng hiện tại (01-12)',
|
'placeholderMonth': 'Tháng hiện tại (01-12)',
|
||||||
|
|||||||
@@ -132,6 +132,7 @@ const zhCN = {
|
|||||||
'extracting': '正在解压',
|
'extracting': '正在解压',
|
||||||
'extractDone': '解压完成',
|
'extractDone': '解压完成',
|
||||||
'extractError': '解压失败',
|
'extractError': '解压失败',
|
||||||
|
'waitingParts': '等待分卷',
|
||||||
'name': '名称',
|
'name': '名称',
|
||||||
'size': '大小',
|
'size': '大小',
|
||||||
'unknown': '未知',
|
'unknown': '未知',
|
||||||
|
|||||||
@@ -120,6 +120,7 @@ const zhTW = {
|
|||||||
'extracting': '正在解壓',
|
'extracting': '正在解壓',
|
||||||
'extractDone': '解壓完成',
|
'extractDone': '解壓完成',
|
||||||
'extractError': '解壓失敗',
|
'extractError': '解壓失敗',
|
||||||
|
'waitingParts': '等待分卷',
|
||||||
'name': '名稱',
|
'name': '名稱',
|
||||||
'size': '大小',
|
'size': '大小',
|
||||||
'unknown': '未知',
|
'unknown': '未知',
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
/// fonts:
|
/// fonts:
|
||||||
/// - asset: fonts/Gopeed.ttf
|
/// - asset: fonts/Gopeed.ttf
|
||||||
///
|
///
|
||||||
///
|
///
|
||||||
/// * Entypo, Copyright (C) 2012 by Daniel Bruce
|
/// * Entypo, Copyright (C) 2012 by Daniel Bruce
|
||||||
/// Author: Daniel Bruce
|
/// Author: Daniel Bruce
|
||||||
/// License: SIL (http://scripts.sil.org/OFL)
|
/// License: SIL (http://scripts.sil.org/OFL)
|
||||||
@@ -33,24 +33,44 @@ class Gopeed {
|
|||||||
static const _kFontFam = 'Gopeed';
|
static const _kFontFam = 'Gopeed';
|
||||||
static const String? _kFontPkg = null;
|
static const String? _kFontPkg = null;
|
||||||
|
|
||||||
static const IconData install = IconData(0xe800, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
static const IconData install =
|
||||||
static const IconData android = IconData(0xe801, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
IconData(0xe800, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||||
static const IconData cd = IconData(0xe802, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
static const IconData android =
|
||||||
static const IconData folder_bt = IconData(0xe803, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
IconData(0xe801, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||||
static const IconData file_bt = IconData(0xe804, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
static const IconData cd =
|
||||||
static const IconData folder = IconData(0xf07b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
IconData(0xe802, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||||
static const IconData sort = IconData(0xf0dc, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
static const IconData folder_bt =
|
||||||
static const IconData html5 = IconData(0xf13b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
IconData(0xe803, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||||
static const IconData file = IconData(0xf15b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
static const IconData file_bt =
|
||||||
static const IconData file_alt = IconData(0xf15c, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
IconData(0xe804, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||||
static const IconData file_pdf = IconData(0xf1c1, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
static const IconData folder =
|
||||||
static const IconData file_word = IconData(0xf1c2, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
IconData(0xf07b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||||
static const IconData file_excel = IconData(0xf1c3, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
static const IconData sort =
|
||||||
static const IconData file_powerpoint = IconData(0xf1c4, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
IconData(0xf0dc, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||||
static const IconData file_image = IconData(0xf1c5, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
static const IconData html5 =
|
||||||
static const IconData file_archive = IconData(0xf1c6, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
IconData(0xf13b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||||
static const IconData file_audio = IconData(0xf1c7, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
static const IconData file =
|
||||||
static const IconData file_video = IconData(0xf1c8, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
IconData(0xf15b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||||
static const IconData file_code = IconData(0xf1c9, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
static const IconData file_alt =
|
||||||
static const IconData app_store_ios = IconData(0xf370, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
IconData(0xf15c, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||||
|
static const IconData file_pdf =
|
||||||
|
IconData(0xf1c1, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||||
|
static const IconData file_word =
|
||||||
|
IconData(0xf1c2, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||||
|
static const IconData file_excel =
|
||||||
|
IconData(0xf1c3, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||||
|
static const IconData file_powerpoint =
|
||||||
|
IconData(0xf1c4, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||||
|
static const IconData file_image =
|
||||||
|
IconData(0xf1c5, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||||
|
static const IconData file_archive =
|
||||||
|
IconData(0xf1c6, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||||
|
static const IconData file_audio =
|
||||||
|
IconData(0xf1c7, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||||
|
static const IconData file_video =
|
||||||
|
IconData(0xf1c8, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||||
|
static const IconData file_code =
|
||||||
|
IconData(0xf1c9, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||||
|
static const IconData app_store_ios =
|
||||||
|
IconData(0xf370, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||||
}
|
}
|
||||||
@@ -71,7 +71,8 @@ Future<void> init(Args args) async {
|
|||||||
final windowState = Database.instance.getWindowState();
|
final windowState = Database.instance.getWindowState();
|
||||||
|
|
||||||
// Check if menubar mode is enabled (only for macOS)
|
// Check if menubar mode is enabled (only for macOS)
|
||||||
final runAsMenubarApp = Util.isMacos() && Database.instance.getRunAsMenubarApp();
|
final runAsMenubarApp =
|
||||||
|
Util.isMacos() && Database.instance.getRunAsMenubarApp();
|
||||||
|
|
||||||
final windowOptions = WindowOptions(
|
final windowOptions = WindowOptions(
|
||||||
size: Size(windowState?.width ?? 800, windowState?.height ?? 600),
|
size: Size(windowState?.width ?? 800, windowState?.height ?? 600),
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import 'arch_stub.dart'
|
import 'arch_stub.dart'
|
||||||
if (dart.library.io) 'entry/arch_native.dart'
|
if (dart.library.io) 'entry/arch_native.dart'
|
||||||
if (dart.library.html) 'entry/arch_web.dart';
|
if (dart.library.html) 'entry/arch_web.dart';
|
||||||
|
|
||||||
// Copy from pkg/sky_engine/lib/ffi/abi.dart
|
// Copy from pkg/sky_engine/lib/ffi/abi.dart
|
||||||
enum Architecture {
|
enum Architecture {
|
||||||
|
|||||||
@@ -8,4 +8,3 @@ unregisterUrlScheme(String scheme) => doUnregisterUrlScheme(scheme);
|
|||||||
registerDefaultTorrentClient() => doRegisterDefaultTorrentClient();
|
registerDefaultTorrentClient() => doRegisterDefaultTorrentClient();
|
||||||
|
|
||||||
unregisterDefaultTorrentClient() => doUnregisterDefaultTorrentClient();
|
unregisterDefaultTorrentClient() => doUnregisterDefaultTorrentClient();
|
||||||
|
|
||||||
@@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
|
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
testWidgets('Counter increments smoke test', (WidgetTester tester) async {});
|
testWidgets('Counter increments smoke test', (WidgetTester tester) async {});
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user