Git Product home page Git Product logo

pingpoltergeist / hera Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 2.0 2.28 MB

HERA is a home media server used to organize your collection of movies and tv shows. You add the location of your library and Hera organizes your content automatically and makes them available to everyone in your network

License: MIT License

Python 44.65% JavaScript 36.75% SCSS 18.60%
home-media-server media media-server mediaserver netflix nextjs python3 scss server streaming

hera's People

Contributors

pingarnab avatar pingsubhajit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

hera's Issues

Database entry is not being removed even if the actual file is deleted

Description

If a media file is synced into the Hera database it stays there and the entry does not get removed even if the actual file from the folder has been deleted. This leads to a false entry which ultimately crashes the application with a 404 error while playing the video.

Steps to reproduce

  1. Create a video file in a Hera Library folder
  2. Sync that video file so that it's entry is made in the database
  3. Delete the file from the folder
  4. Notice that in the database the entry still exists with a file path that's no longer valid

Change of TMDB ID is causing duplication

Description

If the TMDB ID of a media file is changed using the provide API, it works as expected. But after a subsequent sync, the former detection comes back causing a duplication. For an example if "b.mp4" is detected as "a" and it is changed to "b", after another sync, the "b" remains but the "a" comes back consisting the same media file "b.mp4".

API in question

POST: http://127.0.0.1:5202/api/v1/change-tmdb-id/movie/582306/
GET: http://127.0.0.1:5202/api/v1/sys/sync

@pingArnab

TV shows are not syncing

Description

The TV shows are not being synced when the sync API is called when there's a 'last-sync-date' already present in the database. This is probably due to the modified date of a folder doesn't change when a file is modified inside a folder which is in the particular folder.

API in question

http://127.0.0.1:5202/api/v1/sys/sync

Steps to reproduce

  1. Add a TV show folder and call the sync API (at least a TV show with multiple episodes should be present)
  2. Modify a single episode from the TV show
  3. Call the sync API again

Tag

tv-show-sync

Error response for invalid token seems inconsistent with the project structure

Description

Whenever the backend returns an error message, according to the structure of the project is supposed to return a JSON response containig an "error" key with the value of the error message. Same happens even when authentication token is not provided with a request but when the provided token is invalid the server seems to respond with a weird response. If it can be modified according to the pre-mentioned structure i.e. an "error" key with the value of the error message, the error can be easily caught in the frontend and displayed to the user.

API in Question

{{ Any API requiring authentication to access }}

Steps to reproduce

  1. Send an invalid authentication token with an API request
  2. Observer the response from the server

Current Output

{
    "detail": "Given token not valid for any token type",
    "code": "token_not_valid",
    "messages": [
        {
            "token_class": "AccessToken",
            "token_type": "access",
            "message": "Token is invalid or expired"
        }
    ]
}

Desired Output

{
    "error": "Given token not valid for any token type"
}

Last watching value is not present in random TV show API response

Description

In light of issue #5 a new last_watching object was being provided which contained the last watching episode ID and the season it belonged to. The object was being provided in a single TV show API but the same needs to be provided with the random TV show API as well.

API in Question

http://127.0.0.1:5202/api/v1/random-media/tv

Desired Output

{
    ...,

    "last_watching": {
        "season_no": 5,
        "episode_tmdb_id": 2397417
    },

    ...,
}

The current season to be sent with a single TV show API

Description

When a user watches a particular TV show episode from a particular season, next time the user visits the TV show page, the selected season gets reset to it's initial available value. That was done on purpose by design but in this scenario it creates a pitfall in user experience. To address this issue, instead of moving towards Redux and making things clunky, i request that a current season should be sent along with the single TV show API which defaults to the initial available season.

API in question

http://127.0.0.1:5202/api/v1/tv/27205

Search query null returns all available data

Description

The search API of Hera accepts a GET request with a query parameter. If the parameter is not given, the backend crashes and throws an error NoneType' object has no attribute 'split. And if the query parameter is null the backend sends all the available data which if happens accidentally may increase unnecessary data loading. My concern is that is it something to worry about or it should be just the way it is? @pingPoltergeist/team-hera

API in Question

GET http://127.0.0.1:5202/api/v1/search

Inconsistent alert messages throughout the project

Description

There are multiple types of error that can occur while working with Hera and most of the time the methods just doesn't work without any clue of what happened. Most of the time there's a log in the console but no alert in the actual UI. It would be better if a alert notification could be popped up whenever an error occurs so that the user knows exactly what happened.

Possible fix

There's a toast notification method in the Material UI library that we are using. The easiest and the apparently most feasible way to implement this feature is to call the method and raise a notification toast containing the error message instead of logging it to the console.

A new type field with each search result

Description

The search API returns movies and TV shows all together and the frontend has no idea wheather each result is a movie or a TV show. It would be nice if a type field could be sent along with each result that contains the type of that particular result.

For movie it should be "type": "movie"
For TV show it should be "type": "tv"

API in Question

http://127.0.0.1:5202/api/v1/search?q={{ query }}

Some forms submit even with no input

Description

There are numerous forms in the application. Most of them has a required input field without which the forms should not be submitted. But apparently the forms that are in the modal lets users click on the submit button and initiates submission logic even if the input field(s) are blank. The required property in the JSX doesn't seem to work in that case. Further enhancement is required in this regard.

Forms in question

There are three forms where this issue has been noticed

  1. Sign in form
  2. Change TMDB ID form
  3. Create an user form

Selected season for a TV show resets each time

Description

On a particular TV show page, there's a drop-down menu for selecting the current season. The selected season get reset every time a user changes the page or refreshes the browser and defaults to initial season. This create inconvenience for the users and it would be nice if it can be fixed.

Possible fix

Apparently there are two ways to fix the problem as described below

  1. If a global state can be managed using Redux to store the selected season for each TV show.
  2. Or if backend provides a last watched season for a TV show along with the single TV show API then Redux will be no longer needed.

**I recommend going with the second possible fix**

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.