Skip to content

Conversation

deldesir
Copy link
Collaborator

@deldesir deldesir commented Dec 7, 2023

Handle missing cover when the downloaded video is mp4.

Handle missing cover when video is mp4
@deldesir deldesir requested a review from holta December 7, 2023 02:55
@deldesir deldesir self-assigned this Dec 7, 2023
@deldesir deldesir added the bug Something isn't working label Dec 7, 2023
@holta
Copy link
Member

holta commented Dec 7, 2023

Great news!

Is this tested?

@holta holta changed the title Fix missing cover Fix missing cover [for MP4; not just WebM] Dec 7, 2023
@deldesir
Copy link
Collaborator Author

deldesir commented Dec 7, 2023

Smoke-tested on Ubuntu 24.04

@holta holta merged commit 16352f4 into iiab:master Dec 7, 2023
@holta
Copy link
Member

holta commented Dec 7, 2023

@deldesir can you investigate why @EMG70 is not getting "Upload" of MP4 files to work on his fresh install (http://sprunge.us/2OkfiI?en) that includes this PR #59?

Internet in a Box
        
500 Internal Server Error
        
The server encountered an internal error and was unable to complete your request. There is an error in the application.      
        
Traceback (most recent call last):

  File "/usr/local/calibre-web-py3/lib/python3.11/site-packages/flask/app.py", line 2190, in wsgi_app

    response = self.full_dispatch_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/local/calibre-web-py3/lib/python3.11/site-packages/flask/app.py", line 1486, in full_dispatch_request

    rv = self.handle_user_exception(e)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/local/calibre-web-py3/lib/python3.11/site-packages/flask/app.py", line 1484, in full_dispatch_request
        
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
        
  File "/usr/local/calibre-web-py3/lib/python3.11/site-packages/flask/app.py", line 1469, in dispatch_request

    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/local/calibre-web-py3/cps/usermanagement.py", line 34, in decorated_view
        
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^

  File "/usr/local/calibre-web-py3/cps/editbooks.py", line 72, in inner

    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^

  File "/usr/local/calibre-web-py3/cps/editbooks.py", line 263, in upload

    meta, error = file_handling_on_upload(requested_file)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/local/calibre-web-py3/cps/editbooks.py", line 913, in file_handling_on_upload

    meta = uploader.upload(requested_file, config.config_rarfile_location)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/local/calibre-web-py3/cps/uploader.py", line 372, in upload
        
    return process(tmp_file_path, filename_root, file_extension, rar_excecutable)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/local/calibre-web-py3/cps/uploader.py", line 100, in process

    if not meta.title.strip():
           ^^^^^^^^^^

AttributeError: 'NoneType' object has no attribute 'title'
 
Please report this issue with all related information:
        Create Issue
    
        Return to Home

@deldesir
Copy link
Collaborator Author

deldesir commented Dec 7, 2023

Thanks @EMG70 for reporting this "upload" bug. I will work on it and update you on #61. Meanwhile please test this PR with the "Download to IIAB" button. A link like https://www.youtube.com/watch?v=i3ku5nx4tMU entered in the URL field should download the video as an mp4 file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants