Question about User API, uploading from WordPress, and Podcast function

Hi,

I am new to LibreTime and radio station software in general. I am a product development consultant hired by an Internet radio broadcaster to assess how we can leverage LibreTime to both power the Internet radio station and utilize the Libre API or subsequent XML outputt to WordPress to publish show archives by the DJs who create DJ mixes for the show being produced.

After a review of LibreTime, we tested how to:

a. create a User/DJ
b. generate a folder on the server based on the User/DJ ID (1, 2, 3, etc)
c. upload new shows with the exact same Title and Album, which then places files in sequence in the DJs folder, as long as the meta data added to the MP3 is exactly the same.

What we would like to do is create a WordPress user using the WordPress Rest API once the User/DJ is created in LibreTime. In WordPress, the user will then login to WordPress and using a form, upload their show files, which will drop them into Digital Ocean and directly into the DJs folder, where we have parked the LibreTime install.

We want to add the show file, then restrict the user from uploading again until the show has aired.

Once the show has aired, we want to take XML feed for the Podcast function and publish an archive in WordPress, so that the fan can listen to the show in the website archive.

Would love to get some feedback on this. I see that LibreTime may not have an upload API at this time, but not sure if it does and the docs have yet to be updated. Or, if we have to go back to using AirTime and it’s SFTP function instead of LibreTime.

Is there someone working on this upload feature? Is it something we can possibly contribute to.

Let us know, thanks!

1 Like

Hi @djtonyz

Guess there’s a lull in this forum, but there’s definitely been instances of LibreTime plugging into WordPress. I’m not sure if there are examples of integration you’re describing, but there most likely is interest.

I’ve been threatening to integrate LibreTime into Drupal for awhile now. Possibly the type of beta we’ve been discussing could include WordPress and Drupal integration… which would most likely grow the number of participants and resources available for development.

Well, what we want to happen seems nonexistent at the moment. I’m a product manager and not a developer and my clients most likely can’t afford to invest in the development of this feature. While they thought LibreTime would be a good option to do this, there seems to be no USER API published. Everything we want to do is predicated on the user being created in LibreTime by the site editor and then WordPress creating based on that action. LibreTime has to create the folder on Digital Ocean first for WordPress to be able to target the folder once the user is created in WordPress. I’m thinking through the business logic. I have yet to uncover via Google any discussion of this type of thing. I would think there would need to be a WordPress plugin as well as the equivalent in Drupal that would use an API to make these connections and trigger these events.

Hey @djtonyz - sorry for the lack of feedback/input.
We don’t have a well documented API, as far as authentication there has been some work on supporting LDAP which is what I believe other stations have used and I’m pretty sure there would be LDAP implementation compatible with wordpress.

My station has basically required the manual creation of users on both Drupal & libretime although we could probably get away with just giving people access to Drupal and using the podcast from there to feed their show with smartblocks.

Connecting authentication and users on both to a centralized service like LDAP probably makes more sense than scripting the creation of users on one then there other because you still have to deal with the issue of synchronization, say they change their password on libretime or wordpress, how do you propogate the change etc.

I haven’t messed with the LDAP stuff but I’m pretty sure @hairmare has used it for his stations installation. I guess it is using FreeIPA - http://libretime.org/freeipa/ and http://libretime.org/freeipa/#ldap-configuration.

@robbt After reading the responses, jumping on Git, reading the responses there and following along, it seems as if the easiest path is to register the user in WordPress, allow the user to upload show files there, sync those uploads to a podcast category, and then take the category feeds and add them in LibreTime with the smartblocks, so that each smartblock contains the category feed of that DJ and it’s then set to the correct time for that DJs show in the master schedule.

We would allow the user in WordPress to have the role of Contributor, when the user logs in, they would see an upload panel where they upload their show. Given the ID of the user is matched with the category, the podcast post is then auto published and the feed picks up the last show available.

My only question here is how do smart blocks work in the sense that it smart blocks ingest the feed and play, for example, this week’s upload, is it smart them to take the next episode uploaded and published in next available time slot?

I responded on github, but yeah a smartblock plays the newest show by default for the autogenerated podcast smartblocks. So if a new show is updauploadedted it will play this, the only challenge can be if people upload their show right before it is supposed to air since Libretime will schedule the tracks an hour ahead of time and also will download new podcast episodes at least every hour or so.