-
Notifications
You must be signed in to change notification settings - Fork 83
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
Updated anki-sync-server to work with the latest version of Anki #20
Updated anki-sync-server to work with the latest version of Anki #20
Conversation
This commit applies the fix from https://github.com/tsudoko/anki-sync-server/pull/60/files However it using a shorter version by utilizing the params attribute of the webob request. The params attribute combines the get and post params
This method was removed in a2b7a3084131f747fb476cc8a24f96a00c654859
If I try to run the example unchunker as given in the Readme using nginx, I'm not able to run the ankisyncd server at the same time via Which seems reasonable to me as an error. Of course this could be a result of my incompetence with nginx, I'm rather new to it. Does Would it be possible to update the documentation to further clarify this area for an easier implementation? (I'm already quite grateful for the example nginx config at all). My guess is that other's who will try to to implement this workaround will have similar issues if they're not too familiar with nginx. I apologize if this is the wrong place for a comment like this, but I didn't feel like it's appropriate to raise an issue on this project and the issues feature seems to be disabled on your personal fork. |
c5075a9
to
d3456a2
Compare
HI @AlexBocken, thank you for your input.
Your comment is suited perfectly fine here as it describes a problem introduced by this pull request 😄 During development I have used docker and both services (ankisyncd and Nginx) ran on different containers. Therefore they could both listen at same port (inside their respective containers). As you have already found out, this is not possible when both services run on your local machine. I have updated the README file and further clarified how Nginx should be configured when both services run on the same machine. |
Thanks for the clarifications! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mate this is great work. It's all looks good to me. Thanks for all your hard work. A few quick changes and this PR should be ready to be merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is some code that looks like it is no longer needed. AFAICT, for example, there is no longer any particular use for the runHook
s. The sync
method is also, unless I'm mistaken, client-side code. As we now have to maintain this, it is very important not to have dead code that will just confuse future contributors. Can you give the file a clean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you deleting code you added in 59603b8 ? If so, can you combine the commits instead? If not, I'm lost, could you explain? :-)
Thanks again for the great work @kalehmann ! Apart from a couple of minor issues it looks great. I know it's sometimes hard and a little annoying but maybe next time maybe try and have several smaller PRs to avoid changing the same parts of the code in several commits of the PR. |
You were right, the
I have removed any code related to these two points. But I still believe, that there is more unused code in this project. However I think that finding and removing these lines would better suite another PR. |
This prevents the missing collation unicase error on the client
The dirty field does not exist in the media table anymore.
That way we make sure, our ServerMediaManager is used instead of the MediaManager
These hooks were only used on the client.
5de429f
to
f510050
Compare
Yes, it seems like Anki desktop only accepts the downgraded database, therefore I reverted these changes. Anyways, I squashed these two commits |
Yeah I know 🤔 The problem is just, that when I started working on this PR I didn't even know how big it would get. I believe splitting it into smaller changes requires a profound evaluation of all necessary changes beforehand - which I was unable to do because I knew nothing about this project. |
That's interesting, I didn't follow that up for |
Oh, how many times I would have liked to have got away with that at my last company... :-). The way I am managing this for importing upstream code to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. There is a lot of cleanup to be done but there was before so let's get this merged and move forward from there.
This PR tackles the following issues: #13, #14, #16 and #19.
pip install anki
.I tested these changes with the latest master of AnkiDroid and Anki 2.1.28. I have found no issues while syncing between these two.
Required steps before merging