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.

@robbt Thanks for advising me about the issue with new uploads within the hour that libretime needs to grab the latest show. That’s good to know and we’re going to build in some method in WordPress to deal with this issue.

I am testing the SmartBlocks feature with the podcast feed, but having an issue with the Taxonomy feed from PowerPress being accepted by LibreTime. I’ll open another support ticket to inquire about this issue.

Yeah I don’t know powerpress but I’d suggest validating the RSS feed to see if it is valid and if not fixing it. If there is a valid RSS feed that LibreTime isn’t parsing you can check the airtime-celery.log and see what errors it is giving and hopefully we can help figure out why.

Thanks, I did check with PowerPress and they validated the feed and said it works with iTunes, so they don’t see a reason why it wouldn’t be accepted. I also validated the feed myself using a common feed validator.

I’ll check the logs and see what’s in there and get back to you.

Does a feed need https? Could that be the reason it kicks back?

robbt, I say you post over the LibreTime forums. So, wanted to let you know that I took over the WordPress plugin, Radio Station, from its developer in June. I’m working with an Australian WordPress developer who helped me stabilize the plugin to work with WP 5.2.2 and we’ve added some new features. The plugin creates Show pages with show times and you can add a master schedule via shortcode. There are overrides and encore features, as well as widgets that display upcoming show/DJ, on air show DJ, and last song played.

I’d love to invert the process to run LibreTime into Radio Station to push show updates from LibreTime.

Let me know your thoughts.

Here are your links to follow.

plugin page: https://wordpress.org/plugins/radio-station

development: https://github.com/netmix/radio-station
host site: https://netmix.com/radio-station
demo: https://netmix.co/radio-station-demo

Sorry, I meant the OnAir2 forum.

@robbt I added the feed URL to Feedly and it added it correctly there. I tried the feed with https in LibreTime podcast and it still kicks back as invalid.

I’m looking for this celery log file. Can you let me know where it is on the server?

I burned the feed with Feedburner and now LibreTime has accepted the feed.

@djtonyz Very cool you took over the WordPress plugin! Being that it’s based on the Drupal Station module where I first connected with @robbt , I’m thinking there’s a good bit of overlap in terms of how we could integrate LibreTime into WordPress and Drupal.

Personally, I’d like to help enable LibreTime integration into both platforms. Would be cool if we already had a team of folks interested in getting this done.

Couple questions - would it make sense for there to be a LibreTime plugin (WordPress) and module (Drupal)? Are there people with interest/capacity to work on integration (develop, PM, docs, etc.) if there was a budget? If yes, possibly we could focus our efforts around some sort of open beta/service offering.

Does that kinda make sense?

Given that Internet broadcasters and LPFMs need to A. use LibreTime to manage their broadcasts and B. need to pass information back to WordPress regarding their show schedule, DJs, etc., I would say there certainly is a need. Now, I’m only one person with an opinion and no detailed market research, but it makes complete sense if you’re an independent station or webcaster with no web team, nor do you have the ability and resources to hire a team to develop this integration. There seems to be a lack of integration between automation software and WordPress. I’m going to assume it’s a resource issue and a knowledge issue, whereas there are no resources to throw at the problem and there is limited interest because the focus is on making the automation software better and not addressing distribution points for data outside of the core product.

And, LibreTime has no published API from which to pull data and get it into WordPress, so that makes LibreTime’s use with WordPress very limited, whereas I believe AirTime has some API calls to get data out and into WordPress.

So, yes, it certainly makes sense given how popular WordPress is (powers 32% of the entire web). Radio Station has a total of 67K downloads with about 250 active stations upgrading the plugin each time a new version is released.

The structure of Radio Station would certainly compliment a feed of data from LibreTime. So, part of the work is already done. Intergration with Radio Station as the preferred LibreTime plugin might be a path to consider, given that it’s already out there. But if LibreTime commiters chose to go down a path of an exclusive LibreTime open source WordPress plugin, that’s certainly a natural path to take.

