|
@@ -24,7 +24,9 @@
|
|
|
(multiple-value-bind (body status headers uri)
|
|
(multiple-value-bind (body status headers uri)
|
|
|
(handler-bind
|
|
(handler-bind
|
|
|
((sb-int:broken-pipe #'(lambda (c) (declare (ignorable c))
|
|
((sb-int:broken-pipe #'(lambda (c) (declare (ignorable c))
|
|
|
- (invoke-restart (find-restart 'dexador:retry-request)))))
|
|
|
|
|
|
|
+ (invoke-restart (find-restart 'dexador:retry-request))))
|
|
|
|
|
+ (sb-sys:io-timeout #'(lambda (c) (declare (ignorable c))
|
|
|
|
|
+ (invoke-restart (find-restart 'dexador:retry-request)))))
|
|
|
(apply #'http-request url :headers headers args))
|
|
(apply #'http-request url :headers headers args))
|
|
|
(unless (stringp body)
|
|
(unless (stringp body)
|
|
|
(setf body (trivial-utf-8:utf-8-bytes-to-string body)))
|
|
(setf body (trivial-utf-8:utf-8-bytes-to-string body)))
|
|
@@ -295,9 +297,9 @@
|
|
|
(loop for (ih . name) in (deluge-get-seeding-torrents)
|
|
(loop for (ih . name) in (deluge-get-seeding-torrents)
|
|
|
do (handler-case (process-downloaded-torrent ih)
|
|
do (handler-case (process-downloaded-torrent ih)
|
|
|
(error (c) (log:error "Error processing torrent" name c))))
|
|
(error (c) (log:error "Error processing torrent" name c))))
|
|
|
- (loop for dir in (slskd-get-download-directories)
|
|
|
|
|
- do (handler-case (slskd-process-download-dir dir)
|
|
|
|
|
- (error (c) (log:error "Error processing slskd" c))))
|
|
|
|
|
|
|
+ (handler-case (loop for dir in (slskd-get-download-directories)
|
|
|
|
|
+ do (slskd-process-download-dir dir))
|
|
|
|
|
+ (error (c) (log:error "Error processing slskd" c)))
|
|
|
(sleep 1)))
|
|
(sleep 1)))
|
|
|
|
|
|
|
|
(defvar *watcher* nil "Importer thread ")
|
|
(defvar *watcher* nil "Importer thread ")
|
|
@@ -360,9 +362,9 @@
|
|
|
(member *chat-id* (lists-get :music-admins)))
|
|
(member *chat-id* (lists-get :music-admins)))
|
|
|
(case (keyify action)
|
|
(case (keyify action)
|
|
|
(:magnet (let ((url (agets *data* "url")))
|
|
(:magnet (let ((url (agets *data* "url")))
|
|
|
- (if (magnetp url)
|
|
|
|
|
- (progn (handle-add-torrent url) "OK")
|
|
|
|
|
- "Bad magnet"))))))))
|
|
|
|
|
|
|
+ (when (magnetp url)
|
|
|
|
|
+ (handle-add-torrent url)))))))))
|
|
|
|
|
+
|
|
|
|
|
|
|
|
(def-message-cmd-handler handle-cmd-music (:music :m)
|
|
(def-message-cmd-handler handle-cmd-music (:music :m)
|
|
|
(with-chat-in-list :music-admins
|
|
(with-chat-in-list :music-admins
|