This is the server side code for a PHP server for generating JSON for displaying them in your Smart TV through Media Station X application.
If you have installed Media Station X APP in your Samsung TV then need to generate JSON files for serving through the APP. It will be a problem if you start writing code for generating this manaully. So I wrote this code for generating the JSON files on the fly by reading the contents in the folder.
I have planned to add more features like assigning custom thumbnails to videos also using different templating option provided by Media Station X app on the website http://msx.benzac.de/info/?tab=Showcases.
Contributions are welcome to this code.