jiahuahl / streamerfriendly

An app to play media conveniently
Creative Commons Zero v1.0 Universal
0 stars 0 forks source link

Register sounds into the app #7

Open jiahuahl opened 3 years ago

jiahuahl commented 3 years ago

do after #5

implement a function that takes the file path of a sound (.wav, .mp3) and saves it into the database. function optionally takes a list of strings for aliases function optionally takes a list of strings for tags function optionally takes a boolean ShouldCopy - if this is true, then copy the image into a local folder (e.g. */data/sounds/), and save the file path to the local version. otherwise, just save the file path as given.

also, add the name of the file (without extension) to the list of aliases before adding it to the database

also, replace any spaces in aliases and tags to underscores before saving.

also, if there are any duplicates within the list of aliases or duplicates within the list of tags, don't add them. initialize the volume to 1.0

i guess we could also initialize time last played to something representing 'never' and total times played to 0 (if default values don't already represent that.)