Hi guys, it’s possibile create an select_input and the set option with get file in a specific directory? I create my personal media player, I dont want modify the packages when i put new song in directory.
Thank you very much!!
Hi guys, it’s possibile create an select_input and the set option with get file in a specific directory? I create my personal media player, I dont want modify the packages when i put new song in directory.
Thank you very much!!
can’t see why not:
use the input_select.set_options
with a data_template and you can set pretty much anything as an option…
Thank you for the response but i use this method and I don’t know how to recall a folder and let it extrapolate all the options automatically, in practice if I add a song in the music folder he must add it automatically without modifying anything, you can give me an example recalling any path ?
I’m not sure if the Folder Watcher or the Folder Sensor will give you what you want.
Maybe a command line sensor with ls -d */
would do the trick
You’d need some sort of for loop to go through the list of entries and populate the input_select when that sensor value changes…
I resolved with script python and shell_command for populate my input_select.
But now I ask if it is possible, I want create a URL for the media_content_id: http://localhost:port/ + input_select.song
It is possible?
I know it’s been long ago. But could you plese share with me what’s the python script helps to populate to input_select.
Thanks