summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2005-08-18 16:49:50 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2005-08-18 16:49:50 +0000
commitebd39247d9e7a4eda49ac3410197de1e1a2f2457 (patch)
tree8cd483816d3fa8d514bc63e618e2073be132365f /bin
parentccf03a68e2584835fb4d6fe3a6bc2e2cc780ce8c (diff)
downloadampache-ebd39247d9e7a4eda49ac3410197de1e1a2f2457.tar.gz
ampache-ebd39247d9e7a4eda49ac3410197de1e1a2f2457.tar.bz2
ampache-ebd39247d9e7a4eda49ac3410197de1e1a2f2457.zip
few mpd style tweaks, new archive lib and a new print_tags
Diffstat (limited to 'bin')
-rw-r--r--bin/print_tags.php.inc38
1 files changed, 32 insertions, 6 deletions
diff --git a/bin/print_tags.php.inc b/bin/print_tags.php.inc
index 59edc534..d266a000 100644
--- a/bin/print_tags.php.inc
+++ b/bin/print_tags.php.inc
@@ -1,6 +1,9 @@
<?php
/*
+ Copyright 2001 - 2005 Ampache.org
+ All Rights Reserved
+
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
@@ -17,18 +20,41 @@
*/
+$no_session = '1';
+require ("../modules/init.php");
-/* Name of the filename who's tags you want to read */
-$filename = "/data/music/video1.avi";
+$filename = usage();
+echo "Reading: $filename\n";
-$no_session = '1';
-require ("../modules/init.php");
-echo "<pre>";
$info = new Audioinfo();
$results = $info->info($filename);
+$results['file'] = $filename;
+$key = get_tag_type($results);
+$ampache_results = clean_tag_info($results,$key,$filename);
-
+echo "Results Seen by GetID3()\n";
print_r($results);
+echo "\n------------------------------------------------------------------\n";
+echo "Results Seen by Ampache using $key\n";
+print_r($ampache_results);
+
+function usage( ) {
+ $text = _( "[print_tags.php.inc]
+This commandline script will display the tag information for the specified filename as it will
+appear to Ampache.
+ \n" );
+ echo $text;
+
+ $text = _( "Filename:" );
+ echo $text;
+
+ // grab a character ignoring whitespace
+ $input = trim(fgets(STDIN));
+
+ return $input;
+
+} // usage()
+
?>