moz667 / homodaba

Aplicación django para gestionar/clasificar los videos de bpk
GNU General Public License v3.0
3 stars 3 forks source link

Películas que no existen en el IMDB #9

Closed bpk667 closed 3 years ago

bpk667 commented 3 years ago

Haberlas haylas. Principalmente cortos hechos por aficionados o pelis que he debido escribir mal y no tengo ni idea de qué son. De momento son sólo 5, con lo que no podría importar menos :)

bpk667 commented 3 years ago

Latest version (0e898ed72df4765b09d08492e7d467e785ca1b7e) supports Non-IMDB movies.

import-csv.sh will fail importing the movie unless the movie is defined as not_an_imdb_movie. If this field is set to 'true' in the CSV file, import will not look for the IMDB entry and will accept the information provided by the CSV entry.

The easy way of doing it would be:

  1. Import CSV file as usual.
  2. Check generated file fail-[DATE].csv.
  3. Add an entry to the json patch file (--patchedfilms parameter in bashline) for each movie that doesn't exist in IMDB.
  4. Run basheline so it patches the CSV file with the new json registry.
  5. Import CSV again.

E.g.: CSV file entry before patching: HDD-Pelis-009;PEPLUM. una tragedia griega;;Enrique Dueñas;2018;;MKV;/media/bpk/HDD-Pelis-009/HD/Shorts/PEPLUM. una tragedia griega (Enrique Dueñas, 2018).mkv;hard-drive;;;Shorts;

JSON patch file entry: {"search": {"title": "PEPLUM. una tragedia griega", "year": "2018"}, "replace": {"not_an_imdb_movie": "True"}},

CSV file entry after patching: HDD-Pelis-009;PEPLUM. una tragedia griega;;Enrique Dueñas;2018;;MKV;/media/bpk/HDD-Pelis-009/HD/Shorts/PEPLUM. una tragedia griega (Enrique Dueñas, 2018).mkv;hard-drive;;;Shorts;True

Of course, you can just add 'True' at the end of the CSV registry, but the change would be overwritten the next time you generate the CSV file.