Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added check for osx to avoid monitor mode #260

Merged
merged 1 commit into from
Jan 24, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion mishmash/commands/sync/sync.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import platform
import time
import collections
from pathlib import Path
Expand Down Expand Up @@ -27,7 +28,6 @@
from ...core import Command, EP_MAX_SIZE_HINT
from ...config import MusicLibrary

from ._inotify import Monitor, SYNC_INTERVAL
from .utils import syncImage, deleteOrphans

log = getLogger(__name__)
Expand Down Expand Up @@ -95,6 +95,7 @@ def start(self, args, config):
self._lib = lib

if self.args.monitor:
from ._inotify import Monitor, SYNC_INTERVAL
if self.monitor_proc is None:
self.monitor_proc = Monitor()
# Monitor roots, file dir are watched as the files are traversed
Expand Down Expand Up @@ -426,6 +427,11 @@ def _run(self, args=None):
args = args or self.args
args.plugin = self.plugin

if args.monitor and platform.system() == "Darwin":
perr("Monitor mode is not supported on OS/X\n")
self.parser.print_usage()
return 1

libs = {lib.name: lib for lib in args.config.music_libs}
if not libs and not args.paths:
perr("\nMissing at least one path/library in which to sync!\n")
Expand Down