Closed GreatTeacherOni closed 5 months ago
Ok, seems like a useful feature.
Thank you for the implementation! I just tested the feature and found a little thing that should probably be added/changed.
When I got more than 1 instance of anipy-cli open I can run into following issue:
Step 1:
$\textcolor{green}{\textsf{-----------------------------}}$
On anipy-cli instance A:
Add an anime+episode to seasonals via pressing t
.
That means it gets added to the LocalList of A (LocalList of A is in state 1) and the LocalList of A gets copied to the seasonal_list
.
seasonal_list
now contains the exact content of LocalList A.
$\textcolor{green}{\textsf{-----------------------------}}$
Step 2:
$\textcolor{blue}{\textsf{-----------------------------}}$
On anipy-cli instance B:
Add an anime+episode to seasonals via pressing t
.
That means it gets added to the LocalList of B (LocalList of B is in state 1) and the LocalList of B gets copied to the seasonal_list
practically overwriting the changes (previously added or deleted anime episodes by A) made by LocalList A.
seasonal_list
now contains the exact content of LocalList B (and no more content of LocalList A).
$\textcolor{blue}{\textsf{-----------------------------}}$
Step 3:
$\textcolor{green}{\textsf{-----------------------------}}$
On anipy-cli instance A:
Now add or remove an anime+episode to seasonal via pressing t
. That means it gets added to the LocalList of A
In short:
LocalList of A in state 1 -> LocalList of A in state 2 -> state 2 gets copied to seasonal_list
overwriting older changes which get lost
seasonal_list
now contains the exact content of LocalList A.
$\textcolor{green}{\textsf{-----------------------------}}$
seasonal_list
overwriting all the previous changes made by other instances of anipy-cli.Possible Solution 1:
When adding or deleting anime episodes:
Before copying LocalList to seasonal_list
first update LocalList with the content changes (delta) of seasonal_list
(essentially just copy seasonal_list
to LocalList, overwriting LocalList)
Possible Solution 2:
Keep LocalList independent to each instance of anipy-cli and implement a manual "[u] Update list" feature.
Important in Solution 2: Do not automatically update seasonal_list
with LocalList since that would produce the explained issue (check TLDR) and do not copy seasonal_list
to LocalList since neither list is the single source of truth
Alright, so the fix would basically be: read the file again before writing. Ok noted, thanks. Could you maybe open a different issue for this? Just copy the contents of your message, thats fine.
Will close this now as the "add to seasonals" seems to be working.
Describe the the new feature While playing an episode (except when already using -S mode) there should be a direct way to add the current episode to seasonals via e.g.
[as] Add anime to seasonals
What problem are you trying to solve? This way it is also possible to directly add an anime to seasonals without having to start in Seasonal Mode first. QoL improvement.
Do you have any ideas for implementation? Add following implementation to the main menu (except when already inside Seasonal Mode which already has
[a] Add Anime
):[as] Add anime to seasonals