-
-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
YouTube + Music #401
base: master
Are you sure you want to change the base?
YouTube + Music #401
Conversation
View video Wrong if else Issue iframe Edit on the displayed video Small fixes Hide title, better button location Trying to hide title as showinfo no longer works Display video Reverted Music upload File input not declared Removed compressing on musics Issue uploading music Trying to display size & type Images not there Trying stuffs Trying with different object Reverted Added type, corrected filename Display differnt image if music Extra } Updated user storage used Issue in loop Management for music Set music from Library Test blo Audio player Wrong link Trying this Back to list Listing stuffs which are deleted Issue filtering Wrong path set Issue when adding a music to a quizz not being linked to it Wrong var used Debug Debug Debug Blo Debug Magic Reverted Fix in calculate hash I'm banana Remove storage path Calculate hash is bugged Blo Blo Debug Blo Blo Blo Blo Blo Blo Blo Blo Blo Blo Blo Blo Blo Blo Blo Log Log Blo Log Log Trying Save item Blo Blo Always delete button Delete button always showed Blo Banana Added player on admin Fix player UI fixes Removed hardcoded blocorp
for more information, see https://pre-commit.ci
for image in images_to_delete: | ||
if image is not None: | ||
try: | ||
await storage.delete([image]) | ||
except DeletionFailedError: | ||
pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see "images_to_delete" being populated. Am I wrong? It seems it's always set to []
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should find the images that were in the quiz before it was saved and deletes them, but I'll check that
loading="lazy" | ||
alt={image.alt_text || $t('file_dashboard.not_available')} | ||
/> | ||
{#if file.mime_type === 'music/mp3'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mime type oversight
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean ?
alt={image.alt_text || $t('file_dashboard.not_available')} | ||
/> | ||
{#if file.mime_type === 'music/mp3'} | ||
<svg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
svg source?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
}); | ||
}); | ||
xhr.open('POST', `/api/v1/storage/raw/${file.name}`, true); | ||
xhr.setRequestHeader('Content-Type', 'music/mp3'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not always mp3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right but I don't have any other option (checking file extension?)
let file: File; | ||
let file_data: undefined | Blob = undefined; | ||
|
||
const compress_music = async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
None, but I didn't manage and spend time to remove the way it used to work. So I kept the compression function if compression could be added.
Thank you soo much for this PR! Really appreciate it! I've just looked through the code roughly and put some notes down. Please address them or comment on them and mark them as |
@mawoka-myblock I'm having issue "unlinking" images/musics from a quiz. If I remove a music or an image from a quiz and it becomes unused in any quiz, the call "/storage/list" still shows it as part of a quiz which prevents the file delete button to appear. It seems that the storage worker line |
I'm gonna have to look into that when I got time. Expect the weekend in 3 days |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
# Conflicts: # classquiz/routers/editor.py
I haven't forgotten you yet! |
No worries @mawoka-myblock, take your time! In the meantime, I also worked on another feature to fix several points which were blocking my tests:
I'll create another PR if you don't mind! |
Okay, so I got it installed and here are some things I noticed:
I could fix them myself, though some need an explanation on your side ;) |
The "view" page also seems to be missing the Youtube player, just like the "Practice" mode |
Hi @mawoka-myblock, let me answer your questions:
|
Hi,
I found your project and I really enjoyed it. However, it was lacking few functionalities that I tried to add myself. Note that I am not a Python nor a Svelte expert but if it may help you, it includes Music upload and YouTube (that one might require some fanciness on the link input).
I'm missing software for the translations though.
If you think this can help you, feel free to use it. If not, then please discard that PR!
Kind regards,
Jason