Giter Club home page Giter Club logo

submit-show's People

Contributors

dependabot[bot] avatar wlabarron avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

submit-show's Issues

Scroll down to DIV upon pressing first button

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.

Send link for file on admin notification

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.

Error parsing the database info

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

Store files in a directory structure

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.

Add unit tests

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.

Having file names with no spaces upon saving

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.

Restructure `/processing`

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.

Check through SAML code

At the very least, there's some unhandled exceptions in the code according to code inspection. There's also one old reference to SimpleSAMLphp.

Write file metadata

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.

HTML entities are not parsed into HTML by Mixcloud

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.

One-off shows with special characters in the name may fail form validation

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.

  • Consider a show named "Rock & Roll", submitted as a one-off show with the name being entered on the submission page instead of being chosen from the list.
  • The file put into the holding folder is named Presenter-Rock amp Roll XXXXXX.mp3.
  • The form handler checks for the existence of a show file in the holding folder, but looks for Presenter-Rock Roll XXXXXX.mp3, which doesn't exist, so the process fails.

`date` and `time` input polyfills

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.

Show image isn't saved to database

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

`,` missing after `smtpRecipient` config value

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.

Integrated SAML sign in

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.

Reduce Dependabot check frequency

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).

Form validation code tidying

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.

Use transactions for database interactions

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.

Shows for the first or last week of the year may not be accepted

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.

Absolute instead of relative paths used in `script.js` for retrieving saved show information

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!

Disable publishing to Mixcloud

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.

Missing Composer vendor/dependencies

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!!

Update AWS SDK

The AWS SDK was briefly upgraded, then reverted back to an old version due to problems interacting with B2.

Mixcloud rate limit handling

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.

Warn the user when they upload a show which is oddly short

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.

Submit button missing `aria-describedby`

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.

Load default time along with selected show

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

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.