Skip to content

Commit

Permalink
Fixed prepends for Unix/Windows crossovers
Browse files Browse the repository at this point in the history
  • Loading branch information
XDGFX committed Jan 2, 2020
1 parent 67ec617 commit 09226ce
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions PPP.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def setupVariables():
plex_prepend = os.path.commonpath(playlist)

# Convert paths back for prepend
playlist = [convertPath(track, plex_convert, True) for track in playlist]
plex_prepend = convertPath(plex_prepend, plex_convert, True)

print("Calculated Plex Prepend: " + plex_prepend)

Expand Down Expand Up @@ -269,7 +269,7 @@ def setupVariables():
local_prepend = os.path.commonpath(playlist)

# Convert paths back for prepend
playlist = [convertPath(track, local_convert, True) for track in playlist]
local_prepend = convertPath(local_prepend, local_convert, True)

print("Calculated local Prepend: " + local_prepend)

Expand Down Expand Up @@ -497,11 +497,11 @@ def stripPrepend(path, prepend, invert):
print("Local playlist paths will not be converted")

if v['check_ssl'] == "False":
print("SSL certificate will not be validated")
print("SSL certificates will not be validated")
warnings.filterwarnings('ignore', message='Unverified HTTPS request')
check_ssl=False
else:
print("SSL certificate will be validated")
print("SSL certificates will be validated")
check_ssl=True
br()

Expand Down Expand Up @@ -631,13 +631,13 @@ def stripPrepend(path, prepend, invert):
local_tracks.append(stripPrepend(convertPath(
track, v['local_convert'], True), v['local_prepend'], True))

# Writes local_tracks to merged playlist
# Writes local tracks back to local tmp
f = io.open(os.path.join(_local, filename), 'w+', encoding='utf8')
for line in local_tracks:
f.write(line + '\n')
f.close()

# Writes local_tracks to merged playlist
# Writes plex tracks back to plex tmp
f = io.open(os.path.join(_plex, filename), 'w+', encoding='utf8')
for line in plex_tracks:
f.write(line + '\n')
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ If you want to delete a playlist or song from a playlist, it must be removed fro
## Usage instructions
1. Install Python 3 if you haven't already
2. Download the latest release of PPP from [here](https://github.com/XDGFX/PPP/releases)
3. For first run, see [Setup](#Setup))
3. For first run, see [Setup](#Setup)
4. Run PPP with Python 3

```
Expand Down

0 comments on commit 09226ce

Please sign in to comment.