Personally, I am not a developer. I’m a product manager, information architect, and lead user experience design in the WordPress universe. While I can read the code and understand functions, I just don’t have the time or bandwith to become a WordPress developer. It’s just not my core competency. I took over the plugin, as I see an opportunity to provide this resource to address a market need and keep it free. But I do have plans for a pro version too and like All in One SEO Pack or any good freemium plugin, I think free and pro is a model that serves all users. But if you cut it off - like any only Pro version, you don’t get the opportunity to introduce users to the plugin benefits and then move them into Pro at a later date.

So, in terms of what I can contribute is ideas, testing, and maybe documentation. But that’s as far as i can go given my personal situation at the moment. And, that’s extremely limiting right now. Just having these conversations is taking time away from monetizing my experience and taking care of my family. I’d love to have more time to dive into these things and help out, but I’m trying to solve client problems and just survive on a daily basis financially.

Taking over Radio Station is an attempt to find residual income beyond my agency model.

Thanks for all your input! As mentioned in this related discussion, we do already have some large organizations interested in using and/or supporting LibreTime. I think integration and support of plugins like Radio Station and the Drupal Station module (upgrade or total rewrite) could be sustained with a similar mix of crowdfunding, partnerships and services.

I’m less familiar with how WordPress developers are incentivized, but generally speaking, I think budgeting for a good PM and sustainer (fundraising, sponsor wrangling, managing crowdfunding campaigns etc) would enable development and maintenance of all the related plugins and integrations.

WordPress developers are generally incentivized through hourly client work or part time or full time agency or corporate work. If they are wise, then they will try and build a plugin or theme that serves a market need, so that they can find a path to residual revenue. Getting it out to market, growing usage, and then pivoting and adding a PRO version or some type of service where there’s a monthly subscription is where this has all gone. Matt Mullenweg, co-creator of WordPress (along with Mike Little) estimates the WordPress services and plugin/theme marketplace to be worth over US $1B and growing. Like any open source project, the incentive path to monetization is in becoming an expert in some aspect and then exploiting that expertise to generate income. Then splitting time between the free project and adding features or add-ons to the PRO version.

But, to your point in your first paragraph, there could certainly be a mix of support. I am actually planning my own Kickstarter campaign, so that we can build in the audio player integration with Radio Station, then get that out to market as a freemium plugin, whereas it accepts a file from shoutcast or icecast and then prints either the Show name or tracks into the player as they are added.

Once we get to that point, I think it’s a natural progression to make the integration with LibreTime and then I would, on my site and in the plugins read me and plugin page, recommend LibreTime as the primary radio station automation software for Radio Station. I am going to speaking to the developer helping me with Radio Station about all of this and get his input and feedback.

Compared to WordPress, Drupal is still just experimenting with models for funding contrib development. Over the past year more and more Drupal (and a few WordPress) projects are beginning to use Open Collective as it’s is one of the first to provide fiscal sponsorship for projects and teams.

On that note, have you considered creating a collective for Radio Station? For some of the same reasons outlined in this comment/discussion, a collective may provide some additional opportunities to collaborate and sustain development across complementary projects.

More info can be found on their new site for OSS projects (https://www.oscollective.org/) and a bunch of folks are collaborating and lurking in https://slack.opencollective.com/

No, I didn’t even know about this. I saw mention in these threads, but wasn’t aware I could participate and didn’t check into it given my more pressing responsibilities. So thanks for introducing me to the concept. I will dive into this now. Yes, it would be great if there could be some bridging of funds between complementary projects, for sure. I’ll take a look now.

Assuming the Drupal station module (see the requirements https://groups.drupal.org/node/220739) would need similar integration, is there/could there be a player that could customized to play well with Drupal and WordPress? If so, possibly there are ways to pool resources.

FWIW There has been some previous discussion on Custom audio players