{"id":391606,"date":"2026-10-26T09:24:21","date_gmt":"2026-10-26T09:24:21","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/pira-cz-now-playing\/"},"modified":"2026-10-26T09:33:23","modified_gmt":"2026-10-26T09:33:23","slug":"pira-cz-now-playing","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/pira-cz-now-playing\/","author":23591386,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.0","stable_tag":"1.0.0","tested":"7.1.4","requires":"6.0","requires_php":"7.4","requires_plugins":null,"header_name":"Pira.cz Now Playing","header_author":"Pira.cz","header_description":"Receive now-playing metadata via HTTP GET or POST and display it using a shortcode. Compatible with Magic RDS 4 Simple HTTP.","assets_banners_color":"","last_updated":"2026-10-26 09:33:23","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"https:\/\/www.pira.cz\/","rating":0,"author_block_rating":0,"active_installs":0,"downloads":59,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"piradio","date":"2026-10-26 09:33:23","revision":3765981}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3766083,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128}},"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[465,2994,32465,704,80],"plugin_category":[43,50],"plugin_contributors":[288638],"plugin_business_model":[],"class_list":["post-391606","plugin","type-plugin","status-publish","hentry","plugin_tags-broadcast","plugin_tags-metadata","plugin_tags-now-playing","plugin_tags-radio","plugin_tags-shortcode","plugin_category-customization","plugin_category-media","plugin_contributors-piradio","plugin_committers-piradio"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/pira-cz-now-playing\/assets\/icon-128x128.png?rev=3766083","icon_2x":false,"generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Pira.cz Now Playing receives metadata pushed by a radio automation system or any other application capable of making HTTP GET or POST requests. It displays the latest artist, title, and free-form text using simple WordPress shortcodes, without requiring a streaming server, external account, or paid service.<\/p>\n\n<p>Features:\n* Separate artist, title, and text shortcodes.\n* Independent song (artist\/title) and text channels, each with its own inactivity timeout.\n* Configurable replacement text when the text channel times out.\n* Automatic updates on the open page without a page reload.\n* Non-breaking spaces for empty or expired artist\/title fields to preserve layout.\n* API-key authentication and a simple settings page with example requests.\n* One station per WordPress installation.<\/p>\n\n<p>Compatible with Magic RDS 4 Simple HTTP by Pira.cz and other applications that can send HTTP GET or POST requests. Magic RDS 4 configuration instructions are provided separately by Pira.cz.<\/p>\n\n<h3>Usage<\/h3>\n\n<p>The following shortcodes can be placed anywhere WordPress processes shortcodes:<\/p>\n\n<pre><code>[pira_now_playing] \u2014 displays the free-form text channel.\n\n[pira_now_playing element=\"artist\"] \u2014 displays the current artist.\n\n[pira_now_playing element=\"title\"] \u2014 displays the current song title.\n<\/code><\/pre>\n\n<p>Each shortcode renders a span element. The browser automatically checks for updated values at the configured refresh interval. The initial value is rendered by WordPress, so the shortcode works even before the first browser refresh.<\/p>\n\n<p>Song and text are independent: sending artist\/title does not refresh the text timeout, and sending text does not refresh the song timeout. You can use two independent HTTP senders, one for each channel.<\/p>\n\n<p>When the song timeout expires, artist and title become non-breaking spaces to avoid collapsing their lines. When the text timeout expires, the configured replacement text is displayed.<\/p>\n\n<h3>HTTP API<\/h3>\n\n<p>The Update endpoint is displayed in Settings &gt; Pira.cz Now Playing. On a typical installation it is:<\/p>\n\n<pre><code>https:\/\/example.com\/wp-json\/pira-now-playing\/v1\/update\n<\/code><\/pre>\n\n<p>Replace <code>example.com<\/code> and <code>YOUR_KEY<\/code> with your own site and API key.<\/p>\n\n<p>Update a song using GET:<\/p>\n\n<pre><code>https:\/\/example.com\/wp-json\/pira-now-playing\/v1\/update?key=YOUR_KEY&amp;artist=ABBA&amp;title=Waterloo\n<\/code><\/pre>\n\n<p>Update the text channel using GET:<\/p>\n\n<pre><code>https:\/\/example.com\/wp-json\/pira-now-playing\/v1\/update?key=YOUR_KEY&amp;text=Morning%20Show\n<\/code><\/pre>\n\n<p>Alternatively, use HTTP POST with form-encoded fields (<code>application\/x-www-form-urlencoded<\/code>):<\/p>\n\n<pre><code>key=YOUR_KEY&amp;artist=ABBA&amp;title=Waterloo\n<\/code><\/pre>\n\n<p>or:<\/p>\n\n<pre><code>key=YOUR_KEY&amp;text=Morning%20Show\n<\/code><\/pre>\n\n<p>The API also accepts the key in an <code>X-PIRA-Key<\/code> HTTP header for clients that support custom headers. Custom headers are not required for Magic RDS 4 Simple HTTP.<\/p>\n\n<p>Include both <code>artist<\/code> and <code>title<\/code> in each song update. If only one is supplied, the other is cleared. Sending the <code>text<\/code> field only updates the text channel. If a request includes both song fields and text, both channels are updated.<\/p>\n\n<p>All values must be URL-encoded correctly. For example, a space can be represented as <code>%20<\/code>, and an ampersand inside a field value as <code>%26<\/code>.<\/p>\n\n<p>A successful update returns JSON with <code>ok: true<\/code>. Invalid or missing credentials return HTTP 403. A request without any supported metadata fields returns HTTP 400.<\/p>\n\n<p>Public status endpoint (no API key needed):<\/p>\n\n<pre><code>https:\/\/example.com\/wp-json\/pira-now-playing\/v1\/current\n<\/code><\/pre>\n\n<p>It returns the current display values and channel status as JSON. Do not put private information in metadata fields: the displayed data and public status are accessible to visitors.<\/p>\n\n<p><strong>Security:<\/strong> Use HTTPS. API keys in GET URLs may be recorded in web-server, reverse-proxy, or monitoring logs. If the sender supports it, POST with the key in the custom HTTP header avoids placing it in the URL. Keep the key secret and replace it if exposed.<\/p>\n\n<h3>Styling<\/h3>\n\n<p>The output uses these CSS classes, which can be styled in your theme or WordPress Additional CSS:<\/p>\n\n<ul>\n<li><code>.pira-np<\/code> \u2014 every field.<\/li>\n<li><code>.pira-np-text<\/code> \u2014 text channel.<\/li>\n<li><code>.pira-np-artist<\/code> \u2014 artist.<\/li>\n<li><code>.pira-np-title<\/code> \u2014 title.<\/li>\n<\/ul>\n\n<p>The plugin does not impose a visual design. Use your theme's typography, layout, and CSS.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>In WordPress, go to Plugins &gt; Add New Plugin &gt; Upload Plugin, select the plugin ZIP, and activate it.<\/li>\n<li>Go to Settings &gt; Pira.cz Now Playing. An API key is generated on activation.<\/li>\n<li>Copy the Update endpoint URL and configure your sending application to submit metadata with the API key.<\/li>\n<li>Set the Song timeout, Text timeout, Text after timeout, and Browser refresh interval as needed.<\/li>\n<li>Add one or more shortcodes to your page or post using a Shortcode block.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"does%20this%20plugin%20require%20magic%20rds%204%3F\"><h3>Does this plugin require Magic RDS 4?<\/h3><\/dt>\n<dd><p>No. Any application that can send HTTP GET or POST requests with the required parameters can update the displayed metadata.<\/p><\/dd>\n<dt id=\"can%20i%20display%20a%20programme%20name%20independently%20of%20the%20song%3F\"><h3>Can I display a programme name independently of the song?<\/h3><\/dt>\n<dd><p>Yes. Send the programme name in <code>text<\/code> and use <code>[pira_now_playing]<\/code>. It has its own timeout, independent of the artist and title.<\/p><\/dd>\n<dt id=\"why%20is%20the%20artist%20or%20title%20blank%20after%20some%20time%3F\"><h3>Why is the artist or title blank after some time?<\/h3><\/dt>\n<dd><p>The song inactivity timeout has expired. The plugin outputs a non-breaking space for each empty song field to help preserve the layout.<\/p><\/dd>\n<dt id=\"can%20i%20show%20multiple%20stations%3F\"><h3>Can I show multiple stations?<\/h3><\/dt>\n<dd><p>No. This version is designed for one station per WordPress installation.<\/p><\/dd>\n<dt id=\"why%20are%20updates%20not%20visible%20immediately%3F\"><h3>Why are updates not visible immediately?<\/h3><\/dt>\n<dd><p>The browser checks periodically, based on Browser refresh interval. Check that the sending application receives a successful response and that your WordPress REST API endpoints are not cached by a proxy or caching plugin. Reload the page once after installing a new plugin version to ensure its JavaScript is current.<\/p><\/dd>\n<dt id=\"do%20i%20need%20to%20configure%20a%20cron%20job%3F\"><h3>Do I need to configure a cron job?<\/h3><\/dt>\n<dd><p>No. Timeout validity is calculated from the last received timestamp, and the browser polls for changes.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>First public release: independent song and text channels, separate timeouts, shortcodes, automatic refresh, and layout-preserving empty song fields.<\/li>\n<\/ul>","raw_excerpt":"Display live song information and custom text on a WordPress site using metadata sent via HTTP GET or POST.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/391606","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=391606"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/piradio"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=391606"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=391606"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=391606"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=391606"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=391606"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=391606"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}