| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- ;;; -*- Mode: Lisp; show-trailing-whitespace: t; Base: 10; indent-tabs: nil; Syntax: ANSI-Common-Lisp; Package: MP3-TAG; -*-
- ;;; Copyright (c) 2013, Mark VandenBrink. All rights reserved.
- (in-package #:mp3-tag)
- (defmethod album ((me mp3-file-stream))
- (let ((ret)
- (f (get-frame-info me (ecase (version (mp3-header me)) (2 "TAL") (3 "TALB") (4 "TALB")))))
- (if (not f)
- (if (v21-tag-header (mp3-header me))
- (setf ret (album (v21-tag-header (mp3-header me)))))
- (setf ret (info f)))
- ret))
- (defmethod artist ((me mp3-file-stream))
- (let ((f (get-frame-info me (ecase (version (mp3-header me)) (2 "TP1") (3 "TPE1") (4 "TPE1")))))
- (if f
- (info f)
- nil)))
- (defmethod album-artist ((me mp3-file-stream)) nil)
- (defmethod comment ((me mp3-file-stream)) nil)
- (defmethod composer ((me mp3-file-stream)) nil)
- (defmethod copyright ((me mp3-file-stream)) nil)
- (defmethod year ((me mp3-file-stream)) nil)
- (defmethod encoder ((me mp3-file-stream)) nil)
- (defmethod groups ((me mp3-file-stream)) nil)
- (defmethod lyrics ((me mp3-file-stream)) nil)
- (defmethod purchased-date ((me mp3-file-stream)) nil)
- (defmethod title ((me mp3-file-stream)) nil)
- (defmethod tool ((me mp3-file-stream)) nil)
- (defmethod writer ((me mp3-file-stream)) nil)
- (defmethod compilation ((me mp3-file-stream)) nil)
- (defmethod disk ((me mp3-file-stream)) nil)
- (defmethod tempo ((me mp3-file-stream)) nil)
- (defmethod genre ((me mp3-file-stream)) nil)
- (defmethod track ((me mp3-file-stream)) nil)
- (defmethod show-tags ((me mp3-file-stream) &key (raw nil))
- "Show the tags for an mp3-file"
- (if raw
- (format t "~a:~a~%" (stream-filename me) (mp3-frame:vpprint (audio-streams:mp3-header me) nil))
- (let ((album (album me))
- (album-artist (album-artist me))
- (artist (artist me))
- (comment (comment me))
- (compilation (compilation me))
- (composer (composer me))
- (copyright (copyright me))
- (disk (disk me))
- (encoder (encoder me))
- (genre (genre me))
- (groups (groups me))
- (lyrics (lyrics me))
- (purchased-date (purchased-date me))
- (tempo (tempo me))
- (title (title me))
- (tool (tool me))
- (track (track me))
- (writer (writer me))
- (year (year me)))
- (format t "~a~%" (stream-filename me))
- (when album (format t "~4talbum: ~a~%" album))
- (when album-artist (format t "~4talbum-artist: ~a~%" album-artist))
- (when artist (format t "~4tartist: ~a~%" artist))
- (when comment (format t "~4tcomment: ~a~%" comment))
- (format t "~4tcompilation: ~a~%" compilation)
- (when composer (format t "~4tcomposer: ~a~%" composer))
- (when copyright (format t "~4tcopyright: ~a~%" copyright))
- (when disk (format t "~4tdisk: ~a~%" disk))
- (when encoder (format t "~4tencoder: ~a~%" encoder))
- (when genre (format t "~4tgenre: ~a~%" genre))
- (when groups (format t "~4tgroups: ~a~%" groups))
- (when lyrics (format t "~4tlyrics: ~a~%" lyrics))
- (when purchased-date (format t "~4tpurchased date: ~a~%" purchased-date))
- (when tempo (format t "~4ttempo: ~a~%" tempo))
- (when title (format t "~4ttitle: ~a~%" title))
- (when tool (format t "~4ttool: ~a~%" tool))
- (when track (format t "~4ttrack: ~a~%" track))
- (when writer (format t "~4twriter: ~a~%" writer))
- (when year (format t "~4tyear: ~a~%" year)))))
|