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

Add unread items expiration #235

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

adaszko
Copy link
Contributor

@adaszko adaszko commented Jan 6, 2025

Hi 👋

It took me a while to learn enough stuff to contribute unreads expiration but here we go.

Been wanting this feature for a long time to combat mental burden caused by a backlog of unread items.

Note: Likely needs more testing but hope it's acceptable. Cheers!

Adds a new menu item looking like this:
image

@tillcash
Copy link
Contributor

Hi @adaszko, I tried to run your pull request in Docker, but I'm getting the following errors:

2025/01/16 13:37:10 main.go:106: using db file /app/data/yarr.db
2025/01/16 13:37:10 storage.go:18: opening db with params: _journal=WAL&_sync=NORMAL&_busy_timeout=5000&cache=shared
2025/01/16 13:37:10 migration.go:35: db version is 0. migrating to 10
2025/01/16 13:37:10 migration.go:44: [migration:1] starting
2025/01/16 13:37:10 migration.go:60: [migration:1] done
2025/01/16 13:37:10 migration.go:44: [migration:2] starting
2025/01/16 13:37:10 migration.go:60: [migration:2] done
2025/01/16 13:37:10 migration.go:44: [migration:3] starting
2025/01/16 13:37:10 migration.go:74: [migration:3] failed to migrate
2025/01/16 13:37:10 main.go:133: Failed to initialise database: table new_feeds has 7 columns but 8 values were supplied

@adaszko
Copy link
Contributor Author

adaszko commented Jan 25, 2025

Hi @adaszko, I tried to run your pull request in Docker, but I'm getting the following errors:

2025/01/16 13:37:10 main.go:106: using db file /app/data/yarr.db
2025/01/16 13:37:10 storage.go:18: opening db with params: _journal=WAL&_sync=NORMAL&_busy_timeout=5000&cache=shared
2025/01/16 13:37:10 migration.go:35: db version is 0. migrating to 10
2025/01/16 13:37:10 migration.go:44: [migration:1] starting
2025/01/16 13:37:10 migration.go:60: [migration:1] done
2025/01/16 13:37:10 migration.go:44: [migration:2] starting
2025/01/16 13:37:10 migration.go:60: [migration:2] done
2025/01/16 13:37:10 migration.go:44: [migration:3] starting
2025/01/16 13:37:10 migration.go:74: [migration:3] failed to migrate
2025/01/16 13:37:10 main.go:133: Failed to initialise database: table new_feeds has 7 columns but 8 values were supplied

Hi. Try dropping new_feeds manually and rerun. From what I see, that new_feeds is a temporary table used only by one of the migrations. I think you interrupted that migration before completion at some point and that's the cause.

@tillcash
Copy link
Contributor

Hi, I tried again from a fresh database, but I'm still facing the same issue discussed above. However, if I start from an existing database, it works perfectly. Here are the logs when I tried starting with an existing db:

2025/01/30 16:43:49 main.go:106: using db file /app/data/yarr.db
2025/01/30 16:43:49 storage.go:18: opening db with params: _journal=WAL&_sync=NORMAL&_busy_timeout=5000&cache=shared
2025/01/30 16:43:49 migration.go:35: db version is 9. migrating to 10
2025/01/30 16:43:49 migration.go:44: [migration:10] starting
2025/01/30 16:43:49 migration.go:60: [migration:10] done
2025/01/30 16:43:49 main.go:153: starting server at http://0.0.0.0:7070

However:

  • It's not providing any logs in the console for changing the unreads expiration time for the feed, and I'm unsure if this function is being executed or scheduled.
  • The unreads expiration time value does not persist for the feed in the Yarr UI if I refresh the browser window.
  • It would be nice if you added unreads expiration time for the folder as well.

Kindly excuse my replies if they're not helpful. I'm just sharing my feedback, and I hope it may help you. Thanks!

@adaszko
Copy link
Contributor Author

adaszko commented Jan 30, 2025

All of those are fixable of course but I would need to know first if there's a will to merge the PR. I don't want to put in more time only for it to be eventually rejected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants