summaryrefslogtreecommitdiffstats
path: root/lib/general.lib.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/general.lib.php')
-rw-r--r--lib/general.lib.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/general.lib.php b/lib/general.lib.php
index 085f33af..b8e8d1e8 100644
--- a/lib/general.lib.php
+++ b/lib/general.lib.php
@@ -932,4 +932,29 @@ return sprintf ("%d:%02d", $seconds/60, $seconds % 60);
} //format_time
+/**
+ * translate_pattern_code
+ * This just contains a key'd array which it checks against to give you the 'tag' name
+ * that said pattern code corrasponds to, it returns false if nothing is found
+ */
+function translate_pattern_code($code) {
+
+ $code_array = array('%A'=>'album',
+ '%a'=>'artist',
+ '%c'=>'comment',
+ '%g'=>'genre',
+ '%T'=>'track',
+ '%t'=>'title',
+ '%y'=>'year',
+ '%o'=>'zz_other');
+
+ if (isset($code_array[$code])) {
+ return $code_array[$code];
+ }
+
+
+ return false;
+
+} // translate_pattern_code
+
?>