wlabarron / submit-show Goto Github PK
View Code? Open in Web Editor NEWSend a show to Mixcloud and your radio station's scheduling team.
License: MIT License
Send a show to Mixcloud and your radio station's scheduling team.
License: MIT License
Hello Barron!
I've been struggling to code in a "scroll down to view" when the users press the first upload button. The idea would be to scroll down automatically to a speficic DIV (like the image mixcloud DIV). When we press the first button, user has to scroll down to check the remaining form fields.
Im not very code savy but I already tried some solutions online and dont work. I've
Can you help?
Many thanks for your help.
Possible to send a link on body of the emial admin notification on show submission?
Same way has when Mixcloud published notification?
The link is to allow admin to upload or download the file directly to transit for radio platform.
Any chance you could share the database structure example or even SQL file has example?
Having a hard time getting this right.
PHP error log:
[09-May-2021 05:57:28 UTC] PHP Fatal error: Uncaught Error: Call to a member function fetch_assoc() on bool in /var/www/html/mix/index.php:115
Stack trace:
#0 {main}
thrown in /var/www/html/mix/index.php on line 115
So im guessing my tables are not well configured.
Thanks for the help
Some ideas:
At the moment, all uploaded files are stored in one big folder. It may be nice to move them into a fuller directory structure, so theoretically the uploaded files don't need manual organisation and thus this could integrate better into automated systems. This is particularly in regards to #25.
After v1 is complete (#29), the project should be structured in a way which is better for unit tests. It'd be good to add some and then have them run on push with a GitHub Action.
Hello Barron,
Is is possible to have the files saved without the spaces on the server?
Reason is - they are in fact playable if one replaces the spaces for % - but to use in Podcast service, URL cannot have those caracters.
So in stead of saving the file like "Aritst - show name date.mp3" something like "artisit-show-name-date.mp3"
Thanks for the support.
The processing
directory contains some scripts intended only really for internal use within the project. These could be tidied into another directory, and have access from the open web restricted using a .htaccess
directive.
Hello Barron,
Is there anyway easy that remote server upload of files can be implemented, in stead of local storage or S3?
At the very least, there's some unhandled exceptions in the code according to code inspection. There's also one old reference to SimpleSAMLphp.
In addition to changing the file name into a standard format, the presenter and show name/date should be written into the file's metadata.
Currently, processing/showFileUpload.php#75 strips all metadata from the file. After stripping all existing metadata, it should write details into the title and artist fields.
Files uploaded to the system can be stored locally or in S3, and old files can be purged periodically. This isn't mentioned in the README.
Currently, this is done via a SQL database. Looking to swap to pulling it from a JSON file.
Think of a show named "The Rock & Roll Show". The show's name is stored in the schedule database as "The Rock & Roll Show", which renders OK in the web interface. The issue is that Mixcloud's API re-escapes the ampersand, so the show's name on Mixcloud appears as "The Rock & Roll Show".
Further testing needed to see if the same issue exists with other entities.
If submitting a one-off or special show with a special character, such as an &
, in the name, the user may see an error that something was wrong with the provided data when they submit the form.
This bug is caused somewhere in the handling of the HTML entities for special characters.
Presenter-Rock amp Roll XXXXXX.mp3
.Presenter-Rock Roll XXXXXX.mp3
, which doesn't exist, so the process fails.Browser support for <input type="date">
and <input type="time">
is not good enough yet, so polyfills need to be added to support older browsers.
I've not properly looked into what's happening here so more debugging information is to come, but PHP is reporting this warning when trying to save a new default image for a show:
PHP message: PHP Warning: file_get_contents(): Filename cannot be empty in processing/formHandler.php on line 53
The id
for the help text next to the show dropdown and the presenter help text is the same as the id
of the inputs themselves. The help block id
s should be changed to nameDropdownHelp
and presenterHelp
respectively.
This will happen after v1
is merged.
When submitting an image of a type which the system doesn't support, the server-side verification will reject it, but the client-side will not.
Add a storage handler to allow shows to be stored in Google Drive Shared Drives.
Hey, congrats for the great script! I've configured database with default table and fields, created config.php but still I can't seem to run it.
When I visit the page, I get error 500.
It has to be something related to config im sure, cause commented out the first PHP lines on index.php where you call some data and the simple HTML version runs.
Instead of requiring a SimpleSAMLphp installation somewhere else, a SAML system could be integrated into the project. This could be done with SimpleSAMLphp, but it's perhaps a bit large for this purpose -- onelogin/php-saml might be better suited to the problem.
The AWS SDK is updated very often, and the updates rarely affect this project. Reducing how often Dependabot checks for updates would reduce PR noise (or, switch to a smaller S3-only SDK will less constant updates).
The form validation code was written quite quickly to get a working version available for use as soon as possible. It's therefore functional, but not very tidy. Organising it and improving the structure will make the project easier to maintain.
If one statement fails, it's likely that half a show's information will end up in the database making it potentially-awkward to fix. Where appropriate, consecutive statements should be tidied and formed into transactions.
In processing/formHandler.php#L113, the date passed to the system from the form input is formatted into js F o
to ensure a valid date has been entered.
o
is used to format the year, but the value it returns is the ISO-8601 week-numbering year (see the PHP documentation for more). This means that (for example) 1-3 January 2021 is treated as 1-3 January 2020.
The system uses this week-numbering-year-based date to find the submitted show file in the holding folder. It can't find the file though, since it is looking for a show incorrectly dated (for example) 200102
, but the file has been named correctly as 210102
. This causes show submissions to fail.
How to add a second or third email destination along with the email defined in config file, for the "new mix receveid email" for admin?
thanks
Hey Barron,
Wonderful updates, I've successfully implemented the script with SAML using WordPress has IDP and its working beautifully!
Sole issue - it seems that upon choosing the show, even if previously ticked regarding saved information, when selecting that same show, the information saved regarding that show does not populate the fields. I got no logs oh PHP-FM.
I can provide full access to server if you believe it would be more easier to help.
Many thanks, I would gladly buy this software, its exactly what I needed!
Add a config option to disable publishing shows to Mixcloud, so the tool can be used only for sending shows to the scheduling team if that is desired.
Hello again,
Have different error know, it seems project misses vendor files.
Has i understand they are specific to the project.
021-05-05 09:26:20.631940 [NOTICE] [4103901] [172.68.242.175:61322#APVH_www.umt.radio:443] [STDERR] PHP Warning: require_once(/home/neuzaclo/domains/umt.radio/public_html/mix/processing/vendor/autoload.php): failed to open stream: No such file or directory in /home/neuzaclo/domains/umt.radio/public_html/mix/processing/databaseConnections.php on line 6
Thanks for the support!!
The AWS SDK was briefly upgraded, then reverted back to an old version due to problems interacting with B2.
The Mixcloud API has a rate limiter which sometimes responds with a "retry after" time period. Currently, this tool will ignore that and continue to try to publish shows.
When a user submits an audio file below a certain duration, they could be warned of this before submitting the form. This would give them the opportunity to check they've uploaded the correct file and perhaps prevent problems down the line.
The final Submit button says "Uploading" while a show is uploading, with some help text underneath to explain the button activates once the show has uploaded. The help text should be linked to the button somehow. I think aria-describedby
is the best attribute for this, but should double check before implementing.
Hey barron, would it be easy to implement a default loading hour when we select the show, has happens with other stored values? Even if that implies adding the hour manually on the database for each show :)
thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.