From 3fe593d2e7705a38e59bd49fd0af6001755bdadf Mon Sep 17 00:00:00 2001 From: Midov Date: Mon, 4 May 2020 00:29:44 +0200 Subject: [PATCH] update url also when offline mode --- internal/cmd/update.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/cmd/update.go b/internal/cmd/update.go index 896fa66..0ab4407 100644 --- a/internal/cmd/update.go +++ b/internal/cmd/update.go @@ -246,6 +246,11 @@ func updateHandler(cmd *cobra.Command, args []string) { book.Excerpt = excerpt } + // If user submits url, use it + if url != "" { + book.URL = url + } + // Make sure title is valid and not empty book.Title = validateTitle(book.Title, book.URL)