Skip to content

Folder search permanently disables after a transient scan timeout (requires manual re-affirmation) #796

Description

@AlySerry0

Summary

When a media-folder scan hits FOLDER_SEARCH_FIRST_FILE_TIMEOUT or FOLDER_SEARCH_TIMEOUT, FileSwitchManager._updateInfoThread sets folderSearchEnabled = False. That disables automatic file switching entirely until the user manually re-affirms their directories via File → Set Media Directories → OK. I'd like to propose making this self-healing: abort the slow pass, but keep the feature enabled so the next periodic pass can recover on its own.

Why the current behavior hurts

Timeouts here are usually transient. A network share or a spun-down external drive is slow on the first cold scan, but the very next periodic pass typically finishes in a couple of seconds once the OS/drive metadata caches are warm. Under today's behavior the first cold pass permanently disables the feature, so that fast warm pass never runs — the user is left with "not found" playlist items and a menu dance to recover.

This is a long-standing pain point — see #130 (same scenario: a Samba mount with thousands of files, asking for a bigger timeout).

To be upfront about root cause: in my case the real bottleneck was server-side (an NTFS-over-USB drive via ntfs-3g on a Raspberry Pi — cold directory enumeration ~30–50s, warm ~1–5s), and I fixed that on the server. I'm not asking Syncplay to make slow drives fast. This is purely about the client UX when a transient timeout does occur, which can affect anyone with a large or networked media directory.

Proposed behavior

  • On timeout, return from the pass (as today) but don't set folderSearchEnabled = False.
  • Surface the timeout notice only once (tracked with a folderSearchTimedOut flag) so it doesn't repeat every interval.
  • Clear the flag whenever a pass completes within the timeout, so it keeps self-healing and will still notify again on a future, distinct episode.

This keeps the original intent — the slow pass is still aborted, and the once-only notice plus the existing interval cadence keeps I/O bounded — while removing the permanent-disable and the manual re-affirmation requirement.

Follow-up: the folder-search-timeout-error message currently tells users to re-affirm via the menu, which would no longer be necessary. I'm happy to reword it (across locales) as part of the change.

Implementation

I have a small patch ready against master (client.py only, +17/−4):
master...AlySerry0:syncplay:folder-search-retry-not-disable

Happy to open a PR if you're open to this direction — or to adapt the recovery strategy to whatever you'd prefer (e.g. a backoff between retries after a timeout, or gating it behind a config option).

Environment

  • Syncplay 1.7.x, Windows 11
  • Media directories on a Samba/network share (alongside local drives)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions