Code Monkey home page Code Monkey logo

familyfoto's Introduction

Hi there ๐Ÿ‘‹

  • ๐Ÿ”ญ In my free time Iโ€™m currently working on our Whist Game

Anurag's github statsTop Langs

familyfoto's People

Contributors

dependabot[bot] avatar ititus avatar segelzwerg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

ry-v1 ititus

familyfoto's Issues

Remove tests from base test case

These tests run multiple times. It would be best to move them to a separate test case which is not inherited. So the number of total tests run while decrease.

This is important as for now we only can one test at a time.

Minimize duplication docker compose

The docker-compose file are doing the same but only using different images for the web services.

It would be ideal to have only one file which handles architecture by parameter.

Prometheus not exposed in docker

When starting the app from docker-compose the /metrics route is not found, but it works by starting the server with flask production locally.
currently working on it in #72

Disable duplication upload

Currently, media files could be uploaded twice. This should at least warn the user and should ask for confirmation.

Provide queue for photo updates

We should implement a queue that provides a list of new photos uploaded from different devices. This would allow automatic download to mobile devices.

A request from a device should contain some sort of timestamp and the return will all changes since that. However, this should not be a timestamp in the common sense but some incremental status code. So a new device could always request with 0 and will receive all changes as in it will get all current photos.

BUG: Video Upload causes 500 in gallery

In production

family-foto   | Traceback (most recent call last):
family-foto   |   File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 2447, in wsgi_app
family-foto   |     response = self.full_dispatch_request()
family-foto   |   File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1952, in full_dispatch_request
family-foto   |     rv = self.handle_user_exception(e)
family-foto   |   File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1821, in handle_user_exception
family-foto   |     reraise(exc_type, exc_value, tb)
family-foto   |   File "/usr/local/lib/python3.9/site-packages/flask/_compat.py", line 39, in reraise
family-foto   |     raise value
family-foto   |   File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1950, in full_dispatch_request
family-foto   |     rv = self.dispatch_request()
family-foto   |   File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1936, in dispatch_request
family-foto   |     return self.view_functions[rule.endpoint](**req.view_args)
family-foto   |   File "/usr/local/lib/python3.9/site-packages/prometheus_flask_exporter/__init__.py", line 686, in func
family-foto   |     return current_app.handle_user_exception(ex)
family-foto   |   File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1821, in handle_user_exception
family-foto   |     reraise(exc_type, exc_value, tb)
family-foto   |   File "/usr/local/lib/python3.9/site-packages/flask/_compat.py", line 39, in reraise
family-foto   |     raise value
family-foto   |   File "/usr/local/lib/python3.9/site-packages/prometheus_flask_exporter/__init__.py", line 684, in func
family-foto   |     raise exception
family-foto   |   File "/usr/local/lib/python3.9/site-packages/prometheus_flask_exporter/__init__.py", line 642, in func
family-foto   |     response = current_app.handle_user_exception(ex)
family-foto   |   File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1821, in handle_user_exception
family-foto   |     reraise(exc_type, exc_value, tb)
family-foto   |   File "/usr/local/lib/python3.9/site-packages/flask/_compat.py", line 39, in reraise
family-foto   |     raise value
family-foto   |   File "/usr/local/lib/python3.9/site-packages/prometheus_flask_exporter/__init__.py", line 639, in func
family-foto   |     response = f(*args, **kwargs)
family-foto   |   File "/app/family_foto/utils/protected.py", line 54, in is_active_wrapper
family-foto   |     return func(*args, **kwargs)
family-foto   |   File "/usr/local/lib/python3.9/site-packages/flask_login/utils.py", line 272, in decorated_view
family-foto   |     return func(*args, **kwargs)
family-foto   |   File "/app/family_foto/web.py", line 215, in gallery
family-foto   |     thumbnails = [ThumbnailService.generate(file, 200, 200) for file in user_media]
family-foto   |   File "/app/family_foto/web.py", line 215, in <listcomp>
family-foto   |     thumbnails = [ThumbnailService.generate(file, 200, 200) for file in user_media]
family-foto   |   File "/app/family_foto/utils/thumbnail_service.py", line 32, in generate
family-foto   |     path = ThumbnailService.video_thumbnail(file, height, width)
family-foto   |   File "/app/family_foto/utils/thumbnail_service.py", line 57, in video_thumbnail
family-foto   |     frame = random.randint(0, file.frame_count)
family-foto   |   File "/app/family_foto/models/video.py", line 44, in frame_count
family-foto   |     streams: list[dict] = self.meta['streams']
family-foto   |   File "/app/family_foto/models/video.py", line 56, in meta
family-foto   |     return ffmpeg.probe(self.abs_path)
family-foto   |   File "/usr/local/lib/python3.9/site-packages/ffmpeg/_probe.py", line 20, in probe
family-foto   |     p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
family-foto   |   File "/usr/local/lib/python3.9/subprocess.py", line 947, in __init__
family-foto   |     self._execute_child(args, executable, preexec_fn, close_fds,
family-foto   |   File "/usr/local/lib/python3.9/subprocess.py", line 1819, in _execute_child
family-foto   |     raise child_exception_type(errno_num, err_msg, err_filename)
family-foto   | FileNotFoundError: [Errno 2] No such file or directory: 'ffprobe'

Add api route for upload

This should have the same functionality as /upload but should not return a template but an HTTP status.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.