unregisterurl: remove all forms of an url, no matter what the downloader is set to
unregisterurl: Fix a bug that caused an url to not be unregistered when it
is claimed by a special remote other than the web.
See commit f175d4cc90
for rationalle.
This commit is contained in:
parent
c984d248d2
commit
0af9d1dcb6
2 changed files with 13 additions and 2 deletions
|
@ -21,5 +21,14 @@ cmd = command "unregisterurl"
|
|||
|
||||
seek :: RegisterUrlOptions -> CommandSeek
|
||||
seek o = case (batchOption o, keyUrlPairs o) of
|
||||
(Batch fmt, _) -> commandAction $ startMass setUrlMissing fmt
|
||||
(NoBatch, ps) -> withWords (commandAction . start setUrlMissing) ps
|
||||
(Batch fmt, _) -> commandAction $ startMass unregisterUrl fmt
|
||||
(NoBatch, ps) -> withWords (commandAction . start unregisterUrl) ps
|
||||
|
||||
unregisterUrl :: Key -> String -> Annex ()
|
||||
unregisterUrl key url = do
|
||||
-- Remove the url no matter what downloader;
|
||||
-- registerurl can set OtherDownloader, and this should also
|
||||
-- be able to remove urls added by addurl, which may use
|
||||
-- YoutubeDownloader.
|
||||
forM_ [minBound..maxBound] $ \dl ->
|
||||
setUrlMissing key (setDownloader url dl)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue