diff --git a/admin/themes/admin/template_add_mp3.htm b/admin/themes/admin/template_add_mp3.htm index cc0680f..44e6595 100644 --- a/admin/themes/admin/template_add_mp3.htm +++ b/admin/themes/admin/template_add_mp3.htm @@ -3,7 +3,7 @@
- This is the MP3 file URL or a GoEar URL.
+ This is the MP3 file URL or a GoEar URL or Odeo URL.
(ie. http://www.goear.com/listen.php?v=c0a2c85)
diff --git a/classes/functions.php b/classes/functions.php index 1fd2f16..a54e577 100644 --- a/classes/functions.php +++ b/classes/functions.php @@ -50,6 +50,8 @@ if(!defined('entry') || !entry) die('Not a valid page'); } } elseif (isGoEar($remoteFileName)) { return true; + } elseif (isOdeo($remoteFileName)) { + return true; } else { return false; } @@ -69,6 +71,19 @@ if(!defined('entry') || !entry) die('Not a valid page'); return false; } + function isOdeo($songUrl){ + if (beginsWith($songUrl, "http://odeo.com/audio/") || beginsWith($songUrl, "http://www.odeo.com/audio/")) + return true; + else + return false; + } + + function getOdeoCode($songUrl) { + $params = explode("audio/", $songUrl); + $params2 = explode("/",$params[1]); + return $params2[0]; + } + function isImageFile($photoUrl) { if (endsWith($photoUrl, ".jpg")) { return true; } elseif (endsWith($photoUrl, ".gif")) { return true; } diff --git a/classes/gelato.class.php b/classes/gelato.class.php index a44903a..b796f18 100644 --- a/classes/gelato.class.php +++ b/classes/gelato.class.php @@ -181,6 +181,8 @@ class gelato extends Conexion_Mysql { return "\t\t\t\n"; } elseif (isGoEar($url)) { return "\t\t\t\n"; + } elseif (isOdeo($url)) { + return "\t\t\t\n"; } else { return "This URL is not an MP3 file."; }