Hummingbird v1

फ़्री
द्वारा vikhyat | अपडेट किया गया a month ago | Entertainment
लोकप्रियता

7 / 10

लेटेंसी

61ms

सेवा का स्तर

100%

Health Check

N/A

सभी चर्चाओं पर वापस जाएं

Change status to currently-watching

Rapid account: Wietsedev
wietsedev
10 years ago

This afternoon I tried to implement changing the library status of an anime in my app but it didn’t work. After wasting a lot of time I discovered that I didn’t do anything wrong but the API does. When I try to change the status to currently-watching it goes to completed. (I was desperately trying to change an anime from completed to currently-watching…) All other statuses do work properly. (Correct me if I’m wrong)

Rapid account: Inket
inket Commented 10 years ago

The server-side code is probably

...
self.status = new_data['status']
self.episodes_watched = new_data['episodes_watched']
...
if (self.status == 'currently-watching' && self.episodes_watched == self.episode_count)
    self.status = 'completed'

which makes total sense, but simply doesn’t take into account all scenarios.

Rapid account: Wietsedev
wietsedev Commented 10 years ago

Whoops. I think that’s it. I’m sorry.

Rapid account: Wietsedev
wietsedev Commented 10 years ago

But why is it only doing this when I want to change it to Currently Watching and not with the other statuses? (For some reason I cannot edit my previous comment)

Rapid account: Inket
inket Commented 10 years ago

The status is automatically set to “Completed” if episodes_watched == episode_count. Maybe that’s the reason.

चर्चा में शामिल हों - नीचे टिप्पणी जोड़ें:

नई टिप्पणियाँ पोस्ट करने के लिए लॉग इन / साइनअप करें