ctrl k
  • ■ ■ ■ ■ ■ ■
    importers/common.py
    skipped 133 lines
    134 134   options = partialmethod(request, 'OPTIONS')
    135 135   
    136 136   def download(self, *args, **kwargs):
    137  - _download = download_file(*args, **kwargs)
    138  - (_, _, _, post_id, duplicate, r) = _download
     137 + download = download_file(*args, **kwargs)
     138 + _, _, _, r, file_id, duplicate, _ = download
    139 139   if duplicate:
    140 140   self.log(
    141 141   f'Potential duplicate for URL {r.request.url} detected; '
    142  - f'using close match (post: ID {post_id}, '
     142 + f'using close match (file: ID {file_id}, '
    143 143   f'URL {duplicate["remote_url"]})',
    144 144   level='warning', to_client=False)
    145  - return _download
     145 + return download
    146 146   
    147 147   @property
    148 148   def configuration(self):
    skipped 21 lines
  • ■ ■ ■ ■ ■ ■
    src/internals/database/database.py
    skipped 78 lines
    79 79  
    80 80  
    81 81  def rollback():
    82  - if _conn:
     82 + if _conn is not None:
    83 83   _conn.rollback()
    84 84  
    85 85  
    86 86  def commit():
    87  - if _conn:
     87 + if _conn is not None:
    88 88   _conn.commit()
    89 89  
    90 90  
    skipped 14 lines
  • ■ ■ ■ ■ ■
    src/internals/utils/download.py
    skipped 319 lines
    320 320   if raise_error_on_near_dupe:
    321 321   raise DuplicateException(potential_duplicate)
    322 322   return (
    323  - reported_filename, '/' + hash_filename, r,
    324  - potential_duplicate['id'], potential_duplicate, similar_images)
     323 + file_hash, reported_filename, '/' + hash_filename, r,
     324 + potential_duplicate['id'], potential_duplicate,
     325 + similar_images)
    325 326   
    326 327   fname = pathlib.Path(join(temp_dir, temp_name))
    327 328   mtime = datetime.datetime.fromtimestamp(fname.stat().st_mtime)
    skipped 43 lines
  • ■ ■ ■ ■
    src/lib/post.py
    skipped 96 lines
    97 97  def create_post(
    98 98   file_id: int,
    99 99   discoverable: bool,
    100  - visible: bool,
     100 + visible: bool = True,
    101 101   rating=None):
    102 102   if rating is not None:
    103 103   rating = Rating[rating]
    skipped 146 lines
Please wait...
Page is in error, reload to recover