[mythtv] [mythmusic][PATCH]supply track number for unknown CDs

Leo Weppelman leo at wau.mis.ah.nl
Thu Jun 23 07:58:54 UTC 2005


Attached is a litte patch that generates a title like 'Track %d' for
tracks on a CD unknown to the freeDB.
And yes, such CDs exist - I make them myself ;-)


PS: I'd like to plug the Autoplay-patch for audio CDs from Herman
Kuiper. I hate to see this fall throught the cracks. It can be found at:
http://www.gossamer-threads.com/lists/mythtv/dev/130604?search_string=mythmusic%3A%20autoplay%20of%20CDs;#130604

Leo.
-------------- next part --------------
Index: cddecoder.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythplugins/mythmusic/mythmusic/cddecoder.cpp,v
retrieving revision 1.24
diff -u -r1.24 cddecoder.cpp
--- cddecoder.cpp	23 Feb 2005 20:41:07 -0000	1.24
+++ cddecoder.cpp	23 Jun 2005 06:57:01 -0000
@@ -417,6 +417,9 @@
       artist = compilation_artist;
       compilation_artist = "";
     }
+    if (title.length() < 1) {
+        title.sprintf("Track %d", tracknum); // Better than nothing!
+    }
     
     cddb_write_data(cd, &discdata);
 


More information about the mythtv-dev mailing list