Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

automatic catalog refresh #184

Closed
tehn opened this issue Jul 26, 2020 · 5 comments
Closed

automatic catalog refresh #184

tehn opened this issue Jul 26, 2020 · 5 comments
Assignees
Labels

Comments

@tehn
Copy link
Member

@tehn tehn commented Jul 26, 2020

moved from monome/norns#1159

while it's documented that users need to refresh the community catalog to pull in new scripts, it often requires reiteration. eg: https://llllllll.co/t/grd/33768/63

curious if there's a way to automatically refresh the catalog once a network is detected, or once the user connects to maiden, so that any scripts which might have been released while the user was offline are presented without additional actions from the user?

@dndrks
Copy link

@dndrks dndrks commented Nov 6, 2020

bump for visibility! @ngwese + @tehn , does this make sense to live on the maiden load side or just when norns connects to WIFI?

@ngwese
Copy link
Member

@ngwese ngwese commented Nov 6, 2020

i can look into refreshing the catalogs when the backend starts up (easy) or via some periodic event (not sure which event to hook into, possibly something to do asynchronous to in the background when the available page is accessed)

@ngwese ngwese self-assigned this Nov 7, 2020
@ngwese
Copy link
Member

@ngwese ngwese commented Nov 7, 2020

i'm testing out a quick pass at something which will hopefully solve the problem or at least mitigate some of the confusion. essentially the logic is such that when the maiden server starts it:

  • waits 15 seconds for the network to come up (assuming it is setup to auto connect)
  • attempts to trigger update/downloading of all catalogs on the device 5 times, waiting a minute in between each attempt
  • if any catalog changes on disk subsequent attempts are abandoned

247b93a

the logic is crude at best. improvements could be made but would require more restructuring of the code than i'd like to get into right now. obviously this logic fails if:

  • the network is not available when norns starts
  • the catalogs have changed after norns has been running for over five minutes

if i can locate a go library that packages up monitoring of whether or not linux networking is up/down then i will consider changing the logic to check on changes to the networking status on the device...

@tehn
Copy link
Member Author

@tehn tehn commented Nov 10, 2020

i think your proposal is totally adequate for our purposes, which is to simply reduce the issues.

perhaps we should alternatively consider changing the UI for refreshing catalogs... ie something like a button at the top which is "check for new scripts"

(i'm curious if we've ever had a script removed from the community catalog??)

@ngwese
Copy link
Member

@ngwese ngwese commented Nov 10, 2020

i saw the additional posts / confusion. will look into some ui tweaks as well.

@ngwese ngwese mentioned this issue Dec 21, 2020
@ngwese ngwese closed this in #189 Dec 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants