barbequesauce / Watcher3

Fork of nosmokingbandit/Watcher3 as the original seems inactive. PRs welcome, support is community based.
Other
69 stars 19 forks source link

Import from local directory recursively is not working #153

Open cautiouscoyote opened 4 years ago

cautiouscoyote commented 4 years ago

Describe the bug Importing multiple movies, each in its own subdirectory, from a parent directory, with the "scan recursively" option enabled, results in the message "No new movies found.". The log however does report parsing results on each movie available; thus read permissions are OK. Also, importing each movie from its own subdirectory directly, works flawlessly; thus again, read permissions are OK.

To Reproduce Steps to reproduce the behavior:

  1. From the webUI, go to 'Library > Import > Directory'.
  2. Browse to the actual directory that holds the movies - each in its own subdir.
  3. Make sure the "scan recursively" tick-box is enabled.
  4. Hit "Scan directory".
  5. Behold: "No new movies found."

Expected behavior Expected to be presented with a list of all movies found in the directory, awaiting confirmation from the user to add to the database.

Log output A snippet from the logs (note that in this test environment the movie directory contains indeed just two movies):

[...] INFO [2020-05-03 17:04:23,698] core.library.convert_to_db.590: Converting movie metadata to database structure for AlphaGo. INFO [2020-05-03 17:04:23,698] core.ajax.scan_library_directory.699: All data found for import AlphaGo WARNING [2020-05-03 17:04:23,697] core.movieinfo._search_tmdbid.176: TMDB returned imdbid as tt6700846 INFO [2020-05-03 17:04:23,650] core.movieinfo._search_tmdbid.163: Searching TMDB https://api.themoviedb.org/3/movie/455008?language=en-US&append_to_response=alternative_titles,external_ids,release_dates INFO [2020-05-03 17:04:23,650] core.movieinfo._search_tmdbid.159: Searching TheMovieDB for TMDB ID: 455008. INFO [2020-05-03 17:04:23,471] core.movieinfo._search_title.103: Searching TMDB https://api.themoviedb.org/3/search/movie?page=1&include_adult=false&query=alphago&year=2017 INFO [2020-05-03 17:04:23,471] core.movieinfo._search_title.92: Searching TheMovieDB for title: AlphaGo 2017. INFO [2020-05-03 17:04:23,471] core.movieinfo.search.60: Searching TheMovieDB for AlphaGo 2017 INFO [2020-05-03 17:04:23,440] core.library.parse_media.467: Parsing codec data from file /tank/mediamovies/AlphaGo(2017)/AlphaGo_(2017).mkv. INFO [2020-05-03 17:04:23,440] core.library.parse_filename.534: Found {'year': 2017, 'container': 'mkv', 'title': 'AlphaGo'} in file name. INFO [2020-05-03 17:04:23,437] core.library.parsefilename.521: Parsing directory name for movie information: AlphaGo(2017). INFO [2020-05-03 17:04:23,437] core.library.from_file.396: Gathering metadata for /tank/mediamovies/AlphaGo(2017)/AlphaGo_(2017).mkv. INFO [2020-05-03 17:04:23,437] core.ajax.scan_library_directory.682: Gathering metatadata for /tank/mediamovies/AlphaGo(2017)/AlphaGo_(2017).mkv INFO [2020-05-03 17:04:23,433] core.library.convert_to_db.590: Converting movie metadata to database structure for Anaconda. INFO [2020-05-03 17:04:23,432] core.ajax.scan_library_directory.699: All data found for import Anaconda WARNING [2020-05-03 17:04:23,432] core.movieinfo._search_tmdbid.176: TMDB returned imdbid as tt0118615 INFO [2020-05-03 17:04:23,373] core.movieinfo._search_tmdbid.163: Searching TMDB https://api.themoviedb.org/3/movie/9360?language=en-US&append_to_response=alternative_titles,external_ids,release_dates INFO [2020-05-03 17:04:23,373] core.movieinfo._search_tmdbid.159: Searching TheMovieDB for TMDB ID: 9360. INFO [2020-05-03 17:04:22,804] core.movieinfo._search_title.103: Searching TMDB https://api.themoviedb.org/3/search/movie?page=1&include_adult=false&query=anaconda&year=1997 INFO [2020-05-03 17:04:22,804] core.movieinfo._search_title.92: Searching TheMovieDB for title: Anaconda 1997. INFO [2020-05-03 17:04:22,804] core.movieinfo.search.60: Searching TheMovieDB for Anaconda 1997 INFO [2020-05-03 17:04:22,783] core.library.parse_media.467: Parsing codec data from file /tank/mediamovies/Anaconda(1997)/Anaconda_(1997).avi. INFO [2020-05-03 17:04:22,783] core.library.parse_filename.534: Found {'year': 1997, 'container': 'avi', 'title': 'Anaconda'} in file name. INFO [2020-05-03 17:04:22,778] core.library.parsefilename.521: Parsing directory name for movie information: Anaconda(1997). INFO [2020-05-03 17:04:22,778] core.library.from_file.396: Gathering metadata for /tank/mediamovies/Anaconda(1997)/Anaconda_(1997).avi. INFO [2020-05-03 17:04:22,778] core.ajax.scan_library_directory.682: Gathering metatadata for /tank/mediamovies/Anaconda(1997)/Anaconda_(1997).avi INFO [2020-05-03 17:04:22,778] core.ajax.scan_library_directory.680: Parsing 2 directory scan results. INFO [2020-05-03 17:04:22,765] core.library.scan_dir.35: Scanning /tank/media_movies for movies. [...]

dgiffen commented 3 years ago

I have run into this bug also. Here is what I did to resolve it. Make a temp folder and move a movie into that. Change the scan directory to the new folder. It should scan then. Watcher sometimes quits after one or two movies also. It doesn't like nested folders either. Like /James Bond/James Bond Movies/a bunch of movies. It will pick the first one and has actually deleted the others. So use copy here, so if things go wrong you can try again. I think it has something to do with the file creation times, but I am not sure on that. You can then change back to your original folder after you have processed your movies. I have had it correctly do 4 or 5 at a time, but other times it would process one and quit.