Jump to content

[Fixed] Library scan not detecting movies


Zero00
Go to solution Solved by Zero00,

Recommended Posts

  • Solution

Hello this topic might look like a duplicate of other topics with similar names but the cause was totally different. I managed to resolve this issue so I'm sharing my experience to help if someone had the same issue.

I searched other similar topics but their setups and root causes where different, for example:

  • folder permissions 
  • using shared folders for libraries 
  • disk issues
  • tinkering with config files

Before explaining here is my setup:

Software:

  • Windows 8.1 Build 9600 x64 (I know its old this is just a temporary server)
  • Emby version 4.5.4.0
  • Sonarr and Radarr for media grabbing and organization

Media Files location:

The media files are local files and and the libraries root folders are symbolic links:

C:\Media\Movies			> symbolic link to F:\Videos\Movies
  \Movie title (year)
    \Movie Title (year) - EDITION - Quality.mkv
    \Movie Title (year) - EDITION - Quality.nfo    (nfo file generated by radarr)
    \Movie Title (year) - EDITION - Quality.en.srt
    \Extras	(optional)
      Extra.mkv

 

I began to notice the issue when I added 2 new movies and they didn't show up in the library and I tried the following:

  • checking the movie folder and files if the path and naming convention were correct.
  • checking file and folder permissions 
  • checking if the files were corrupted 
  • enabled debugging and traced the logs after each scan (I'm a system admin so I have a background in troubleshooting software and reading logs)
  • moving the new movie into another library (it was detected in the other library, so I though something was wrong with the movies folder)
  • added the direct movies folder to the library without the symbolic link ( but it wasn't detected)
  • moved all movies to another folder then added it to the movies library (but it wasn't detected, so I thought the library might be corrupted)
  • Deleted the library and created it again ( very bad idea, now all the movies were not detected not just the 2 new movies)
  • added the whole movies folder to another library ( but it wasn't detected)
  • moved some movies to another library (they were detected)
  • gave up and decided to just merge both library and move all movies to that library (but they weren't detected)
  • the logs didn't show any warnings or errors during scan
  • since some movies worked but all movies didn't ,I thought it has something to do with recent changes
  • traced my actions in the past few days, I changed the naming convention for TV shows to include year in folder name. the change was in a totally different library and folder. then I remembered that one of the movies had a symbolic link to a TV show because it also counted as an extras for the movie.
  • and this is the moment when you finally find the root cause it was a broken link inside the movie folder:
    C:\Media\Movies\Movie title (year)\Extras\ > C:\Media\TV Shows\Show name

    while the real path was:

    C:\Media\Movies\Movie title (year)\Extras\ > C:\Media\TV Shows\Show name (year)

    after deleting the broken link the library started working normally 

 

 

TL:DR: There was a broken symbolic Link inside the library that caused the whole library to Fail at scanning new files.

embyserver-63747082278.txt

Edited by Zero00
Link to comment
Share on other sites

Hello Zero00,

Please wait for someone from staff support or our members to reply to you.

It's recommended to provide more info, as it explain in this thread:

Thank you.

Emby Team

Link to comment
Share on other sites

Hi, So a question I have.

Did this messed up symbolic link stop Emby from scanning all files so you had many things not scanned in or just this one movie?

Any idea how you created a bad symbolic link?

Link to comment
Share on other sites

Just now, cayars said:

Did this messed up symbolic link stop Emby from scanning all files so you had many things not scanned in or just this one movie?

The messed up symbolic link stopped the whole library from scanning but other libraries were fine.

2 minutes ago, cayars said:

Any idea how you created a bad symbolic link?

The Target folder for that symbolic link was renamed when I was organizing via sonarr.

Link to comment
Share on other sites

OK thank you.  I'll see if I can reproduce  and document steps for the devs so they can fix this.

Link to comment
Share on other sites

Thanks for the investigation. Given the lack of errors produced by the library scan this looks like an issue in the file system layer of the .net core runtime. We'll be updating to the new .net core 5.0 release in the near future and we'll see if that might help with this.

  • Like 1
Link to comment
Share on other sites

3 minutes ago, Luke said:

Thanks for the investigation. Given the lack of errors produced by the library scan this looks like an issue in the file system layer of the .net core runtime. We'll be updating to the new .net core 5.0 release in the near future and we'll see if that might help with this.

I can reproduce this Luke so after updating to net core 5.0 I can retest.

Link to comment
Share on other sites

  • 2 weeks later...
schmittty

I concur with the OP, I had one folder with a movie and subtitle in it with corrupt permissions. I only recognized it when I was looking at the permissions of the media folder and all of its subs. My permission scan would fail on this one folder every time. Once that folder and it's contents were removed (creatively) the scan succeeded on the movie library.

I got lucky because of this post (thanks cayars), and knowing what I had recently added and when it started happening. It would be nice to see some error handling that would skip that object and also send that specific error to the dashboard.

 

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...