z411 / trackma

Open multi-site list manager for Unix-like systems. (ex-wMAL)
https://z411.github.io/trackma
GNU General Public License v3.0
761 stars 82 forks source link

`undoall` does not undo changes in the local list #681

Open FichteFoll opened 1 year ago

FichteFoll commented 1 year ago
FichteFoll [anilist] (anime) watching >> update 6
Engine: Updating show BLUELOCK to episode 24...
[D] Data: Saving queue...
[D] Data: Saving cache...
Data: Queued update for BLUELOCK
[D] Data: Queued: my_progress -> 24
Engine: Updating show BLUELOCK status to Completed...
[D] Data: Saving queue...
[D] Data: Saving cache...
Data: Queued update for BLUELOCK
[D] Data: Queued: my_status -> COMPLETED
[D] Data: Saving queue...
[D] Data: Saving cache...
Data: Queued update for BLUELOCK
[D] Data: Queued: my_finish_date -> 2023-03-27
FichteFoll [anilist] (anime) watching >> undoall
[D] Data: Saving queue...
Data: Cleared queue.
FichteFoll [anilist] (anime) watching >> update 6
Engine: Updating show BOFURI: I Don't Want to Get Hurt, so I'll Max Out My Defense. Season 2 to episode 8...
[D] Data: Queued: my_progress -> 8
FichteFoll [anilist] (anime) watching >> search blue
| Index  Title                                                                                                                          Progress  Score  |
0 results
FichteFoll commented 1 year ago

This actually extends to all operations performed to the local list, including adding or removing a show and updating a show's score or progress. While the update from the queue is cancelled, the update to the local list is not undone, causing the local and the remote list to be out of sync until it is retrieved.

z411 commented 10 months ago

This is probably bad naming from my part. undoall is supposed to clear the queue, not undo all changes in the local list because Trackma does not keep a history of changes. What actually undoes all changes in your local list is retrieve, which re-downloads the list ovewriting any changes. Maybe a change in command names is needed.

FichteFoll commented 10 months ago

Seeing how there is a viewqueue command, undoall should probably be renamed to clearqueue then. (retrieve is fine as-is.)