Closed AlexPerathoner closed 2 months ago
Hi @AlexPerathoner, thank you for opening this issue and thanks for offering to work on it, that would be great!
If it's just a generic csv file exported from TodoMovies, then you could likely copy some of the code used for other importing methods and change it around to work with the specific csv format from TodoMovies.
For importing files, the current process is goes like so: drop file into watcharr, the client parses it and displays the content in a table, then the user starts the import and a generic import route is called for each show/movie with the relevant data to complete the import.
This rough guide should help you get started:
ImportedList[]
type (adds to rList variable) in import/process/+page.svelte.Hopefully that helps you out and it goes smoothly. You should be able to just copy one of the functions in those files and change them around for this app.
Let me know if you have any questions! Thanks!
Oh and p.s. the package papaparse
for parsing csv is already a dependency for the client, so you could use that straight away: https://www.papaparse.com/docs (theres existing function calls that parse csv in those import files too if you want to copy them over)
Thanks, much more detailed instructions that I could've hoped for. How did you create the svg icons? Did you generate them with a particular tool or did you do it by hand?
Some updates:
.csv
is missing some info, which a custom backup file (.todomovieslist
, but it's really just a json so it shouldn't be a problem) has: the date it was added, and also custom lists it has been added to. If it's okay I'd switch to using that backup file instead of the csv, and parse the custom lists into tags.tmdbID
is already present, so I guess it doesn't make any difference if it's set or not(?)... since movies in both status FINISHED
and PLANNED
can be added, should I also add a dropdown that shows that? Is some issues for that perhaps already in progress?Hey @AlexPerathoner thanks for the updates:
I've been using TodoMovies (https://todomovies.app/) to track my watch list and wanted to switch to Watcharr. I've noticed that there isn't an option for importing the csv exported by such app and I'm willing to look into implementing it myself.
I've noticed in CONTRIBUTING you suggest discussing PRs first, so here we are: is this something you'd be happy to find added? Anything I should pay attention to?
Related to #429