summaryrefslogtreecommitdiffstats
path: root/src/itdb_itunesdb.c
Commit message (Collapse)AuthorAgeFilesLines
...
* 2005-11-28 Christophe Fergeau <teuf@gnome.org>Christophe Fergeau2005-11-281-0/+3
| | | | | | | | | | * src/itdb_artwork.c: (unpack_RGB_565), (get_pixel_data): * src/itdb_itunesdb.c: (get_mhod): * src/ithumb-writer.c: (pack_RGB_565), (ithumb_rearrange_thumbnail_file): added some paranoia checks before doing some mallocs to prevent potential int overflows in some mallocs which could be triggered by using forged iTunesDB files git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1181 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* New API for thumbnail support: see src/itdb.h for details.Jorg Schuler2005-11-281-4/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/itdb.h: Introduced Itdb_Artwork and ItdbThumbType and changed Itdb_Image to Itdb_Thumb throughout the source. * src/itdb_artwork.c: new file as backend for Itdb_Artwork support (new, free, duplicate, get_thumb_by_type, add_thumbnail, remove_thumbnail, remove_thumbnails), as well as for the Itdb_Thumb support (new, free, duplicate, get_gdk_pixbuf, get_filename) * src/itdb_track.c: new functions for artwork support (set_thumbnails, remove_thumbnails) * src/ithumb-writer.c: added support to write thumbnails in addition to existing thumbnails * src/db-artwork-parcer.c: (mhod3_get_ithmb_filename) * src/itdb_itunesdb.c: (update_artwork_info) * tests/test-covers.c: updated to new API. * tests/test-write-covers.c: updated to new API. Known issues: iTunes wipes off our thumbnails. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1180 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * overall changes to support itdb_image_get_gdk_pixbuf(). RunJorg Schuler2005-11-241-1/+1
| | | | | | "tests/test-thumbnails <ipod_mount> to copy all thumbnails into the current directory. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1172 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * itdb_itunesdb.c: (itdb_rename_files) also remove "iTunesShuffle"Jorg Schuler2005-11-191-1/+22
| | | | | as this file might confuse iPod Shuffles. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1155 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* 2005-11-15 Christophe Fergeau <teuf@gnome.org>Christophe Fergeau2005-11-151-1/+5
| | | | | | * src/itdb_itunesdb.c: (itdb_new): initialise glib type system before calling ipod_device_new (which creates a gobject) git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1151 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * src/itdb_itunesdb.c:Jorg Schuler2005-11-131-3/+9
| | | | | * src/itdb.h: split unk164 into flag1, flag2, flag3, and flag4. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1150 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * src/itdb_itunesdb.c: when new rating is set on the iPod,Jorg Schuler2005-11-131-3/+9
| | | | | | | backup the old rating to app_rating. Not sure what it's for, but iTunes seem to do it. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1149 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * src/itdb_itunesdb.c: (itdb_set_mountpoint) do not callJorg Schuler2005-11-121-18/+14
| | | | | | | | | itdb_device_new() with NULL pointer (no mountpoint == local repository) to avoid critical warning. * src/itdb.h src/itdb_itunesdb.c: change API for itdb_shuffle_write() to be identical to itdb_itunesdb_write() git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1147 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* 2005-11-04 Christophe Fergeau <teuf@gnome.org>Christophe Fergeau2005-11-041-5/+10
| | | | | | | | | | | | | * src/ipod-device.c: (ipod_device_new): * src/ipod-device.h: * src/itdb.h: * src/itdb_itunesdb.c: (itdb_free), (itdb_parse), (itdb_shuffle_write), (itdb_set_mountpoint): added an IpodDevice element to Itdb_iTunesDB. This makes it possible for libgpod to know the type (regular/nano/mini/video/...) of the iPod it's currently dealing with (which is necessary for proper cover art support for example) git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1139 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * itdb_itunesdb.c: used GUINTxx_TO/FROM_xE() instead of "#ifJorg Schuler2005-11-011-40/+14
| | | | | ..." constructions. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1134 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * itdb_itunesdb.c (get16lint): fixed bug affecting big endianJorg Schuler2005-10-311-4/+4
| | | | | systems. Thanks to Martin Aumueller for spotting this. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1131 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * itdb_itunesdb.c (get_mhip): fixed handling for iTunesDBJorg Schuler2005-10-251-5/+17
| | | | | versions 4.7 and smaller. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1130 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * itdb_itunesdb.c (itdb_parse): added comment, check for itdbJorg Schuler2005-10-251-14/+24
| | | | | | | | before calling ipod_pars_artwork_db() * db-artwork_parser.c (ipod_parse_artwork_db): added assertion to avoid segfault if called NULL parameter. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1129 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * (itdb_write): remove mountpoint as parameter as not used.Jorg Schuler2005-10-231-19/+8
| | | git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1128 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* 2005-10-17 Christophe Fergeau <teuf@gnome.org>Christophe Fergeau2005-10-171-1/+1
| | | | | | | | | | * src/db-image-parser.c: (get_pixel_data), (ipod_image_new_from_mhni): * src/itdb.h: * src/itdb_itunesdb.c: (get_mhod): Changed type of the various fields in the ItdbImage structures so that they match what they are in the database on the iPod. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1124 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* fixed 64 bit isssues (forgot one G_UINT_TO_POINTER)Jorg Schuler2005-10-151-15/+19
| | | git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1123 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * src/itdb_itunesdb.c,itdb_private.h: fixes for 64 bit systemsJorg Schuler2005-10-151-193/+266
| | | | | | | * src/ipod-device.c: fixes for 64 bit systems (patch provided by Bodo Bauer) * TROUBLESHOOTING: hint for 64 bit compilation git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1121 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* 2005-10-14 Christophe Fergeau <teuf@gnome.org>Christophe Fergeau2005-10-141-5/+2
| | | | | | | | | * src/itdb_itunesdb.c: (itdb_new): * src/itdb_playlist.c: (itdb_playlist_add): * src/itdb_track.c: (itdb_track_set_defaults): Use g_random_int instead of g_rand_int, this avoids a potential leak of the GRand seed used for g_rand_int. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1120 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* 2005-10-11 Christophe Fergeau <teuf@gnome.org>Christophe Fergeau2005-10-111-1/+1
| | | | | | * src/itdb_itunesdb.c: (get_mhip): added missing parameter to a g_warning call, this broke compilation on FC4 git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1116 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * bindings/python/gpod.i: applied Kelvin Lawson's patch to queryJorg Schuler2005-10-091-2/+2
| | | | | | | | | | | | | | | | integers. * src/ipod-device.[ch],hal-common.[ch],Makefile.am: code ported from libipoddevice to retrieve information about the iPod without libhal dependence. * tests/test-ipod-device.c: small script to show how to to query the iPod for information. * tests/Makefile.am: initialize <LIBS> with better default * configure.ac: add dependency for libgobject git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1113 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * Makefile.am: added bindings/... to EXTRA_DISTJorg Schuler2005-10-021-2/+5
| | | | | | | | | | | | | | | | | | | | | | * src/itdb.h, src/itdb_playlist.h, src/itdb_private.h: made enum ItdbPlType and enum ItdbPlFlag private and introduced itdb_playlist_set_mpl/_podcast() in addition to the existing itdb_playlist_is_mpl/_podcast() which make the public enums unecessary. * bumped to version 107 * src/ithumb-writer.c: itdb_write_ithumb_files (): commented out g_print() statement as this produced an empty line in gtkpod's warning window. * src/Makefile.am: GDKPIXPUF dependency solved inside source files -- db-artwork-writer-dummy.c no longer required. Now compiles with and without gdkpixbuf. * configure.ac: fixed error in AC_DEFINE_UNQUOTED(HAVE_GDKPIXBUF). * tests/test-covers.c: attached Flavio Stanchina size-patch git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1112 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * itdb.h, itdb_itunesdb.c, itdb_private.h: moved next_id fromJorg Schuler2005-09-271-12/+14
| | | | | | | | Itdb_iTunesDB to FExport. * bindings/phython/examples/tag-genrr-from-audioscrobber.py: added (thanks to Nicholas Piper) git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1104 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* 2005-09-27 Christophe Fergeau <teuf@gnome.org>Christophe Fergeau2005-09-271-3/+5
| | | | | | | | | | * src/itdb_itunesdb.c: (write_mhsd_tracks), (write_playlist_mhips), (write_podcast_mhips): move variable declaration before code to fix compilation * src/db-artwork-parser.c: (ipod_parse_artwork_db): * src/db-artwork-writer.c: (ipod_write_artwork_db): * src/ithumb-writer.c: (ithumb_writer_new): added some sanity checks git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1103 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * itdb.h/itdb_playlist.c: new functions: itdb_playlist_is_mpl()Jorg Schuler2005-09-241-9/+8
| | | | | | | | | | | | | and itdb_playlist_is_podcasts() * itdb_track.c: update itdb_track_duplicate() * itdb_itunesdb.c: read/write timestamp in playlists. Set timestamp if previously unset. * itdb_playlist.c: set timestamp when creating playlist, set timestamp when adding playlist and no timestamp was set. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1101 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * bindings/: added python bindings provided by Nicholas PiperJorg Schuler2005-09-231-479/+733
| | | | | | | | | | | | | | | | <nick at nickpiper co uk> * itdb.h: added enum ItdbPlFlag and Itdb_Playlist->podcastflag field. * itdb.h/itdb_itunesdb.c: added time_released field * itdb_itunesdb.c: rewrote write_playlist() for easier maintenance. * itdb_itunesdb.c: read/write support for podcast playlists including chapterdata (but only in raw format) git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1100 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * applied Christophe Fergeau's patch which adds cover art writingJorg Schuler2005-09-221-0/+9
| | | | | support to libgpod -> bump to version 104 git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1098 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* 2005-09-21 Jorg Schuler <jcsjcs at users.sourceforge.net>Jorg Schuler2005-09-211-173/+288
| | | | | | | * itdb_itunesdb.c: streamline parse_fimp() for more flexibility. Please report if formerly readable iTunesDB cannot be read any more :-/ git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1097 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* release of 0.1.3Jorg Schuler2005-09-201-3/+3
| | | git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1095 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * read iTunesStats file if present (corresponds to Play CountsJorg Schuler2005-09-191-20/+127
| | | | | file on the Shuffle). git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1094 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * applied patch provided by Christophe Fergeau <teuf at gnome.org>Jorg Schuler2005-09-191-0/+15
| | | | | for artwork database support (read-only). git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1093 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* 2005-09-17 Jorg Schuler <jcsjcs at users.sourceforge.net>Jorg Schuler2005-09-191-148/+342
| | | | | | | | | | * added additional fields to Itdb_Track that are present since version 0x0c of the iTunesDB. Write long mhit version. 2005-09-17 Jorg Schuler <jcsjcs at users.sourceforge.net> * renamed fdesc to filetype git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1092 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * itdb.h/itdb_itunesdb.c: changed 'static voidJorg Schuler2005-09-161-21/+25
| | | | | itdb_count_musicdirs()' to 'gint itdb_musicdirs_number()' git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1090 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * itdb_itunesdb: changed API for itdb_filename_on_ipod ()Jorg Schuler2005-09-131-10/+91
| | | | | | | | | * itdb.h: added 'gint musicdirs' to Itdb_iTunesDB (number of F.. dirs available) * itdb_itunesdb: itdb_cp_track_to_ipod() will now determine the number of available F.. dirs before copying by calling new function itdb_count_musicdirs() git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1088 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* 2005-09-10 Christophe Fergeau <teuf@gnome.org>Christophe Fergeau2005-09-101-7/+12
| | | | | | | | | | | * configure.ac: * src/itdb_itunesdb.c: (get_mhod_type), (get_mhod), (get_mhod_string), (get_playlist), (get_mhit), (itdb_shuffle_write_file): * src/itdb_playlist.c: (itdb_spl_update_all): * tests/itdb_main.c: (main): fixed compilation warnings to be able to compile with -Werror git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1082 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* Initial importChristophe Fergeau2005-09-101-0/+3622
git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1080 f01d2545-417e-4e96-918e-98f8d0dbbcb6