Author Topic: new iTunes server for iTunes URLs causes fail in powerpress admin and ping  (Read 4755 times)

diablodale

  • Full Member
  • **
  • Posts: 14
I received from iTunes the following subscription URLs for my new podcast
http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=309251134
https://phobos.apple.com/WebObjects/MZFinance.woa/wa/pingPodcast?id=309251134

The code in powerpressadmin.php and powerpressadmin-basic.php will fail to work as expected because they are looking for an URL with substring "phobos.apple.com/WebObjects/MZStore.woa/wa/viewPodcast". The code looks for the server "phobos" rather than "itunes"

Looks to be an easy fix in the following:

powerpressadmin-basic.php============================
line 109 add another array entry for this new case, e.g.
              'http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=',

powerpressadmin.php=====================
line 918 has a comparison that doesn't cover all the possible URL cases. I changed it to the below to cover at least 3/5 of the cases:
   if( strpos($iTunes_url, '.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=' ) === false )

line 924 add another array entry fo rthis new case, e.g.
              'http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=',

angelo

  • CIO, RawVoice
  • Administrator
  • Hero Member
  • *****
  • Posts: 4483
I've added new logic to the plugin to solve this bug. I'm no longer checking the URL and simply looking for the id=XXXXXXXX. This change will be included in the 0.7.2 release.