| @@ 211-218 (lines=8) @@ | ||
| 208 | if (strtolower($parsedURL['path']) == '/watch') { |
|
| 209 | $parsedQuery = explode('&', $parsedURL['query']); |
|
| 210 | // Find v= |
|
| 211 | foreach ($parsedQuery as $v) { |
|
| 212 | if (substr(strtolower($v), 0, 2) == 'v=') { |
|
| 213 | $this->type = static::TYPE_VIDEO; |
|
| 214 | $this->id = substr($v, 2); |
|
| 215 | ||
| 216 | return $this; |
|
| 217 | } |
|
| 218 | } |
|
| 219 | } |
|
| 220 | ||
| 221 | // check for /v/ |
|
| @@ 263-270 (lines=8) @@ | ||
| 260 | ||
| 261 | $parsedQuery = explode('&', $parsedURL['query']); |
|
| 262 | // Find list= |
|
| 263 | foreach ($parsedQuery as $v) { |
|
| 264 | if (substr(strtolower($v), 0, 5) == 'list=') { |
|
| 265 | $this->type = static::TYPE_PLAYLIST; |
|
| 266 | $this->id = substr($v, 5); |
|
| 267 | ||
| 268 | return $this->cookies()->theme(static::THEME_LIGHT); |
|
| 269 | } |
|
| 270 | } |
|
| 271 | ||
| 272 | // If we don't find list=, then its not a playlist. |
|
| 273 | $this->source = $oldSource; |
|