[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gnupod] DESC field in iTunesDB
From: |
Richard van den Berg |
Subject: |
[Bug-gnupod] DESC field in iTunesDB |
Date: |
Wed, 06 May 2009 20:57:23 +0200 |
User-agent: |
Thunderbird 2.0.0.21 (Macintosh/20090302) |
When I first started ripping all my CDs I made the decision that the ID3
genre field was too limiting, so I split my collection into different
directories named after genres and/or source of the CDs
(wife/brother/daughter). I have generated several m3u playlists using
these directory names. Now that I switched to the iPod, this information
is no longer available to me. So I started to look for a field in the
iTunesDB that I could use for that purpose. The FDESC and DESC fields
fit rather nicely. FDESC has a width of 15 characters which is enough
for me today, but could be limiting in the future. So I patched
FileMagic.pm to place the full pathname of the mp3 into the DESC field.
I realize that this is a patch for personal purposes, but looking at
what the DESC field is used for now I wonder if it has a real purpose:
rh{desc} = __merge_strings({joinby => " ", wspace => "norm", case
=> "ignore"},($hs->{USLT} || $hs->{ULT}),($nonitunescomment ||
$h->{COMMENT}));
It joins the USLT or ULT field (which are used for lyrics) with the
$nonitunescomment (which is the ID3v2 COMM field with the iTun* fields
stripped) or ID3v1 comment. The comments are already stored in the
iTunesDB in the COMMENT field. Storing lyrics doesn't seem to make much
sense since the field is only 40 characters wide.
Maybe my patch is not so bad to be applied for everyone? (If so, the
nonitunescomment code can also be discarded.)
Regards,
Richard
--- FileMagic.pm.org 2009-04-25 14:43:31.000000000 +0200
+++ FileMagic.pm 2009-04-29 16:49:38.000000000 +0200
@@ -23,6 +23,7 @@
use strict;
use Unicode::String;
use MP3::Info qw(:all);
+use File::Spec;
use GNUpod::FooBar;
use GNUpod::QTfile;
@@ -516,7 +517,7 @@
$rh{artist} = ($hs->{TPE1} || $hs->{TP1} || $hs->{TPE2} ||
$hs->{TP2} || $h->{ARTIST} || "Unknown Artist");
$rh{genre} = _get_genre($hs->{TCON} || $hs->{TCO} || $h->{GENRE}
|| "");
$rh{comment} = ($hs->{COMM} || $hs->{COM} || $h->{COMMENT} || "");
- $rh{desc} = __merge_strings({joinby => " ", wspace => "norm",
case => "ignore"},($hs->{USLT} || $hs->{ULT}),($nonitunescomment ||
$h->{COMMENT}));
+ $rh{desc} = File::Spec->rel2abs($file);
$rh{composer} = ($hs->{TCOM} || $hs->{TCM} || "");
$rh{playcount} = int($hs->{PCNT} || $hs->{CNT}) || 0;
if($hs->{REPLAYGAIN_TRACK_GAIN} ne "") {
- [Bug-gnupod] DESC field in iTunesDB,
Richard van den Berg <=
- Re: [Bug-gnupod] DESC field in iTunesDB, H. Langos, 2009/05/07
- Re: [Bug-gnupod] DESC field in iTunesDB, Richard van den Berg, 2009/05/07
- Re: [Bug-gnupod] DESC field in iTunesDB, H. Langos, 2009/05/08
- Re: [Bug-gnupod] DESC field in iTunesDB, Richard van den Berg, 2009/05/08
- Re: [Bug-gnupod] DESC field in iTunesDB, H. Langos, 2009/05/09
- Re: [Bug-gnupod] DESC field in iTunesDB, Richard van den Berg, 2009/05/09
- Re: [Bug-gnupod] DESC field in iTunesDB / lyrics display, H. Langos, 2009/05/09
- Re: [Bug-gnupod] DESC field in iTunesDB / lyrics display, Richard van den Berg, 2009/05/10
- Re: [Bug-gnupod] DESC field in iTunesDB / lyrics display, Richard van den Berg, 2009/05/10
- Re: [Bug-gnupod] DESC field in iTunesDB / lyrics display, H. Langos, 2009/05/10