Skip to content

Commit 3719d4b

Browse files
committed
Fix spelling of "original"
1 parent 1582702 commit 3719d4b

File tree

4 files changed

+19
-19
lines changed

4 files changed

+19
-19
lines changed

plexapi/audio.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,12 @@ def get(self, title):
168168
""" Alias of :func:`~plexapi.audio.Artist.track`. """
169169
return self.track(title)
170170

171-
def download(self, savepath=None, keep_orginal_name=False, **kwargs):
171+
def download(self, savepath=None, keep_original_name=False, **kwargs):
172172
""" Downloads all tracks for this artist to the specified location.
173173
174174
Parameters:
175175
savepath (str): Title of the track to return.
176-
keep_orginal_name (bool): Set True to keep the original filename as stored in
176+
keep_original_name (bool): Set True to keep the original filename as stored in
177177
the Plex server. False will create a new filename with the format
178178
"<Atrist> - <Album> <Track>".
179179
kwargs (dict): If specified, a :func:`~plexapi.audio.Track.getStreamURL()` will
@@ -184,7 +184,7 @@ def download(self, savepath=None, keep_orginal_name=False, **kwargs):
184184
filepaths = []
185185
for album in self.albums():
186186
for track in album.tracks():
187-
filepaths += track.download(savepath, keep_orginal_name, **kwargs)
187+
filepaths += track.download(savepath, keep_original_name, **kwargs)
188188
return filepaths
189189

190190

@@ -251,12 +251,12 @@ def artist(self):
251251
""" Return :func:`~plexapi.audio.Artist` of this album. """
252252
return self.fetchItem(self.parentKey)
253253

254-
def download(self, savepath=None, keep_orginal_name=False, **kwargs):
254+
def download(self, savepath=None, keep_original_name=False, **kwargs):
255255
""" Downloads all tracks for this artist to the specified location.
256256
257257
Parameters:
258258
savepath (str): Title of the track to return.
259-
keep_orginal_name (bool): Set True to keep the original filename as stored in
259+
keep_original_name (bool): Set True to keep the original filename as stored in
260260
the Plex server. False will create a new filename with the format
261261
"<Atrist> - <Album> <Track>".
262262
kwargs (dict): If specified, a :func:`~plexapi.audio.Track.getStreamURL()` will
@@ -266,7 +266,7 @@ def download(self, savepath=None, keep_orginal_name=False, **kwargs):
266266
"""
267267
filepaths = []
268268
for track in self.tracks():
269-
filepaths += track.download(savepath, keep_orginal_name, **kwargs)
269+
filepaths += track.download(savepath, keep_original_name, **kwargs)
270270
return filepaths
271271

272272
def _defaultSyncTitle(self):

plexapi/base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -519,13 +519,13 @@ def play(self, client):
519519
"""
520520
client.playMedia(self)
521521

522-
def download(self, savepath=None, keep_orginal_name=False, **kwargs):
522+
def download(self, savepath=None, keep_original_name=False, **kwargs):
523523
""" Downloads this items media to the specified location. Returns a list of
524524
filepaths that have been saved to disk.
525525
526526
Parameters:
527527
savepath (str): Title of the track to return.
528-
keep_orginal_name (bool): Set True to keep the original filename as stored in
528+
keep_original_name (bool): Set True to keep the original filename as stored in
529529
the Plex server. False will create a new filename with the format
530530
"<Artist> - <Album> <Track>".
531531
kwargs (dict): If specified, a :func:`~plexapi.audio.Track.getStreamURL()` will
@@ -537,7 +537,7 @@ def download(self, savepath=None, keep_orginal_name=False, **kwargs):
537537
locations = [i for i in self.iterParts() if i]
538538
for location in locations:
539539
filename = location.file
540-
if keep_orginal_name is False:
540+
if keep_original_name is False:
541541
filename = '%s.%s' % (self._prettyfilename(), location.container)
542542
# So this seems to be a alot slower but allows transcode.
543543
if kwargs:

plexapi/video.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -224,20 +224,20 @@ def _prettyfilename(self):
224224
# This is just for compat.
225225
return self.title
226226

227-
def download(self, savepath=None, keep_orginal_name=False, **kwargs):
227+
def download(self, savepath=None, keep_original_name=False, **kwargs):
228228
""" Download video files to specified directory.
229229
230230
Parameters:
231231
savepath (str): Defaults to current working dir.
232-
keep_orginal_name (bool): True to keep the original file name otherwise
232+
keep_original_name (bool): True to keep the original file name otherwise
233233
a friendlier is generated.
234234
**kwargs: Additional options passed into :func:`~plexapi.base.PlexObject.getStreamURL()`.
235235
"""
236236
filepaths = []
237237
locations = [i for i in self.iterParts() if i]
238238
for location in locations:
239239
name = location.file
240-
if not keep_orginal_name:
240+
if not keep_original_name:
241241
title = self.title.replace(' ', '.')
242242
name = '%s.%s' % (title, location.container)
243243
if kwargs is not None:
@@ -376,18 +376,18 @@ def get(self, title=None, season=None, episode=None):
376376
""" Alias to :func:`~plexapi.video.Show.episode()`. """
377377
return self.episode(title, season, episode)
378378

379-
def download(self, savepath=None, keep_orginal_name=False, **kwargs):
379+
def download(self, savepath=None, keep_original_name=False, **kwargs):
380380
""" Download video files to specified directory.
381381
382382
Parameters:
383383
savepath (str): Defaults to current working dir.
384-
keep_orginal_name (bool): True to keep the original file name otherwise
384+
keep_original_name (bool): True to keep the original file name otherwise
385385
a friendlier is generated.
386386
**kwargs: Additional options passed into :func:`~plexapi.base.PlexObject.getStreamURL()`.
387387
"""
388388
filepaths = []
389389
for episode in self.episodes():
390-
filepaths += episode.download(savepath, keep_orginal_name, **kwargs)
390+
filepaths += episode.download(savepath, keep_original_name, **kwargs)
391391
return filepaths
392392

393393

@@ -477,18 +477,18 @@ def unwatched(self):
477477
""" Returns list of unwatched :class:`~plexapi.video.Episode` objects. """
478478
return self.episodes(watched=False)
479479

480-
def download(self, savepath=None, keep_orginal_name=False, **kwargs):
480+
def download(self, savepath=None, keep_original_name=False, **kwargs):
481481
""" Download video files to specified directory.
482482
483483
Parameters:
484484
savepath (str): Defaults to current working dir.
485-
keep_orginal_name (bool): True to keep the original file name otherwise
485+
keep_original_name (bool): True to keep the original file name otherwise
486486
a friendlier is generated.
487487
**kwargs: Additional options passed into :func:`~plexapi.base.PlexObject.getStreamURL()`.
488488
"""
489489
filepaths = []
490490
for episode in self.episodes():
491-
filepaths += episode.download(savepath, keep_orginal_name, **kwargs)
491+
filepaths += episode.download(savepath, keep_original_name, **kwargs)
492492
return filepaths
493493

494494
def _defaultSyncTitle(self):

tests/test_video.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def test_video_Movie_attrs(movies):
9191
assert utils.is_metadata(movie.art)
9292
assert movie.artUrl
9393
assert movie.audienceRating == 8.5
94-
# Disabled this since it failed on the last run, wasnt in the orginal xml result.
94+
# Disabled this since it failed on the last run, wasnt in the original xml result.
9595
#assert movie.audienceRatingImage == 'rottentomatoes://image.rating.upright'
9696
movie.reload() # RELOAD
9797
assert movie.chapterSource is None

0 commit comments

Comments
 (0)