add: icon
This commit is contained in:
@@ -91,6 +91,12 @@ func Load() *Config {
|
||||
}
|
||||
}
|
||||
|
||||
// 确保默认保存路径存在
|
||||
err = os.MkdirAll(defaultSavePath, 0755)
|
||||
if err != nil {
|
||||
slog.Error("Failed to create default save path", "path", defaultSavePath, "error", err)
|
||||
}
|
||||
|
||||
var config Config
|
||||
if err := v.Unmarshal(&config); err != nil {
|
||||
slog.Error("Failed to unmarshal config", "error", err)
|
||||
|
||||
@@ -31,10 +31,6 @@ type Service struct {
|
||||
peersMutex sync.RWMutex
|
||||
}
|
||||
|
||||
func init() {
|
||||
application.RegisterEvent[[]Peer]("peers:update")
|
||||
}
|
||||
|
||||
func NewService(config *config.Config, app *application.App, port int) *Service {
|
||||
return &Service{
|
||||
app: app,
|
||||
|
||||
@@ -59,10 +59,6 @@ func NewService(config *config.Config, app *application.App, notifier *notificat
|
||||
}
|
||||
}
|
||||
|
||||
func init() {
|
||||
application.RegisterEvent[application.Void]("transfer:refreshList")
|
||||
}
|
||||
|
||||
func (s *Service) GetPort() int {
|
||||
return s.port
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user