mirror of
https://github.com/lutris/lutris
synced 2024-11-02 15:48:01 +00:00
Allow overridding dest_file
This commit is contained in:
parent
9b47c086cc
commit
9c09513935
1 changed files with 7 additions and 0 deletions
|
@ -15,6 +15,7 @@ class InstallerFile:
|
|||
self.game_slug = game_slug
|
||||
self.id = file_id.replace("-", "_") # pylint: disable=invalid-name
|
||||
self._file_meta = file_meta
|
||||
self._dest_file = None # Used to override the destination
|
||||
|
||||
@property
|
||||
def url(self):
|
||||
|
@ -55,8 +56,14 @@ class InstallerFile:
|
|||
|
||||
@property
|
||||
def dest_file(self):
|
||||
if self._dest_file:
|
||||
return self._dest_file
|
||||
return os.path.join(self.cache_path, self.filename)
|
||||
|
||||
@dest_file.setter
|
||||
def dest_file(self, value):
|
||||
self._dest_file = value
|
||||
|
||||
def __str__(self):
|
||||
return "%s/%s" % (self.game_slug, self.id)
|
||||
|
||||
|
|
Loading…
Reference in a new issue