MALSync icon indicating copy to clipboard operation
MALSync copied to clipboard

Ranobelib sync

Open DFreezerR opened this issue 1 year ago • 0 comments

Part of #2061 [3/5] RanobeLib - LN + WN website. Did almost everything based on #2624 Includes api.ts file from #2606 Had to modify internal files a bit to allow search + correction search work with SHIKI sync mode and novel types. Because as it is, there's no way to search novels on SHIKI sync mode. To do it, shikimori have a separate page /ranobes while other providers use /manga page to track both manga and novels. To mess as less as I could with internals I used options parameter in searchInterface and passed it down from src/_provider/Search/vueSearchClass.ts with the novel type check to determine if the page in novel type. I "could've" add another page type in pageInterface but that would've meant I will need to change types almost everywhere, and to reduce changes I used already existed options and this.type in src/_provider/Search/searchClass.ts and passed it down to search function. Moreover the only provider that uses this check is shikimori so there's no need to change every search function. Additionally changed how src/_provider/Search/searchClass.ts works a bit since to search for novel more precisely you need to include both 'novels' and 'light novels' + added filter to search only for either of them.

As I tested, there are not much novels on either providers, and you WILL encounter situation where you either have to specify novel by correction search or to use local sync. Or you can add your novel on MAL yourself (or on any other provider). To me, the probability of novel existing was around 60%, so -

If you gonna use it, always check if novel was set correctly in either MAL-Sync uiSelector on overview page or using float button in bottom right

Also,

Like the other PRs(#2606 + #2624) this one takes access tokens from authorized user to make API calls. I guess there "might" be security problems if someone tries something bad this way. And if this breaches this projects ethical or security conducts, please tell. Just keeping everyone informed just in case.

DFreezerR avatar Oct 07 '24 16:10 DFreezerR