danrahn/Plexamp-Download-Copier

Can't find Offline directory on MacOS

skywiseca opened this issue · 0 comments

As you mentioned in your README, this won't work in other OS (like Mac)
I modded the code to get it to work, maybe you can put an if in to do Windows or Mac.

    if 'HOME' in os.environ:
        expected = os.path.join(os.environ['HOME'], 'Library', 'Application Support',  'Plexamp', 'Offline')

Now HOME isn't the best but OSTYPE seems to detail a Mac or not.

elif [[ "$OSTYPE" == "darwin"* ]]; then

I don't know python at all so not sure how to find a substring in the OSTYPE variable (mine is OSTYPE=darwin20)