To participate you must create an account on apostrophenow.org. If you have already done so, click Login.
Changeset 4535
- Timestamp:
- 02/02/12 10:12:58 (4 months ago)
- Author:
- tboutell
- Message:
-
Hit #1219 viddler broke when they switched abruptly to clean URLs with video IDs in them. This is better in the long run (no API call just to figure out what the video ID is from the URL, no need to cache the result of that call) but it broke a lot of stuff
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r4063
|
r4535
|
|
| 162 | 162 | $info['credit'] = (string) $result['author']; |
| 163 | 163 | $tags = array(); |
| 164 | | foreach ($result['tags'] as $tag) |
| 165 | | { |
| 166 | | if ($tag['type'] === 'global') |
| | 164 | if (isset($result['tags'])) |
| | 165 | { |
| | 166 | foreach ($result['tags'] as $tag) |
| 167 | 167 | { |
| 168 | | $tags[] = $tag['text']; |
| | 168 | if ($tag['type'] === 'global') |
| | 169 | { |
| | 170 | $tags[] = $tag['text']; |
| | 171 | } |
| 169 | 172 | } |
| 170 | 173 | } |
| … |
… |
|
| 205 | 208 | public function getIdFromUrl($url) |
| 206 | 209 | { |
| 207 | | // Viddler is atypical in that you cannot determine the id from the URL, |
| | 210 | // Newfangled viddler URLs have ids in them |
| | 211 | if (preg_match("/viddler.com\/v\/(\w+)$/", $url, $matches)) |
| | 212 | { |
| | 213 | $id = $matches[1]; |
| | 214 | return $id; |
| | 215 | } |
| | 216 | |
| | 217 | // OLD STYLE: Viddler is atypical in that you cannot determine the id from the URL, |
| 208 | 218 | // so let's ask them |
| 209 | 219 | if (preg_match("/viddler.com\/explore\//", $url)) |
Download in other formats: