ctrl k
Use filename insetad of hash as name (#4)
Merged
Commits were merged into target branch
  • ■ ■ ■ ■ ■
    client/src/pages/components/shell.html
    skipped 140 lines
    141 141   {% endcall %}
    142 142   {{ nav_list([
    143 143   [
    144  - { 'header': true, 'text': 'Downloader', 'icon': '/static/menu/importer.svg' },
    145  - { 'text': 'Download', 'link': '/importer', 'icon': '/static/menu/index.svg' },
     144 + { 'header': true, 'text': 'Import', 'link': '/importer', 'icon': '/static/menu/importer.svg' },
    146 145   { 'text': 'FAQ', 'link': '/importer/tutorial', 'icon': '/static/menu/faq.svg' }
    147 146   ],
    148 147   [
    skipped 24 lines
    173 172   <img src="/static/menu.svg" />
    174 173   </div>
    175 174   {{ header_link('/', 'Home', 'home') }}
    176  - {{ header_link('/importer', 'Downloader') }}
     175 + {{ header_link('/importer', 'Import') }}
    177 176   {{ header_link('/artists', 'Artists') }}
    178 177   {{ header_link('/posts', 'Posts') }}
    179 178   {{ header_link('/account/login', 'Login', 'login') }}
    skipped 33 lines
  • ■ ■ ■ ■
    client/src/pages/components/shell.scss
    skipped 210 lines
    211 211   align-items: center;
    212 212   padding: 5px;
    213 213   color: var(--colour0-secondary);
    214  - text-transform: lowercase;
     214 + text-transform: capitalize;
    215 215   
    216 216   &:hover {
    217 217   background: none;
    skipped 64 lines
  • ■ ■ ■ ■ ■ ■
    src/lib/post.py
    skipped 20 lines
    21 21   f.hash,
    22 22   f.md5,
    23 23   f.mime,
     24 + psr.filename,
    24 25   f.ext,
    25 26   f.width,
    26 27   f.height,
    skipped 16 lines
    43 44   ORDER BY added DESC
    44 45   LIMIT 1) AS next
    45 46   FROM posts p
     47 + INNER JOIN post_scrape_relationships psr ON
     48 + p.id = psr.post_id
    46 49   LEFT JOIN content_ratings cr ON
    47 50   p.rating = cr.id,
    48 51   file_log f
    skipped 85 lines
    134 137   f.hash,
    135 138   f.md5,
    136 139   f.mime,
     140 + psr.filename,
    137 141   f.ext,
    138 142   f.width,
    139 143   f.height,
    skipped 297 lines
    437 441   attachments = []
    438 442   ext = post['ext']
    439 443   name = post['hash'] + ext
     444 + filename = post['filename']
    440 445   path = f"/{post['hash'][0:2]}/{post['hash'][2:4]}/{name}"
    441 446   if re.search("\.(gif|jpe?g|jpe|png|webp)$", name, re.IGNORECASE): # noqa: W605
    442 447   previews.append({
    443 448   'type': 'thumbnail',
    444 449   'server': get_fileserver_for_value(f'/data{path}'),
    445 450   'link': url_for('post.get', post_id=post['id']),
    446  - 'name': name,
     451 + 'name': filename,
    447 452   'path': path,
    448 453   })
    449 454   else:
    skipped 1 lines
    451 456   'server': get_fileserver_for_value(f'/data{path}'),
    452 457   'link': url_for('post.get', post_id=post['id']),
    453 458   'extension': ext,
    454  - 'name': name,
     459 + 'name': filename,
    455 460   'path': path,
    456 461   })
    457 462   video_extensions = Configuration().webserver['ui']['video_extensions']
    skipped 3 lines
    461 466   'type': 'video',
    462 467   'server': get_fileserver_for_value(f'/data{path}'),
    463 468   'extension': ext,
    464  - 'name': name,
     469 + 'name': filename,
    465 470   'path': path,
    466 471   })
    467 472   result_previews += previews
    skipped 4 lines
pull request 1 of 1
Assignees
Merge Strategy
Create Merge Commit
Watchers (2)
Reference
pull request Nekomod#4
Please wait...
Page is in error, reload to recover