Git Product home page Git Product logo

kitsune's People

Contributors

drumber avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

marshmeadow

kitsune's Issues

Refresh access token on 401 response code

Currently, the access token is only refreshed shortly before it expires. However, the access token may expire before the expected time (e.g. after changing the password). This causes all API requests to fail with a 401 response code, rendering the app unusable (unless you re-login).

To fix this, the access token should be updated when a 401 response code is received.

App showing incorrect shows in library

Recently the app has been showing that I'm watching Castlevania season 2, however I finished it and have add it to my completed list... Here is how my watch list looks on the website, and you see it only once, Castlevania (season 3):

Selection_165

And here is how it looks in the app:

image

And as you can see here, it is in my completed section on Kitsu:

image

Here is my Kitsu profile, in case you need it for debugging: https://kitsu.io/users/Netsu

Make sure OAuth refresh token is first obtained

There is a race condition when the access token is being updated and at the same time other API calls are being made which result in 401 errors.

We should wait for the OAuth token call to finish before making any other API calls.

Captured logs:

AuthPreferences         io.github.drumber.kitsune  D  Parse and return access token stored as json.
AuthRepository          io.github.drumber.kitsune  D  Loaded stored access token.
AuthRepository          io.github.drumber.kitsune  D  Access token expires on 1693827852 (in seconds)
AuthRepository          io.github.drumber.kitsune  D  Refreshing access token...
okhttp.OkHttpClient     io.github.drumber.kitsune  I  --> POST https://kitsu.io/api/oauth/token (236-byte body)
okhttp.OkHttpClient     io.github.drumber.kitsune  I  <-- 200 https://kitsu.io/api/oauth/token (2560ms, unknown-length body)
okhttp.OkHttpClient     io.github.drumber.kitsune  I  --> GET https://kitsu.io/api/edge/anime?etc
AuthPreferences         io.github.drumber.kitsune  D  Converting access token to json and storing it in encrypted shared preferences.
okhttp.OkHttpClient     io.github.drumber.kitsune  I  <-- 401 https://kitsu.io/api/edge/anime?etc
MainFragmentViewModel   io.github.drumber.kitsune  E  Failed to load data.
							retrofit2.HttpException: HTTP 401 
							at retrofit2.KotlinExtensions$await$2$2.onResponse(KotlinExtensions.kt:53)
							at retrofit2.OkHttpCall$1.onResponse(OkHttpCall.java:161)
							at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)

Open Kitsu links in the app

I would like it when you can't find it and you use a browser to find it, it would be nice to open kitsu links in the browser to your app. If that's makes sense...

Allow to edit profile links

It should be possible to created, update and delete profile links.

Known Bug (fixed)

Steps to reproduce:

  1. add a profile link with an incorrect pattern (e.g. osu! with username instead of ID)
  2. add a profile link with a correct pattern (e.g. GitHub username)
  3. click on 'Update profile'.
  4. the update will fail with an error message: Failed to update profile link for osu!
  5. correct the osu! profile link and click on 'Update profile'
  6. the update will fail again, but this time with the error message: Failed to update profile link for GitHub

Possible cause:
If multiple profile links are created and they contain one (or more) profile links with an incorrect pattern, it is possible that a correct profile link was created on the server. However, since the entire process has failed, the profile links that were actually created are still treated as new profile links. This will cause subsequent API calls to also fail as we are trying to POST a new profile link that still exists on the server.

Possible fixes:

  1. rollback all successful operations if an operation fails.
    or
  2. note successful operations (update the list of initial profile links)

Allow editing Kitsu profile

Allow to edit personal Kitsu profile, such as About me information (location, gender, bio, etc) and profile picture and banner.

  • #23
  • #21
  • #33
  • Display profile links on the profile page

Movies are not set to finished

When progressing a library entry with only one episode (e.g. movies) the status of the library entry is set to 'current'. It should be set to 'finished' instead.

Library Updates Not Syncing

Any library updates made in the app are not syncing back to Kitsu.

09-30 23:08:33.973 3711 3778 D LibraryManager: Synchronizing 1 offline modifications...
09-30 23:08:34.222 3711 3778 E LibraryManager: Failed to synchronize library entry 96423765
09-30 23:08:34.222 3711 3778 E LibraryManager: retrofit2.HttpException: HTTP 400

Search broke?

Some titles won't show up even when I search the exact titles...

Improve UX in filter facet fragment

  1. When using the sliders (e.g. release year) the filter gets updated while still touching the slider. This could cause the layout (and therefore the slider) to shift up (or down).
    The filter should be set only once when the slider loses focus.

  2. The filter values of sliders should be cleared when the sliders are in the default position. Currently it's only possible to reset the sliders with the "Clear all" button.

