Merge pull request #246 from Midek/master

update url also when offline mode
This commit is contained in:
Dean Jackson 2020-08-06 22:28:04 +02:00 committed by GitHub
commit 4ff6ddd65a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -247,6 +247,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)