-
Notifications
You must be signed in to change notification settings - Fork 519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[radio@driglu4it] Add option to parse custom metadata sources #6581
Comments
Yes. I am happy to support you, but you should be aware that it is not an easy task to implement.
Yes that is a tricky part .I don't think it's feasible to realize this for the user in a simple way without an enormous maintenance effort. When you implement a simple way for a json, than the next user wants a simple way for xml and so on. Also some users might want to combine several fields from a json. What I would do instead is, to allow the users to add a bash script which returns the title. Than you call the bash script in the code eyery 5 seconds or so. For this example, you could add a bashcript with:
No, I don't think this is the right place because this is not related to Mpv. But you can start adding it here and than later on we can discuss how to improve.
Yes, the javascript file is what is used from cinnamon. Typescript is just add an addition to js. But you can build the js file by running:
That is something you can think about later. But this is very,very complicated and I don't think it makes sense to implement at the moment. |
Thanks for your feedback.
So one .sh file per station in a folder ? That could be an option, but thinking more about it, as a user I'd probably like better something like a 5th column in the "My Stations" DB:
How do you feel about this way? We could even imagine a way for users to propose their JSON file URL & JSON Path entries to the central radio file by submitting a PR (adding column to those too). However that would be a second step because format of
I am under the impression that currently the title change when listening to a same station is triggered inside |
Hi, sorry for not answering before. I currently don`t have much time. I would says, start coding and once we have a first working Version we can discuss how to improve |
Nothing too urgent, but that would help if you were able to find time to answer the last question of my last message |
Ok I have reviewed it now. In the function But as you want to parse metadata when no metadata are already provided, this is definitely the wrong place. As the radio title is used in multiple places of the applet (in the tooltip, in the popup menu, for the youtube download... and maybe more), I would suggest to provide it first at one place and test that it is working and than also add it to the other place. E.g you could change something in the "createRadioAppletTooltip" function and play around there and test if it is working. Once it is working you can think about how to make it available everywhere. Here you need to provide a function which fetches and parses a json every 5 seconds or so. |
Applet name and maintainer
radio@driglu4it
What would you like to see?
Hello @jonath92 ,
Suffering from using audio streams in which the applet does not find title metadata (e.g: https://stream.radiofrance.fr/fip/fip_hifi.m3u8), I am looking for a way in such case to indicate a JSON metadata source to the applet for that stream so that it can parse it (e.g. https://www.radiofrance.fr/fip/api/live at
{ "now": {"firstLine": {"title": SONG_TITLE} } }
).{ "now": {"visuals": {"card": {"src": COVER_ART_URL} } } }
) in addition as an option?Best regards,
oleole39
The text was updated successfully, but these errors were encountered: