Jellyfin Forum
Directory watching stopped working - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+---- Forum: Media Scanning & Identification (https://forum.jellyfin.org/f-media-scanning-identification)
+---- Thread: Directory watching stopped working (/t-directory-watching-stopped-working)



Directory watching stopped working - unmesh59 - 2024-07-21

Directory watching used to work but adding media files to my four media libraries seems to have stopped working. Relevant log entries seem to be:

[2024-07-19 10:05:17.144 -07:00] [INF] Stopping directory watching for path "/mnt/Syno-Lenovo-1/TV_Shows"
[2024-07-19 10:05:17.145 -07:00] [INF] Stopping directory watching for path "/mnt/Syno-Lenovo-1/Videos/_English"
[2024-07-19 10:05:17.150 -07:00] [INF] Stopping directory watching for path "/mnt/Syno-Lenovo-1/Videos/_English for kids"
[2024-07-19 10:05:17.151 -07:00] [INF] Stopping directory watching for path "/mnt/Syno-Lenovo-1/Videos/_Hindi"

Manually initiated library scans work fine.

I'm running 10.9.7 directly on Ubuntu 24.04


RE: Directory watching stopped working - TheDreadPirate - 2024-07-21

Can you share the full jellyfin log via pastebin?

And can you describe what kind of storage /mnt/Syno-Lenovo-1 is? File system type?


RE: Directory watching stopped working - unmesh59 - 2024-07-21

https://pastebin.com/QbnueLiu via the Jellyfin dashboard

The file system on the Synology NAS is BTRFS and the network share is via CIFS. FWIW, it used to work and still works manually.


RE: Directory watching stopped working - TheDreadPirate - 2024-07-21

It looks like some sort of permissions issue. It can see the files but can't read them?


RE: Directory watching stopped working - unmesh59 - 2024-07-21

The Jellyfin clients can play all titles including the ones showing in the log.

On the server, they are all showing as -rwxr-xr-x 1 root root


RE: Directory watching stopped working - TheDreadPirate - 2024-07-21

Are you talking about real time monitoring not working? If so, that should not be enabled for CIFS shares.


RE: Directory watching stopped working - unmesh59 - 2024-07-21

Yes! I had left it at defaults since initial installation and it was working. Is there an alternative?

Also, I am able to cat the files that are erroring out from a terminal opened to the server but when I run the ffprobe command shown in the log from that terminal, it shows an error

unmesh59@ubuntuserver24:~$ /usr/lib/jellyfin-ffmpeg/ffprobe -analyzeduration 200M -probesize 1G -i file:\"/mnt/Syno-Lenovo-1/Videos/_English/The Kids Are All Right (2010)/The.Kids.Are.All.Right.2010.720p.BluRay.x264.YIFY.srt\" -threads 0 -v warning -print_format json -show_streams -show_format
-bash: syntax error near unexpected token `('

Is this because of the parentheses in the path?

Where would I find the ffprobe logs?


RE: Directory watching stopped working - TheDreadPirate - 2024-07-22

You need to remove the backslashes on the quotes.  Parenthesis are fine as long as they are escaped or in quotes.  Since the quotes are escaped they are not treated as actual quotes, therefore not putting the parenthesis in quotes.  Also, why are you ffprobe-ing a subtitle file?

ffprobe will just dump a bunch of text.  You can either scroll and copy and paste or output it into a text file.

Code:
/usr/lib/jellyfin-ffmpeg/ffprobe -analyzeduration 200M -probesize 1G -i file:"/mnt/Syno-Lenovo-1/Videos/_English/The Kids Are All Right (2010)/The.Kids.Are.All.Right.2010.720p.BluRay.x264.YIFY.srt" -threads 0 -v warning -print_format json -show_streams -show_format > output.txt 2>&1

Can you run this command and share the output?

Code:
ls -ld /mnt/Syno-Lenovo-1 /mnt/Syno-Lenovo-1/Videos /mnt/Syno-Lenovo-1/Videos/_English /mnt/Syno-Lenovo-1/Videos/_English/"The Kids Are All Right (2010)"
ls -l /mnt/Syno-Lenovo-1/Videos/_English/"The Kids Are All Right (2010)"/*



RE: Directory watching stopped working - unmesh59 - 2024-07-22

I pulled the ffprobe invocation out of the log file where it was erroring out. Turns out it might have been related to the encoding format of the .srt file being of type Unicode with BOM. 

/usr/lib/jellyfin-ffmpeg/ffprobe -analyzeduration 200M -probesize 1G -i file:"/mnt/Syno-Lenovo-1/Videos/_English/The Kids Are All Right (2010)/The.Kids.Are.All.Right.2010.720p.BluRay.x264.YIFY.srt" -threads 0 -v warning -print_format json -show_streams -show_format > output.txt 2>&1


Code:
unmesh59@ubuntuserver24:~$ cat output.txt
{
    "streams": [
        {
            "index": 0,
            "codec_name": "subrip",
            "codec_long_name": "SubRip subtitle",
            "codec_type": "subtitle",
            "codec_tag_string": "[0][0][0][0]",
            "codec_tag": "0x0000",
            "r_frame_rate": "0/0",
            "avg_frame_rate": "0/0",
            "time_base": "1/1000",
            "disposition": {
                "default": 0,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0,
                "timed_thumbnails": 0,
                "captions": 0,
                "descriptions": 0,
                "metadata": 0,
                "dependent": 0,
                "still_image": 0
            }
        }
    ],
    "format": {
        "filename": "file:/mnt/Syno-Lenovo-1/Videos/_English/The Kids Are All Right (2010)/The.Kids.Are.All.Right.2010.720p.BluRay.x264.YIFY.srt",
        "nb_streams": 1,
        "nb_programs": 0,
        "format_name": "srt",
        "format_long_name": "SubRip subtitle",
        "size": "117932",
        "probe_score": 100
    }
}

As for the file/directory protections:

Code:
unmesh59@ubuntuserver24:~$ ls -ld /mnt/Syno-Lenovo-1 /mnt/Syno-Lenovo-1/Videos /mnt/Syno-Lenovo-1/Videos/_English /mnt/Syno-Lenovo-1/Videos/_English/"The Kids Are All Right (2010)"
drwxr-xr-x 2 root root 0 Jan 28 11:08  /mnt/Syno-Lenovo-1
drwxr-xr-x 2 root root 0 Jun 27 17:53  /mnt/Syno-Lenovo-1/Videos
drwxr-xr-x 2 root root 0 Jul 21 17:00  /mnt/Syno-Lenovo-1/Videos/_English
drwxr-xr-x 2 root root 0 Jul 21 15:11 '/mnt/Syno-Lenovo-1/Videos/_English/The Kids Are All Right (2010)'


Code:
unmesh59@ubuntuserver24:~$ ls -l /mnt/Syno-Lenovo-1/Videos/_English/"The Kids Are All Right (2010)"/*
-rwxr-xr-x 1 root root    130147 Sep  1  2022 '/mnt/Syno-Lenovo-1/Videos/_English/The Kids Are All Right (2010)/fanart.jpg'
-rwxr-xr-x 1 root root    271053 Sep  1  2022 '/mnt/Syno-Lenovo-1/Videos/_English/The Kids Are All Right (2010)/folder.jpg'
-rwxr-xr-x 1 root root      8499 Sep  1  2022 '/mnt/Syno-Lenovo-1/Videos/_English/The Kids Are All Right (2010)/movie.nfo'
-rwxr-xr-x 1 root root 849682722 Sep  1  2022 '/mnt/Syno-Lenovo-1/Videos/_English/The Kids Are All Right (2010)/The.Kids.Are.All.Right.2010.720p.BluRay.x264.YIFY.mp4'
-rwxr-xr-x 1 root root    117932 Jul 21 15:11 '/mnt/Syno-Lenovo-1/Videos/_English/The Kids Are All Right (2010)/The.Kids.Are.All.Right.2010.720p.BluRay.x264.YIFY.srt'



RE: Directory watching stopped working - unmesh59 - 2024-07-23

Directory watching started working again. I swear I didn't make any changes.