diff options
author | Michael Vogel <icarus@dabo.de> | 2012-06-23 12:50:00 +0200 |
---|---|---|
committer | Michael Vogel <icarus@dabo.de> | 2012-06-23 12:50:00 +0200 |
commit | a81af2e042ae133bec3097488feeaa1318dc798b (patch) | |
tree | 25d2103fb3ce9edf45c0f7d1142b5cd3f63f8591 /include/Scrape.php | |
parent | 7a4ad4564dc4fa49aa860a10949ffe8958305f3a (diff) | |
parent | bf47bf5ba015a844919362a56903eb82c064bee9 (diff) | |
download | volse-hubzilla-a81af2e042ae133bec3097488feeaa1318dc798b.tar.gz volse-hubzilla-a81af2e042ae133bec3097488feeaa1318dc798b.tar.bz2 volse-hubzilla-a81af2e042ae133bec3097488feeaa1318dc798b.zip |
Merge remote branch 'upstream/master'
Conflicts:
include/bb2diaspora.php
Diffstat (limited to 'include/Scrape.php')
-rw-r--r-- | include/Scrape.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/Scrape.php b/include/Scrape.php index ca8f6e83a..4f53effe9 100644 --- a/include/Scrape.php +++ b/include/Scrape.php @@ -352,10 +352,11 @@ function probe_url($url, $mode = PROBE_NORMAL) { $email_conversant = false; $twitter = ((strpos($url,'twitter.com') !== false) ? true : false); + $lastfm = ((strpos($url,'last.fm/user') !== false) ? true : false); $at_addr = ((strpos($url,'@') !== false) ? true : false); - if(! $twitter) { + if((! $twitter) && (! $lastfm)) { if(strpos($url,'mailto:') !== false && $at_addr) { $url = str_replace('mailto:','',$url); @@ -564,6 +565,14 @@ function probe_url($url, $mode = PROBE_NORMAL) { $vcard['fn'] = $tid . '@twitter'; } + if($lastfm) { + $profile = $url; + $poll = str_replace(array('www.','last.fm/'),array('','ws.audioscrobbler.com/1.0/'),$url) . '/recenttracks.rss'; + $vcard['nick'] = basename($url); + $vcard['fn'] = $vcard['nick'] . t(' on Last.fm'); + $network = NETWORK_FEED; + } + if(! x($vcard,'fn')) if(x($vcard,'nick')) $vcard['fn'] = $vcard['nick']; |