summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJorg Schuler <jcsjcs@users.sourceforge.net>2007-03-21 08:16:17 +0000
committerJorg Schuler <jcsjcs@users.sourceforge.net>2007-03-21 08:16:17 +0000
commit81305d8db278cb3c43bbf43cd280ce989a79cced (patch)
tree572602d309094f9526a367b7c46fac4585eaa79d
parent96bcaf5268be42578f4406df9478ce365d263562 (diff)
downloadlibgpod-81305d8db278cb3c43bbf43cd280ce989a79cced.tar.gz
libgpod-81305d8db278cb3c43bbf43cd280ce989a79cced.tar.xz
libgpod-81305d8db278cb3c43bbf43cd280ce989a79cced.zip
* src/itdb_itunesdb.c (itdb_cp_track_to_ipod): cast filename
extension to lowercase because some people reported new iPod models choking on filenames with uppercase extensions like test.MP3. Not sure if it helps, though. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1404 f01d2545-417e-4e96-918e-98f8d0dbbcb6
-rw-r--r--ChangeLog5
-rw-r--r--docs/reference/tmpl/track.sgml12
-rw-r--r--src/itdb_itunesdb.c9
3 files changed, 24 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index a0d9b39..4654f52 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,11 @@
with all other _remove functions in libgpod and caused a memory
hole.
+ * src/itdb_itunesdb.c (itdb_cp_track_to_ipod): cast filename
+ extension to lowercase because some people reported new iPod
+ models choking on filenames with uppercase extensions like
+ test.MP3. Not sure if it helps, though.
+
2007-03-02 Todd Zullinger <tmzullinger at users.sourceforge.net>
* bindings/Makefile.am: only descend into the python subdir if
diff --git a/docs/reference/tmpl/track.sgml b/docs/reference/tmpl/track.sgml
index 860c98c..162b608 100644
--- a/docs/reference/tmpl/track.sgml
+++ b/docs/reference/tmpl/track.sgml
@@ -129,6 +129,18 @@ information about an iPod track.
@userdata_duplicate:
@userdata_destroy:
+<!-- ##### ENUM Itdb_Mediatype ##### -->
+<para>
+
+</para>
+
+@ITDB_MEDIATYPE_AUDIO:
+@ITDB_MEDIATYPE_MOVIE:
+@ITDB_MEDIATYPE_PODCAST:
+@ITDB_MEDIATYPE_AUDIOBOOK:
+@ITDB_MEDIATYPE_MUSICVIDEO:
+@ITDB_MEDIATYPE_TVSHOW:
+
<!-- ##### FUNCTION itdb_track_new ##### -->
<para>
diff --git a/src/itdb_itunesdb.c b/src/itdb_itunesdb.c
index 0eee805..ae2ef40 100644
--- a/src/itdb_itunesdb.c
+++ b/src/itdb_itunesdb.c
@@ -1,4 +1,4 @@
-/* Time-stamp: <2007-02-25 11:54:25 jcs>
+/* Time-stamp: <2007-03-20 22:58:14 jcs>
|
| Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
| Part of the gtkpod project.
@@ -5111,6 +5111,10 @@ gboolean itdb_cp_track_to_ipod (Itdb_Track *track,
string. Note: the iPod will most certainly ignore this file... */
if (!original_suffix) original_suffix = "";
+ /* use lower-case version of extension as some iPods seem to
+ choke on upper-case extension. */
+ original_suffix = g_ascii_strdown (original_suffix, -1);
+
/* set filetype from the suffix, e.g. '.mp3' -> 'MP3 ' */
track->filetype_marker = 0;
for (i=1; i<=4; ++i) /* start with i=1 to skip the '.' */
@@ -5119,7 +5123,7 @@ gboolean itdb_cp_track_to_ipod (Itdb_Track *track,
if (strlen (original_suffix) > i)
track->filetype_marker |= g_ascii_toupper (original_suffix[i]);
else
- track->filetype_marker |= g_ascii_toupper (' ');
+ track->filetype_marker |= ' ';
}
do
{ /* we need to loop until we find an unused filename */
@@ -5144,6 +5148,7 @@ gboolean itdb_cp_track_to_ipod (Itdb_Track *track,
} while (!ipod_fullfile);
g_free(parent_dir_filename);
g_free (music_dir);
+ g_free (original_suffix);
}
/* now extract filepath for track->ipod_path from ipod_fullfile */
/* ipod_path must begin with a '/' */