webui icon indicating copy to clipboard operation
webui copied to clipboard

Add all supported API Fields in Movie Add to List Dialog

Open evoblicec opened this issue 4 years ago • 1 comments

Motivation for changes:

When adding movie from WebUI you can only specify the title. API call currently support:

  • Movie title
  • Movie year
  • Movie Identifiers (IMDB_ID, TMDB_ID, etc.)

Adding year help accuracy for matching the correct movie Adding movie ID from IMDB or TMDB allow an exact match

Detailed changes:

  • Moved all the new properties to a new structure addEntryOptionalProps as they are optional
  • Updated EntryFields to support new needed fields
  • Iterate over the new addEntryOptionalProps in the Dialog
  • Check if the properties need to be in an array for the API Call

Addressed issues:

  • Move Movie Year field as an optional field as you recent with recent change you can not add a movie without a year because all entries are initialized to ''

To Do:

  • [ ] Update Tests
  • [ ] Review how Movie Identifiers are listed

evoblicec avatar May 09 '20 17:05 evoblicec

Codecov Report

Merging #110 into develop will increase coverage by 0.01%. The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #110      +/-   ##
===========================================
+ Coverage    90.72%   90.74%   +0.01%     
===========================================
  Files          128      128              
  Lines         2738     2743       +5     
  Branches       439      442       +3     
===========================================
+ Hits          2484     2489       +5     
  Misses         250      250              
  Partials         4        4              
Impacted Files Coverage Δ
src/plugins/lists/base/hooks/api.tsx 91.66% <ø> (ø)
src/plugins/lists/base/AddFab/AddEntryDialog.tsx 100.00% <100.00%> (ø)
src/plugins/lists/movies/hooks.tsx 93.33% <100.00%> (+0.22%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 6872238...7fe5f44. Read the comment docs.

codecov[bot] avatar May 09 '20 17:05 codecov[bot]