Home Screen Widget

It would be nice to have widgets for the homescreen to quickly update library entries
I imagined something like this (sorry for the low quality, i've made it quickly with ms paint)
image

Discord?

Do you have a discord, or can there be a discord for this project?

Refactor domain classes

  • API, UI and DB classes should be separated
  • Library entry modifications should be stored in the DB and deleted after changes were send to the Kitsu API. This should give the user an instant feedback when changes are made.

Updated data of library entries is not shown while searching

Steps to reproduce

  1. Go to the library page
  2. Search for an library entry
  3. Update the library entry (e.g. change progress)
  4. Issue: Updated library data (e.g progress) is not shown
  5. Close the search an the updated library data is visible

Issue cause

Normally, the local database (Room) is the single data source of truth. When making changes to the library, the local database gets updated and the change gets shown in the UI. (Handled using a RemoteMediator)
When searching the library, the data source is changed directly to the PagingSource and the local database is ignored:

/**
* If the search query is blank, request the remote mediator for data
* otherwise search the library online.
*/
private fun handleLibraryEntriesDataSource(filter: LibraryEntryFilter): Flow<PagingData<LibraryEntry>> {
return if (filter.isFilteredBySearchQuery()) {
libraryEntriesRepository.searchLibraryEntries(
Kitsu.DEFAULT_PAGE_SIZE_LIBRARY,
filter.buildFilter()
)
} else {
libraryEntriesRepository.libraryEntries(Kitsu.DEFAULT_PAGE_SIZE_LIBRARY, filter)
}
}

Possible fix

  1. After a library entry was successfully updated, send a new search request to the API to get the updated data.

or

  1. Add a new database table that represents the current UI state, to keep the single source of truth. When performing a library search, the data is put in the database and then shown in the UI.

Library Filter Multiple Selection

I think I found a bug:
I can select multiple status as a filter for a media in the library; when I select multiple filters, it shows all the entries as no filter was applied

Screenshot_20221007-125234~01.jpg

Copy Anime.. Name?

It would be nice to be able to tap or hold the animes name to copy it please..

Include local library modifications in Details and EditEntry fragments

Locally stored library modifications are not considered when displaying the library status in the DetailsFragment and as well all other values in EditEntryFragment.

This can be confusing for the user since the LibraryFragment shows library entries including local/offline changes.

It should be considered to have EditEntryFragment not save failed library updates locally by default, but display a dialog with the option to discard or store library modifications.

Task list

  • DetailsFragment includes local library modifications
  • EditEntryFragment includes local library modifications
  • EditEntryFragment shows dialog on push failure with the option to discard or store changes locally

Character Details

Show character details when clicking on a character and allow to add the character to the favorites.

Add Average User Rating to TV/Movie pages

could it be possible to display some sort of an "average user rating" on each anime's page? There already exists the "Ratings" section on the bottom of every page but even with that its a bit hard to really assess user's reception on a particular anime.

since the data for user ratings is already there, i imagine it shouldn't be too hard to implement

Separate API and UI models

Do not use the same model classes for the UI and Kitsu API. The API classes should not depend on any unnecessary classes, interfaces or annotations since these dependencies may change and introduce new side-effects (see issue #19).

Feature Requests

I have a list of a few features that are missing or would be nice to have in the app:

  • Allow us to set the default tab the app opens up in (ie. I would like mine to open in the Library tab)
  • Only update read/watch after a few seconds, currently whenever you update the current chapter/episode you're on you have to wait for it to update first before you can tap again, if you're someone like me who reads 10-20 chapters in one sitting, then updating one by one is very slow, so maybe wait 2-5 seconds after the last tap before saving the data?
  • Allow 10 star reviews, currently when you review an anime/manga, you can only rate it out of 5, I would like to rate mine out of 10 (like how I do it on the Kitsu website)
  • Split library between Mangas and Animes, so maybe have a tab that only has manga, and a tab that only has the anime you're watching

Other than these few things, I think the app is really awesome, and already way better then the official app! :)

SearchView in library fragment is not shown

The SearchView in the library fragment is closed although the library is in search state.

Steps to reproduce:

  • search for a library entry
  • long click on an entry to open the editing dialog fragment
  • update the library entry (e.g. start rewatch)
  • the editing fragment dialog gets closed
  • library entries are still filtered by the search query, but the SearchView is not shown

Library list is not scrolled to the top

Steps:

  • possible occurs only on clean app install
  • log in to Kitsu
  • go to Library page
  • if the user already has a few library entries, the list is scrolled somewhere in the middle

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.