Added support to add/update metadata on multiple assets via a json file #56

Merged
ken_fallon merged 1 commits from I226_Asset_table_management into main 2024-10-27 12:16:27 +00:00
Owner

Replaced duplicate errorids in say.php
Created assets.php to take a json file ( the same format as dbeaver export ) and adds it to the database using REPLACE INTO.
This will add the entry if it is missing, and will update it if it is present
There is no option to delete.
The data needs to be valid and be the correct types, and the episode needs to exist.
Added a list of allowed file extensions to include.php

{
  "assets": [
    {
      "episode_id" : 4501,
      "filename" : "hpr4501.mp3",
      "extension" : "mp3",
      "size" : 7243886,
      "sha1sum" : "df7ceb16e600b08071bdb484ec6539b8e9341c92",
      "mime_type" : "audio\/mpeg; charset=binary",
      "file_type" : "setgid Audio file with ID3 version 2.4.0, contains:MPEG ADTS, layer III, v1,  64 kbps, 48 kHz, Monaural"
    },
    {
      "episode_id" : 4501,
      "filename" : "hpr4501.opus",
      "extension" : "opus",
      "size" : 7243886,
      "sha1sum" : "df7ceb16e600b08071bdb484ec6539b8e9341c92",
      "mime_type" : "audio\/mpeg; charset=binary",
      "file_type" : "setgid Audio file with ID3 version 2.4.0, contains:MPEG ADTS, layer III, v1,  64 kbps, 48 kHz, Monaural"
    }
  ]
}
Replaced duplicate errorids in `say.php` Created `assets.php` to take a json file ( the same format as dbeaver export ) and adds it to the database using `REPLACE INTO`. This will add the entry if it is missing, and will update it if it is present There is no option to delete. The data needs to be valid and be the correct types, and the episode needs to exist. Added a list of allowed file extensions to `include.php` ``` { "assets": [ { "episode_id" : 4501, "filename" : "hpr4501.mp3", "extension" : "mp3", "size" : 7243886, "sha1sum" : "df7ceb16e600b08071bdb484ec6539b8e9341c92", "mime_type" : "audio\/mpeg; charset=binary", "file_type" : "setgid Audio file with ID3 version 2.4.0, contains:MPEG ADTS, layer III, v1, 64 kbps, 48 kHz, Monaural" }, { "episode_id" : 4501, "filename" : "hpr4501.opus", "extension" : "opus", "size" : 7243886, "sha1sum" : "df7ceb16e600b08071bdb484ec6539b8e9341c92", "mime_type" : "audio\/mpeg; charset=binary", "file_type" : "setgid Audio file with ID3 version 2.4.0, contains:MPEG ADTS, layer III, v1, 64 kbps, 48 kHz, Monaural" } ] } ```
ken_fallon added 1 commit 2024-10-26 17:32:59 +00:00
Author
Owner

#HPR/hpr_generator#226

#HPR/hpr_generator#226
ken_fallon merged commit 043288e5e4 into main 2024-10-27 12:16:27 +00:00
ken_fallon deleted branch I226_Asset_table_management 2024-10-27 12:16:28 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: HPR/hpr_hub#56
No description provided.