RadioDJ - Free Radio Automation Software Forum

RadioDJ v1.7+ => Plugin Development => Topic started by: Valdis on July 20, 2016, 07:24:22 PM

Title: Web Export NG plugin - Advanced web export
Post by: Valdis on July 20, 2016, 07:24:22 PM
I have almost finished work on Web Export plugin and I'd like to invite community members to test it.

Its main advantages are:

Screenshot:
(http://image.prntscr.com/image/b57a1da2753b46daa7860f67178f789e.png)

Right now the plugin window can be accessed from plugins list. It is at the very bottom - named WebExportNG.

This plugin is still beta. I have tested as much as I can but there may still be some bugs. UI needs some polishing and I'm open to suggestions regarding interface and features.

Version 1.0.1.2 2016-07-21 @ 17:10 GMT
Changes:
ENHANCEMENT: Plugin can now send updates when input button is activated. That is controllable using a checkbox in configuration for each request.
ENHANCEMENT: Log each response to file in Plugins directory. Can be toggled in options of each request.
ENHANCEMENT: View last response via right-click context menu for each request entry.
ENHANCEMENT: Added basic (as in HTTP basic authentication) authentication. It is not the same as password field in Now playing plugin.
ENHANCEMENT: Each request item can have its own User-Agent header defined.
BUGFIX: Added URL validation in configuration window and before making requests.
BUGFIX: Newline in content body were removed during serialisation to XML file.

Important note: If you updated from version 1.0.0.1, please switch off debug logging for each request entry. Otherwise the plugin will keep writing details of every server response to a log file in Plugins directory. The debug switch was originally turned on by default and was saved to included xml settings file.

Version 1.0.1.3 2016-07-24 @ 15:55 GMT
BUGFIX: Not all fields were copied to new request object when using duplicate option, reading to NullReferenceException when new request was fired
ENHANCEMENT: Enhanced logging to indicate when requests time out or return an error
ENHANCEMENT: Skip replacing variables if data is empty or doesn't contain substitution variables

Version 1.0.1.4 2016-07-25 @ 16:05 GMT
BUGFIX: Corrected JSON escaping to handle backslashes in Windows file paths
BUGFIX: Debug logs were being written despite unchecking the option
ENHANCEMENT: Few small GUI fixes

Download it here: Plugin_WebExport_1.0.1.4.zip (http://axellence.lv/downloads/Plugin_WebExport_1.0.1.4.zip)

As usual - place ZIP contents in RadioDJ\Plugins and restart RadioDJ. ZIP file includes 5 sample requests you can play with. All requests are disabled by default to not cause any trouble.
Title: Re: Web Export NG plugin - Advanced web export
Post by: FL Coast on July 20, 2016, 07:44:58 PM
Great Valdis.  Downloading it now.   :cool:
Title: Re: Web Export NG plugin - Advanced web export
Post by: djdensma on July 20, 2016, 08:18:53 PM
great one!!! :D
Title: Re: Web Export NG plugin - Advanced web export
Post by: djdensma on July 20, 2016, 08:33:25 PM
get method for tune-in?

not working for me
Title: Re: Web Export NG plugin - Advanced web export
Post by: Valdis on July 20, 2016, 08:36:38 PM
Quote from: djdensma on July 20, 2016, 08:33:25 PM
get method for tune-in?

not working for me
That phrase is too vague for troubleshooting. Could you provide more details? Maybe a screenshot?
Title: Re: Web Export NG plugin - Advanced web export
Post by: djdensma on July 20, 2016, 08:39:06 PM
Quote from: Valdis on July 20, 2016, 08:36:38 PM
That phrase is too vague for troubleshooting. Could you provide more details? Maybe a screenshot?
sorry. its working now. i had wrong url


great work!!!
Title: Re: Web Export NG plugin - Advanced web export
Post by: FL Coast on July 20, 2016, 08:45:06 PM
Posting only to TuneIn.  Working Great.  Posts only selected items.  Fantastic job Valdis.
Title: Re: Web Export NG plugin - Advanced web export
Post by: djdensma on July 20, 2016, 09:28:07 PM
Valdis is it possible to send line in title too?
Title: Re: Web Export NG plugin - Advanced web export
Post by: Valdis on July 21, 2016, 12:18:44 PM
Quote from: djdensma on July 20, 2016, 09:28:07 PM
Valdis is it possible to send line in title too?
No, the plugin does not trigger updates on input change yet but I will add it today.
At the moment Web export plugin provides combined title (which is also the input title) in $auto_title$ variable and does not substitute $title$ by combined title as NowPlaying plugin does. I'll have to rethink the whole updating process but it should not take long to implement these changes.
I'm going to also add another configuration option as checkbox to set when title updates are sent for each request entry.
Title: Re: Web Export NG plugin - Advanced web export
Post by: djdensma on July 21, 2016, 04:13:37 PM
Quote from: Valdis on July 21, 2016, 12:18:44 PM
No, the plugin does not trigger updates on input change yet but I will add it today.
At the moment Web export plugin provides combined title (which is also the input title) in $auto_title$ variable and does not substitute $title$ by combined title as NowPlaying plugin does. I'll have to rethink the whole updating process but it should not take long to implement these changes.
I'm going to also add another configuration option as checkbox to set when title updates are sent for each request entry.

thank you!!
Title: Re: Web Export NG plugin - Advanced web export
Post by: FL Coast on July 21, 2016, 05:46:58 PM
FYI   Not sure what's happening, but during last night RadioDJ stop posting to TuneIn. I have Switchback to the Post in RadioDJ but it still has not started populating TuneIn again.
Title: Re: Web Export NG plugin - Advanced web export
Post by: Valdis on July 21, 2016, 06:01:34 PM
Quote from: FL Coast on July 21, 2016, 05:46:58 PM
FYI   Not sure what's happening, but during last night RadioDJ stop posting to TuneIn. I have Switchback to the Post in RadioDJ but it still has not started populating TuneIn again.
I'm not sure I understand what you mean by "Switchback to the Post in RadioDJ". TuneIn may be blocking your IP because of too many requests or too request errors.
I'll add feature to view last response and some error logging  to make it easier to troubleshoot.
Title: Re: Web Export NG plugin - Advanced web export
Post by: FL Coast on July 21, 2016, 06:18:04 PM
Quote from: Valdis on July 21, 2016, 06:01:34 PM
I'm not sure I understand what you mean by "Switchback to the Post in RadioDJ". TuneIn may be blocking your IP because of too many requests or too request errors.
I'll add feature to view last response and some error logging  to make it easier to troubleshoot.

What I meant was after finding TuneIn not posting the song info from the Web Export NG Plugin, I reactivated the Web Exporter within RadioDJ.

I don't see how it would have been too many requests.  I had the Web Export NG plugin set to export only music, and during the nighttime hours in the U.S., nothing is played except music with one top of the hour ID.
Title: Re: Web Export NG plugin - Advanced web export
Post by: Valdis on July 21, 2016, 07:10:24 PM
Quote from: FL Coast on July 21, 2016, 06:18:04 PM
What I meant was after finding TuneIn not posting the song info from the Web Export NG Plugin, I reactivated the Web Exporter within RadioDJ.

I don't see how it would have been too many requests.  I had the Web Export NG plugin set to export only music, and during the nighttime hours in the U.S., nothing is played except music with one top of the hour ID.
That is strange. If the plugin had failed, there would have been an exception window. Being able to see TuneIn responses would help to sort it out.
I have added debug logging and viewing of last server response via right-click menu of each request item. I'll upload the new version shortly and edit my original post.
Title: Re: Web Export NG plugin - Advanced web export
Post by: Valdis on July 21, 2016, 07:43:06 PM
Version 1.0.1.2 has been uploaded. Go to first post in thread (http://www.radiodj.ro/community/index.php?topic=8867.msg51586#msg51586).
Title: Re: Web Export NG plugin - Advanced web export
Post by: FL Coast on July 21, 2016, 10:10:59 PM
Quote from: Valdis on July 21, 2016, 07:10:24 PM
That is strange. If the plugin had failed, there would have been an exception window. Being able to see TuneIn responses would help to sort it out.
I have added debug logging and viewing of last server response via right-click menu of each request item. I'll upload the new version shortly and edit my original post.

OK, Running Version 1.0.1.2.  So far so good. keeping fingers crossed.   :hihi:
Title: Re: Web Export NG plugin - Advanced web export
Post by: Valdis on July 21, 2016, 10:14:00 PM
Great! One question: How did you tell that the updates stopped sometime in the night? As far as I can tell, TuneIn stops displaying song info about 30 minutes after last update.
Title: Re: Web Export NG plugin - Advanced web export
Post by: FL Coast on July 21, 2016, 10:26:03 PM
Quote from: Valdis on July 21, 2016, 10:14:00 PM
Great! One question: How did you tell that the updates stopped sometime in the night? As far as I can tell, TuneIn stops displaying song info about 30 minutes after last update.

I downloaded the plugin around 15:00 local time yesterday.  I checked on TuneIn around 22:00 and it was still posting track info.  At 6:30 local time this morning there was no info posted.  On the Andriod TuneIn app you can go to Options> View Playlist and see approximately 4 hours of the previously played tracks.  when I checked, there were none.  So I estimate the plugin stopped posting (or whatever happened) between 22:00 last night and 2:30 this morning local time.
Title: Re: Web Export NG plugin - Advanced web export
Post by: Valdis on July 21, 2016, 10:33:25 PM
Oh, I did not know that you can see playlist in TuneIn app. Actually, I uninstalled the app a long time ago.

With latest version you should be able to see latest response and all responses in log file "Plugin_WebExport_[request-name]_debug.log" inside Plugins folder. All entries may have debug logging enabled, cause initially I had set the variable to true by default. You can and should turn it off after troubleshooting, otherwise the log file will continue to grow in size.
Title: Re: Web Export NG plugin - Advanced web export
Post by: djdensma on July 22, 2016, 04:54:37 AM
thank you

Quote from: Valdis on July 21, 2016, 07:43:06 PM
Version 1.0.1.2 has been uploaded. Go to first post in thread (http://www.radiodj.ro/community/index.php?topic=8867.msg51586#msg51586).
Title: Re: Web Export NG plugin - Advanced web export
Post by: Marius on July 22, 2016, 04:27:43 PM
Good job!  ;)
Title: Re: Web Export NG plugin - Advanced web export
Post by: FL Coast on July 22, 2016, 07:57:38 PM
@Valdis,  24 hours now using Web Export NG Plugin Version 1.0.1.2. and TuneIn looks like it's happy with what it's receiving.

Great job Valdis.  Thank you.
Title: Re: Web Export NG plugin - Advanced web export
Post by: Valdis on July 24, 2016, 06:23:39 PM
Bump! Version 1.0.1.3 is out. It has one serious bug fix and two smaller enhancements. goto: post1 (http://www.radiodj.ro/community/index.php?topic=8867.msg51586#msg51586).
Title: Re: Web Export NG plugin - Advanced web export
Post by: FL Coast on July 25, 2016, 05:38:18 PM
Quote from: Valdis on July 24, 2016, 06:23:39 PM
Bump! Version 1.0.1.3 is out. It has one serious bug fix and two smaller enhancements. goto: post1 (http://www.radiodj.ro/community/index.php?topic=8867.msg51586#msg51586).

Two things Valdis,
Version 1.0.1.3 is still showing up as 1.0.1.2 in PlugIns

I can not turn off the debug logging.  I must be missing something.  The box "Write responses to debug log" is unchecked. I have even tried checking the box.  It still writes the file on the next change, even if I delete the file.
Title: Re: Web Export NG plugin - Advanced web export
Post by: Valdis on July 25, 2016, 05:47:21 PM
Quote from: FL Coast on July 25, 2016, 05:38:18 PM
Two things Valdis,
Version 1.0.1.3 is still showing up as 1.0.1.2 in PlugIns

I can not turn off the debug logging.  I must be missing something.  The box "Write responses to debug log" is unchecked. I have even tried checking the box.  It still writes the file on the next change, even if I delete the file.

Ah, right. I had forgotten to add one if statement before writing debug log. And thanks for reminding about version. I forgot to change that too. Version 1.0.1.4 coming your way shortly.
Title: Re: Web Export NG plugin - Advanced web export
Post by: FL Coast on July 25, 2016, 05:49:28 PM
Quote from: Valdis on July 25, 2016, 05:47:21 PM
Ah, right. I had forgotten to add one if statement before writing debug log. And thanks for reminding about version. I forgot to change that too. Version 1.0.1.4 coming your way shortly.

:ok:  No Problems.

By The Way: Some people do notice the Window Titles    :D
Title: Re: Web Export NG plugin - Advanced web export
Post by: Valdis on July 25, 2016, 06:14:42 PM
Quote from: FL Coast on July 25, 2016, 05:49:28 PM
By The Way: Some people do notice the Window Titles    :D
Ha! Yes, some people do. I like to include something amusing in all of my work.

Meanwhile version 1.0.1.4 has been uploaded and original post updated.
Title: Re: Web Export NG plugin - Advanced web export
Post by: FL Coast on July 25, 2016, 07:59:11 PM
Got it and all things are good.
Title: Re: Web Export NG plugin - Advanced web export
Post by: travis on September 27, 2016, 08:48:24 AM
Does this support the publicist tag?

Including the label (publicist in RadioDJ) is a requirement for SoundExchange reporting. I know a bunch of stations who would like to make use of this.
Title: Re: Web Export NG plugin - Advanced web export
Post by: Valdis on September 29, 2016, 12:51:08 AM
Quote from: travis on September 27, 2016, 08:48:24 AM
Does this support the publicist tag?

Including the label (publicist in RadioDJ) is a requirement for SoundExchange reporting. I know a bunch of stations who would like to make use of this.

If you meant the publisher tag (it is mislabeled in the English translation file and you can change it), I could add it in an upcoming release. I can't promise any exact date, but I'll try to find time for this in few weeks.
Title: Re: Web Export NG plugin - Advanced web export
Post by: manishboyradio on October 15, 2016, 09:33:21 PM
how would you set this up for twitter or facebook?
Title: Re: Web Export NG plugin - Advanced web export
Post by: marcbeinder on October 16, 2016, 06:04:41 AM
Excited to try this out! Just sent my API Request into TuneIn to give it a shot!
Title: Re: Web Export NG plugin - Advanced web export
Post by: djdensma on October 21, 2016, 10:21:21 PM
tune-in not working anymore after upgrade to 1.0.1.4
using get method. not sure what the issue is
Title: Re: Web Export NG plugin - Advanced web export
Post by: Valdis on October 23, 2016, 11:48:27 PM
Quote from: djdensma on October 21, 2016, 10:21:21 PM
tune-in not working anymore after upgrade to 1.0.1.4
using get method. not sure what the issue is

Please turn on request debug logging and post contents of the log file RadioDJ\Plugins\Plugin_WebExport_{request name}_debug.log.

(http://image.prntscr.com/image/ef9d6538f77f4ed29b534ec1007cf41a.png)

The same advice applies to everyone who's encountering issues with this plugin.
Title: Re: Web Export NG plugin - Advanced web export
Post by: djdensma on October 24, 2016, 03:28:19 AM
i see this in the log
403    Invalid authentication


Response status: OK from http://air.radiotime.com/Playing.ashx?xxx
Response headers:
Content-Encoding:
Vary: Accept-Encoding
Content-Length: 146
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Date: Mon, 24 Oct 2016 01:23:14 GMT
Server: Microsoft-IIS/8.5
X-AspNet-Version: 4.0.30319
Content:
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1">
<head>
<status>403</status>
<fault>Invalid authentication</fault>
</head>
<body>
</body>
</opml>
Title: Re: Web Export NG plugin - Advanced web export
Post by: Valdis on October 25, 2016, 11:17:13 AM
Quote from: djdensma on October 24, 2016, 03:28:19 AM
i see this in the log
403    Invalid authentication


Response status: OK from http://air.radiotime.com/Playing.ashx?xxx
Response headers:
Content-Encoding:
Vary: Accept-Encoding
Content-Length: 146
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Date: Mon, 24 Oct 2016 01:23:14 GMT
Server: Microsoft-IIS/8.5
X-AspNet-Version: 4.0.30319
Content:
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1">
<head>
<status>403</status>
<fault>Invalid authentication</fault>
</head>
<body>
</body>
</opml>


Please check the partnerId and partnerKey parameters in URL. Also, make sure any special characters are escaped in both values.

Example URL with parameters:
http://air.radiotime.com/Playing.ashx?partnerId=XxXxXx&partnerKey=_AbCd%24%25%26&id=s424242&artist=$artist$&title=$title$

Note that the partnerKey in the example contains "%24%25%26" which is a URI-encoded representation of three special characters "$%&".
Title: Re: Web Export NG plugin - Advanced web export
Post by: djdensma on October 25, 2016, 01:23:03 PM
Quote from: Valdis on October 25, 2016, 11:17:13 AM
Please check the partnerId and partnerKey parameters in URL. Also, make sure any special characters are escaped in both values.

Example URL with parameters:
http://air.radiotime.com/Playing.ashx?partnerId=XxXxXx&partnerKey=_AbCd%24%25%26&id=s424242&artist=$artist$&title=$title$

Note that the partnerKey in the example contains "%24%25%26" which is a URI-encoded representation of three special characters "$%&".

thanks.. that's it. there's other characters in between.
Title: Re: Web Export NG plugin - Advanced web export
Post by: Brodephat on November 04, 2016, 10:24:53 PM
Hey, I love the plugin and concept so I didn't mind at all donating but for the JSON and xml, could you post sample php or html on how to capture the data. I think I might have an idea how to do it but not entirely sure.

Thanks
Title: Re: Web Export NG plugin - Advanced web export
Post by: Valdis on November 07, 2016, 01:04:50 AM
Quote from: Brodephat on November 04, 2016, 10:24:53 PM
Hey, I love the plugin and concept so I didn't mind at all donating but for the JSON and xml, could you post sample php or html on how to capture the data. I think I might have an idea how to do it but not entirely sure.

Sometimes, all you have to do is searching using the right keywords. LMGTFY (http://lmgtfy.com/?q=how+to+handle+raw+post+data+in+php). You're welcome.
Title: Re: Web Export NG plugin - Advanced web export
Post by: mimco93 on January 15, 2017, 07:56:59 PM
Hello,

I would like to ask whether it is possible to somehow get even "estimated time of arrival (ETA)." We had planned on the the Web have the following songs with time, in how they play. Unfortunately I was unable to figure out a way this time to pull on the website.  :(

Sorry for my English.  :)
thank you for answer
Best Regards
Lukas
Title: Re: Web Export NG plugin - Advanced web export
Post by: flybelgium on April 11, 2017, 12:21:29 PM
The link for download is not working.
Anyone have a good link ? Thx
Title: Re: Web Export NG plugin - Advanced web export
Post by: Jhonny on April 11, 2017, 01:47:27 PM
The owner of the site (site is down) where the download is, has not been around for some time.
Possible that there is no longer any more support for the plugin.
Title: Re: Web Export NG plugin - Advanced web export
Post by: DJ Garybaldy on April 11, 2017, 03:17:28 PM
QuoteThe owner of the site (site is down) where the download is, has not been around for some time.
Possible that there is no longer any more support for the plugin.

I guess this problem will be solved when Marius releases the next version, all the (abandonware) plugins will no longer work with the program...

Its a shame when someone takes the time to code a plugin, then disappears without a trace... I'd have a go at coding something but alas I wouldn't know where to start and with my dyslexia id be useless.

Title: Re: Web Export NG plugin - Advanced web export
Post by: marcbeinder on April 11, 2017, 05:19:24 PM
I hope this plugin doesn't become incompatible with the new version. It's a huge part of my programming.
Title: Re: Web Export NG plugin - Advanced web export
Post by: flybelgium on April 11, 2017, 06:59:15 PM
Quote from: DJ Garybaldy on April 11, 2017, 03:17:28 PM
I guess this problem will be solved when Marius releases the next version, all the (abandonware) plugins will no longer work with the program...

Its a shame when someone takes the time to code a plugin, then disappears without a trace... I'd have a go at coding something but alas I wouldn't know where to start and with my dyslexia id be useless.

Thank you all for reply :)
I hope the next version is coming soon...

It disappears, what the file is not on official Radio Dj website like archive plugin ?
Title: Re: Web Export NG plugin - Advanced web export
Post by: RFU on April 11, 2017, 08:35:31 PM
If someone has the plugin and can send it to me, I'll host it on my server for all to download
Title: Re: Web Export NG plugin - Advanced web export
Post by: Jhonny on April 12, 2017, 05:00:34 AM
Have them all.

HERE (http://dj-jhonny.nl/!Andy-downloads/index.php)
Title: Re: Web Export NG plugin - Advanced web export
Post by: RFU on April 12, 2017, 11:09:15 AM
 :ok:
Title: Re: Web Export NG plugin - Advanced web export
Post by: RFU on April 21, 2017, 02:59:06 AM
I can't get this to work

there's no instructions, so i'm just guessing

it's not sending anything to tunein and the error logs show

[2017-04-20 16:48:25Z]
Response status: NotFound from http://localhost/send-post/?partnerId=Bp3TXEW&partnerKey=fWiekZlUL&artist=Radio+Free+Ukraine&title=You're+Listening+to+Radio+Free+Ukraine
Response headers:
Content:
Title: Re: Web Export NG plugin - Advanced web export
Post by: marcbeinder on April 21, 2017, 03:02:32 AM
TuneIn Instructions:

http://tunein.com/broadcasters/api/
Title: Re: Web Export NG plugin - Advanced web export
Post by: RFU on April 21, 2017, 03:19:57 AM
i did that and it showed the first song, then an artist drop

then the artist drop wouldn't clear

now it's not showing anything on the tunein website or my tunein player
Title: Re: Web Export NG plugin - Advanced web export
Post by: marcbeinder on April 21, 2017, 03:36:56 AM
You're sending to localhost. You need to send to the website they tell you.
Title: Re: Web Export NG plugin - Advanced web export
Post by: RFU on April 21, 2017, 12:07:29 PM
i fixed that. please read the last post again