Open dusansimic opened 5 years ago
Here’s a screenshot from a one of my work-in-progress branches: 🙂
The idea is to notify the user when a new version has been downloaded, and to allow to install and restart with a single click.
I like how it just happens automatically right now without bothering the user.
It isn’t really automatic though. It updates when you happen to quit the app and start it up again (sometimes twice, if you quit the app before it downloads the update).
That’s cool for utility-type apps, that you often open and close, but Caprine is usually a long running app, where there’s no incentive to quit/restart.
It isn’t that uncommon to have it running for weeks. That’s probably also why Messenger itself has those “click to get the latest” messages. No one wants users stumbling onto bugs that are already fixed.
I’m probably biased, but I like knowing ASAP when there’s a new version of a software I use. (and I also love in-app changelogs 😄)
@CvX any updates on it? It would be awesome to have it! 😉
As I correctly understood, now we need to manually check if new version was released, download new dmg and install it - yeah?
but Caprine is usually a long running app, where there’s no incentive to quit/restart.
But if we implement what you're proposing, it will no longer be a long-running app as the user will have to restart Caprine all the time. (Yes, they will feel forced to do it as no one likes to leave badges unresolved).
Caprine being a long-running app is actually a good thing.
No one wants users stumbling onto bugs that are already fixed.
If users stumble into bugs, they should try restarting then. That's common knowledge.
I’m probably biased, but I like knowing ASAP when there’s a new version of a software I use.
I hate that. I want software to just work and update silently. I don't want to be bothered. 99% of updates are uninteresting anyway. I really like how the iOS App Store handles this now. Apps are just updated silently in the background. In iOS 13, Apple is even demoting the Updates tab to some hidden place.
and I also love in-app changelogs 😄
If there are major cool updates, I agree, but I have Setapp and constantly get useless "what's new" windows for patch releases every time I open some apps.
That being said, if you feel strongly about this, I would be willing to have this as an opt-in setting, but I really don't think it should be default.
As I correctly understood, now we need to manually check if new version was released, download new dmg and install it - yeah?
No
@sindresorhus so how now Update feature works? I didn't see any info about it in README.md
or on website. 🤔
Also, 👍 for silent updates (badge could show only, that app was updated and could be removed after while).
so how now Update feature works?
@marcinlesek It automatically checks for the updates in the background, then downloads it, and installs it the next time you start the app. Or you can manually trigger an update check via menu.
If users stumble into bugs, they should try restarting then. That's common knowledge.
@sindresorhus In my experience, the update download often happened after a restart (dunno if it was due to a poor timing or a bug). So the actual update required two restarts (and monitoring network traffic, to see if the update is being downloaded).
I really like how the iOS App Store handles this now. Apps are just updated silently in the background.
Yeah, I'm an outlier here, coz I have automatic updates turned off and manually go through new stuff ~twice a day. 😅
Anyway, we could find a more subtle solution, like Chrome's or Spotify's .
And, we could also show that instead of Messenger's update banner, which shoves the whole UI downward.
I guess we could better document in the readme how the silent updating works.
@sindresorhus In my experience, the update download often happened after a restart (dunno if it was due to a poor timing or a bug). So the actual update required two restarts (and monitoring network traffic, to see if the update is being downloaded).
Yes, Caprine used to only check for updates at startup, which indeed required two restarts sometimes. Now it checks every 4 hours. We could even make that every hour.
Anyway, we could find a more subtle solution, like Chrome's Chrome update indicator or Spotify's Spotify update indicator.
I think what you shared in https://github.com/sindresorhus/caprine/issues/936#issuecomment-502270317 looks good already.
My idea was not to bother users, just to know once there is a new version of Caprine because I like to receive notifications from the app or the package manager. Since I use linux and appimage Caprine build, there are no notifications about updates whatsoever. It'd be cool if there could be just a little bubble that says that there's and update.
Of course, that would be documented in readme.md
so users know what that means (update has been downloaded and they just need to restart Caprine to apply them).
Honestly, this whole entirely silent/invisible update thing is very unpleasant to me. Until I manually searched the issues and stumbled upon this thread, I had no idea Caprine had an update feature at all, and I was regularly coming to GitHub to get the latest installer. Caprine never told me it updated, was due for an update or anything, and the settings have zero mention of updates AFAIK (and I've looked through them in frustration several times, thinking maybe with this version they finally implemented an update mechanism).
Just... tell people what you're doing. I feel strongly about apps not doing things that users don't expect, and warning them of what they're doing, and I really think auto-updates should work the same way they do with most apps - when an update is ready/downloaded, they warn and tell the user they can restart to get it, and once a new version has been installed, they say so. And of course, most of them also allow the user to opt for manual updates instead.
I use Ubuntu, for myself i created this small shellscript
(which needed 2 fixes: remove \r
and to get the package, the url needs a replace /tag/ => /download/)
#!/bin/bash
#
# check-and-update-caprine.sh - needs: curl grep cut tr dpkg dpkg-architecture xdg-user-dir
#
if [[ "amd64" == "$(dpkg-architecture -q DEB_HOST_ARCH)" ]]; then
latest_url_caprine=$(curl -sI "https://github.com/sindresorhus/caprine/releases/latest" | tr -d "\r" | grep -E "^location: .*caprine/releases/tag/" | cut -d " " -f2)
latest_caprine=$(echo "${latest_url_caprine}" | grep -oE "tag/v[0-9\.]+" | cut -d '/' -f 2 | tr -d 'v')
our_caprine=$(dpkg -l | grep -E "^ii caprine" | tr -s " " | cut -d' ' -f 3)
higher_ver_caprine=$(echo -e "${our_caprine}\n${latest_caprine}" | sort -rV | head -n1)
if [[ "${latest_caprine}" == "${higher_ver_caprine}" ]]; then
dl_latest_caprine=$(echo "${latest_url_caprine}/caprine_${latest_caprine}_amd64.deb" | sed -e "s|/tag/|/download/|g")
dl_dest_dir=$(xdg-user-dir DOWNLOAD)
curl -sL "${dl_latest_caprine}" -o "${dl_dest_dir}/caprine_${latest_caprine}_amd64.deb" && sudo dpkg -i "${dl_dest_dir}/caprine_${latest_caprine}_amd64.deb"
fi
fi
@gnanet You could also use deb-get.
The auto update feature does work but there is no way to know if Caprine is updated other than restarting it, but that would stop the update if it is in process. It'd be great to see notification once Caprine has been updated.
I've seen that just one function call has to be changed. Here's the docs for the function that needs to be called in
index.ts
. It's thecheckForUpdatesAndNotify
method.