Author Topic: Web Exporter is having issues  (Read 1247 times)

HMC

  • Full Member

  • Offline
  • ***
  • 181
Web Exporter is having issues
« on: July 10, 2014, 06:28:31 AM »
I got web exporter working but sometimes it doesn't send a post. I don't know why it just randomly send anything. I have the wordpress plugin and made so that everytime it posts, I update the playing track with Ajax so you don't have to refresh the page. 90% of the time it works. But sometimes it doesn't and previous song is still showing. The when the next song comes on it sends the update. I know it's the web exporter and not my ajax call because the current.txt file still has the previous song in it so it didn't update the file which is what I read with PHP.

Any ideas why this is intermittent? I don't think it's my php file because the fist thing it does it update the text file and then it does other stuff, so it's not blocking that process. And if it was, it wouldn't work for other songs.

Does RDJ have to be restarted often? I've closed it with the last day or two and I'm using almost no ram of 16GB. I don't think it'd be resource issue.
Radio DJ 1.7.5 Update with MariaDB 10

HMC

  • Full Member

  • Offline
  • ***
  • 181
Re: Web Exporter is having issues
« Reply #1 on: July 10, 2014, 09:36:14 AM »
I've narrowed down to it being songs with apostrophes in it. I don't know why that would prevent it from writing to the text file. I'm still testing. Any suggestions welcomed.
Radio DJ 1.7.5 Update with MariaDB 10

AndyDeGroo

  • Guest
Re: Web Exporter is having issues
« Reply #2 on: July 10, 2014, 03:16:15 PM »
I don't see any problems with apostrophes. Must be related to how you write your file.
You could use Fiddler to see what RadioDJ sends in web export requests.

I see one glitch in web export - in "Florence + the Machine" it doesn't urlencode plus "+" and it is converted to space in PHP leading to "Florence   the Machine".

HMC

  • Full Member

  • Offline
  • ***
  • 181
Re: Web Exporter is having issues
« Reply #3 on: July 11, 2014, 05:34:51 AM »
Thanks forgot about fiddler to inspect the headers, I have it on my computer but not my server. Anyway, I thought it was things with apostrophes but it didn't make since to me either. I couldn't think of anything that would cause that. I thought maybe it's something with fwrite. I am now trying file_put_contents even though it's just a wrapper for fopen() etc but it's one function instead of 3 commands. I believe its slightly slower too but not noticeable with such small strings.

I'll keep monitoring it, but can't figure out why it just doesn't write to the file every now and then. So it appears it's sending the data, so I RDJ appears to be doing it's job.  :)  I hate weird oddities. LOL
Radio DJ 1.7.5 Update with MariaDB 10