summaryrefslogtreecommitdiffstats
path: root/src/itdb.h
Commit message (Collapse)AuthorAgeFilesLines
* Document Itdb_Track->album_idTodd Zullinger2009-01-031-0/+2
| | | | git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@2193 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* Add Itdb_Track::album_id to prevent future ABI breakageChristophe Fergeau2009-01-011-0/+1
| | | | git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@2186 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* Update API documentationTodd Zullinger2008-12-081-438/+1122
| | | | | | | Add new functions and missing enums, macros, and structs to the proper places in the documentation, remove old/unused functions, and clean up various minor issues. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@2159 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* Whitespace cleanupTodd Zullinger2008-12-081-1/+1
| | | | | | This just cleans up some minor whitespace issues to make diffing and merging slightly nicer. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@2158 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* Remove chapterdata_raw and chapterdata_raw_length from Itdb_TrackTodd Zullinger2008-11-141-8/+0
| | | | | | These are no longer needed now that proper Chapter Data support is available (since svn revision 1936/1937). git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@2150 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * src/itdb.h: add enum entries for the new ipod classic and the newChristophe Fergeau2008-10-011-0/+5
| | | | | | | nanos * src/itdb_device.c: add entries for the new nanos and the new ipod classic, add some serial numbers for older ipod models git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@2127 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* 2008-08-09 Paul Richardson <phantom_sf at users.sourceforge.net>P.G. Richardson2008-08-091-0/+1
| | | | | | | | | | | | * Added eclipse project related files to svn:ignore * src/db-artwork-parser.c src/itdb.h src/itdb_photoalbum.c: Added to Itdb_PhotoAlbum, a reference to its parent Photo DB. When albums are constructed upon loading of the Photo DB, the reference is added as part of initialisation. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@2096 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* Rename unk146 to explicit_flag in Itdb_Track now that it's purpose is knownTodd Zullinger2008-07-301-2/+3
| | | git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@2073 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* Some public API work, hide ItdbThumbType as well as ItdbThumbIpodChristophe Fergeau2008-07-291-12/+3
| | | git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@2070 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* Remove references to itdb_thumb_get_gdk_pixbuf()Todd Zullinger2008-07-171-9/+6
| | | git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@2050 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* Add missing 2GB ipod shuffle models and ipod shuffle redChristophe Fergeau2008-07-061-0/+1
| | | git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@2042 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * src/db-artwork-writer.c:Christophe Fergeau2008-06-091-15/+0
| | | | | | | | | | | * src/db-image-parser.h: * src/itdb.h: * src/itdb_device.c: * src/itdb_device.h: * src/ithumb-writer.c: get rid of ItdbThumbType, it's replaced by pointers to the appropriate Itdb_ArtworkFormat for the thumbnail type when it's needed git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@2010 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * src/db-artwork-parser.c: remove duplicated artwork/photo supportChristophe Fergeau2008-06-091-7/+6
| | | | | | | | | | | | | | | | | | | | | testing functions * src/db-artwork-parser.h: ditto * src/itdb_itunesdb.c: s/ipod_supports_XXX/itdb_device_supports_XXX * src/itdb_photoalbum.c: ditto * src/itdb.h: use a const Itdb_Device argument for itdb_device_supports_*, add ITDB_IPOD_GENERATION_IPHONE_1 to Itdb_IpodGeneration, get rid of ITDB_IPOD_GENERATION_FIFTH and ITDB_IPOD_GENERATION_SIXTH * src/itdb_device.c: split functions to get artwork format from the ipod in 2 separate functions: instead of itdb_device_get_artwork_formats we now have itdb_device_get_photo_formats and itdb_device_get_cover_art_formats * src/itdb_device.h: * src/db-image-parser.c: use the separate get_cover_art_formats/get_photos_formats functions * src/db-artwork-writer.c: ditto * src/ithumb-writer.c: ditto git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@2009 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * src/Makefile.am:Christophe Fergeau2008-05-301-55/+20
| | | | | | | | | | | | | | | | | | | | | | | * src/db-artwork-parser.c: * src/db-artwork-writer.c: * src/db-image-parser.c: * src/db-image-parser.h: * src/itdb.h: * src/itdb_artwork.c: * src/itdb_device.h: * src/itdb_photoalbum.c: * src/itdb_track.c: * src/ithumb-writer.c: * tests/test-covers.c: * tests/test-photos.c: rework Itdb_Thumb type. Now it's split into different subtypes depending on what it represents (GdkPixbuf, thumbnail read from the ipod, ...). Itdb_Artwork now contains only a pointer to a single Itdb_Thumb (it used to contain a GList * of Itdb_Thumb) since the only time when the list is useful is for thumbs read from the ipod. Using a list for the other types of thumbnails created some complications when trying to set art on an Itdb_Track that wasn't attached to an Itdb_iTunesDB. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1991 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * src/itdb_track.c (itdb_track_set_thumbnails_internal): setJorg Schuler2008-05-281-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | artwork ID to 0 after removing thumbnails. * src/db-artwork-parser.c (parse_mhii): move out dbid association to a separate function. (mhfd_associate_itunesdb_artwork): handle dbid and mhii_link association of artwork to track (parse_mhfd): loop over the number of mhsd hunks instead of hardcoding it. Call mhfd_associate_itunesdb_artwork(). * src/itdb_itunesdb.c (get_mhit): read the mhii_link field. * src/db-artwork-writer.c (write_mhli): handle unset artwork correctly. (itdb_track_filter_thumbnails): remove thumbnails correctly. * src/db-parse-context.c (db_parse_context_get_sub_context): copy newly introduced artwork field. * tests/test-covers.c: print mhii_link. * src/itdb.h: (Itdb_Track) added mhii_link. (Itdb_Artwork): added dbid. * src/itdb.h, src/db-artwork-parser.c, src/db-artwork-writer.c, src/itdb_device.c, src/ithumb-writer.c, src/itdb_artwork.c: added ITDB_THUMB_CHAPTER_SMALL/LARGE. * src/itdb_device.c: ipod_classic_1_artwork_info: correct ITDB_THUMB_COVER_SMALL/LARGE entries. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1985 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * src/itdb_track.cJorg Schuler2008-01-261-1/+46
| | | | | | | | | * src/itdb_itunesdb.c * src/itdb_chapterdata * src/itdb.h * src/Makefile.am: applied chapterdata patch by Michael Tiffany. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1936 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* Added support for video output of photos for iPod Nano Videos andJorg Schuler2007-11-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | iPod Classics. * src/ithumb-writer.c (pack_I420): added packer for iPod Nano Video and iPod Classic TV output photo format. (itdb_write_ithumb_files): make sure only valid thumbnail types are written. * src/db-image-parser.h: added declaration for itdb_thumb_type_is_valid_for_db() * src/itdb_photoalbum.c (itdb_photodb_add_photo_internal): make sure only photo thumbnails are added. * src/db-artwork-writer.c (write_mhii): correctly skip unneeded thumbnails (thumbnails not relevant for the current iPod type). (should_write): renamed to itdb_thumb_type_is_valid_for_db() src/itdb.h src/itdb_artwork.c: minor formatting. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1753 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * src/itdb_device.c:Jorg Schuler2007-09-151-2/+26
| | | | | | | | | | | | | | | | | | | Re-organized the representation of iPod models -- instead of 1st to 7th generation more well-known names like "iPod Nano 1G", "iPod Nano 2G"... are used. Added untested support for iPod Classic Artwork. Not clear which thumbnail type is used for what. src/itdb_track.c (itdb_track_set_thumbnails_internal): Please note: itdb_track_set_thumbnails() needs to be thought over to make sure all thumbnail types are added properly. Please see note in itdb_track.c for details. src/itdb.h: Added symbols for the new representation indicated above: ITDB_IPOD_GENERATION_*, ITDB_IPOD_MODEL_* git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1695 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * src/db-image-parser.cJorg Schuler2007-09-081-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | src/itdb_device.c src/ithumb-writer.c src/db-image-parser.h src/itdb_device.h src/itdb.h src/itdb_artwork.c tests/test-covers.c: added support to read and write coverart on iPhones. New cover formats are: MEDIUM, XLARGE, XSMALL, SMEDIUM -- should be renamed if function becomes clearer. Introduced New image formats for the thumbnails (THUMB_FORMAT_RGB555, THUMB_FORMAT_REC_RGB555). Coding/decoding functions are pack_/unpack_RGB_555() and pack_/unpack_REC_RGB_555(). Introduced possible padding for thumbnail files (Itdb_ArtworkFormat). * src/db-artwork-parser.c: make output filename unique. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1691 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * itdb_itunesdb.c (itdb_get_control_dir):Jorg Schuler2007-09-041-1/+2
| | | | | | | | | | | | | added support for iPhones * itdb.h: added ITDB_IPOD_MODEL_IPHONE_1 enum * itdb_device.c: added iPhone description TODO: define artwork definition in itdb_device.c -- currently artwork is not supported. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1690 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* remove references to Mac type timestampsTodd Zullinger2007-07-051-14/+12
| | | git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1623 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * src/itdb.h: corrected description for "BPM" (beats per minute)Jorg Schuler2007-06-171-1/+1
| | | git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1552 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * src/itdb_itunesdb.cJorg Schuler2007-06-171-16/+15
| | | | | | | | | | | src/itdb.h: libgpod will not change the values for sort_artist. Furthermore, libgpod reads the stored values of sort_artist/_album... from the iTunesDB and makes them available through the Itdb_Track structure. Applications should modify these values along with the corresponding artist/album... fields if a particular sort order is required. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1549 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * src/itdb.h: warning about adding string fieldsJorg Schuler2007-05-171-0/+5
| | | | | | src/itdb_track_duplicate: duplicate new string fields (sort_*). Thanks to Raymond Walsh. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1435 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* Minor documentation cleanups.Todd Zullinger2007-05-121-0/+2
| | | git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1430 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * src/itdb_itunesdb.cJorg Schuler2007-05-061-7/+15
| | | | | | | | | | | | | | | | | | | | | src/itdb_device.c src/itdb_private.h src/itdb.h: New API functions to facilitate copying to the iPod in a background thread and implementation of own copying code. itdb_cp_get_dest_filename(): obtain a valid filename on the iPod to where a track can be copied. This function can be used in a thread-safe way. itdb_cp_finalize(): to be called after the track was copied to the iPod to update some fields in the Itdb_Track structure. This function can also be used in a thread-safe way. You can use the already existing function itdb_cp() to copy a track to the iPod and itdb_cp_track_to_ipod() remains available unchanged in functionality. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1426 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * docs/reference/tmpl/track.sgmlJorg Schuler2007-04-281-47/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/itdb.h src/itdb_itunesdb.c src/itdb_track.c: Added the following fields to Itdb_Track: sort_artist sort_title sort_album sort_albumartist sort_composer sort_tvshow These fields can (theoretically) be used to force a certain sort order on the iPod when displaying by artist, album... Even though these fields are present in the iTunesDB, they are discarded when reading the iTunesDB and applications must always set them before writing the iTunesDB again. This is to avoid that the fields 'artist' and 'sort_artist' accidentially get out of sync. libgpod will automatically create a sort_artist key for you if artist is of the type 'The Artist' and sort_artist is not set. The sort key used in that case is 'Artist, The' (followed by five time 0x01), even though sort_artist itself will not be touched. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1421 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * src/itdb.h: added padding to exported structures so new entriesJorg Schuler2007-04-281-18/+76
| | | | | | | can be added without loosing backward run-time compatibility. Comments welcome. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1420 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * src/itdb.hJorg Schuler2007-04-271-147/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/itdb_itunesdb.c src/itdb_playlist.c src/itdb_private.h: namespace cleanup. Applications supporting smart playlists will have to be adapted. The following changes were implemented to make sure all exported symbols start with ITDB or Itdb: structs: SPLPref -> Itdb_SPLPref SPLRules -> Itdb_SPLRules SPLRule -> Itdb_SPLRule SPL_* -> ITDB_SPL_* enums, #defines: LIMITTYPE_* -> ITDB_LIMITTYPE_* LIMITSORT_* -> ITDB_LIMITSORT_* SPLMATCH_* -> ITDB_SPLMATCH_* SPLACTION_* -> ITDB_SPLACTION_* SPLFIELD_* -> ITDB_SPLFIELD_* SPLDATE_IDENTIFIER -> ITDB_SPL_DATE_IDENTIFIER splft_* -> ITDB_SPLFT_* splat_* -> ITDB_SPLAT_* enum SPLAction -> ItdbSPLAction enum SPLActionType -> ItdbSPLActionType enum SPLField -> ItdbSPLField enum SPLFieldType -> ItdbSPLFieldType enum ItdbLimitType (new) enum ItdbLimitSort (new) enum ItdbSPLMatch (new) removed SPL_MAXSTRINGLENGTH (use ITDB_SPL_STRING_MAXLEN) git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1418 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * docs/reference/tmpl/device.sgmlJorg Schuler2007-04-271-15/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | docs/reference/tmpl/itunesdb-time.sgml docs/reference/tmpl/libgpod-unused.sgml docs/reference/tmpl/track.sgml src/db-artwork-parser.c src/db-artwork-writer.c src/db-itunes-parser.h src/itdb.h src/itdb_device.c src/itdb_device.h src/itdb_itunesdb.c src/itdb_private.h tests/Makefile.am: Christophe's patch for automatic correction of timestamps depending on which timezone the iPod is set to. ATTENTION DEVELOPERS: as a consequence all exported timestamps are no longer guint32 mac-type timestamps but standard time_t timestamps. This also includes the 64 bit timestamps in smart playlists. The following functions are therefore no longer needed and are deprecated: itdb_time_mac_to_host(), itdb_time_host_to_mac(): simply return the argument without changing it. Argument and return value are now both of type 'time_t'. itunesdb_time_get_mac_time(): returns the seconds passed since Epoch in seconds and is equivalent to time(NULL). These functions may be removed in a future version of libgpod. Programs linking to libgpod may need to be changed slightly if they made any assumptions on the type of timestamps used. This should be obvious through compile-time warnings. tests/test-ls.c: print a list of recently played tracks. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1417 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* 2007-04-14 Christophe Fergeau <teuf@gnome.org>Christophe Fergeau2007-04-141-0/+2
| | | | | | | | | * src/itdb_device.c: add itdb_device_supports_artwork and idb_device_supports_photo functions * docs/reference/tmpl/device.sgml: update api doc * src/itdb_itunesdb.c: don't try to write artwork database if the iPod model doesn't support artwork. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1414 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * src/itdb.h: changed 'gchar *chapterdata' to 'gpointerJorg Schuler2007-04-081-3/+2
| | | | | | | | chapterdata' with note that chapterdata is not yet supported. * src/itdb_track.c (itdb_track_duplicate): arrange the strings in the same order as in Itdb_Track for easier error-checking. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1413 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * src/itdb.hJorg Schuler2007-03-211-0/+14
| | | | | | | | | | | | src/itdb_artwork.c src/itdb_photoalbum.c src/itdb_track.c src/ithumb-writer.c: Added new API functions: itdb_photodb_add_photo_from_pixbuf function(), itdb_track_set_thumbnails_from_pixbuf() and itdb_artwork_add_thumbnail_from_pixbuf(). Thanks to Christophe Fergeau. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1405 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * src/itdb.hJorg Schuler2007-02-251-2/+14
| | | | | | | | | | | | | src/itdb_itunesdb.c src/itdb_playlist.c: introduced splft_binary_and as separate field type as this will simplify handling in applications. * src/itdb_itunesdb.c (get_mhod, mk_mhod): replaced if()... with a switch()... to catch changes made to SPLFieldType more easily. * src/itdb.h: introduced Itdb_Mediatype enum. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1398 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * src/itdb.hJorg Schuler2007-02-241-5/+13
| | | | | | | | | src/itdb_itunesdb.c src/itdb_playlist.c: Updated smart playlist handling to recognize album artist, tv show, last skipped, season number, skipcount and video kind fields. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1396 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * src/itdb.hJorg Schuler2007-01-181-2/+2
| | | | | | src/itdb_itunesdb.c (itdb_cp_track_to_ipod): changed declaration of 'filename' from "gchar *" to "const gchar *". git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1389 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* Add PhotoDB functions to the docs.Todd Zullinger2007-01-111-1/+1
| | | | | | Incorporate usage overviews from README into the docs. Fix a few doc comments to allow gtk-doc to parse them. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1356 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* applied Todd Zullinger's patch fixing warnings when building the documentationJorg Schuler2007-01-101-1/+1
| | | git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1355 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * src/itdb.hJorg Schuler2007-01-091-1/+9
| | | | | | | src/itdb_itunesdb.c: added tvshow, tvepisode, tvnetwork, albumartist, keywords, reseved to Itdb_Track. 'reserved' can later be used to support 'Artist, The'. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1353 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * src/itdb.h: added 2 pointers for future extension toJorg Schuler2007-01-081-1/+3
| | | | | Itdb_Playlist (MHOD100). git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1351 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * tests/Makefile.am: cleanupJorg Schuler2007-01-081-3/+20
| | | | | | | | | | | | | | * src/itdb.h src/itdb_itunesdb.c: renamed unk156 to skipcount and unk160 to last_skipped. Added unk244, gapless_data, unk252, gapless_track_flag, gapless_album_flag, recent_skipcount. Added handling of skipcount and last_skipped to playount file handling. * src/itdb_private.h: added skipcount and last_skipped to struct playcount. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1348 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * src/itdb.hJorg Schuler2006-11-261-18/+2
| | | | | | | src/itdb_itunesdb.c: removed mhodcount and libmhodcount from Itdb_Playlist as these are only used internally and reset during syncing. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1340 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * src/itdb.hJorg Schuler2006-11-241-3/+6
| | | | | | | | | | src/itdb_photoalbum.c (itdb_photodb_add_photo, itdb_photodb_add_photo_from_data, itdb_photodb_photoalbum_add_photo): add 'position' where photo should be inserted. * tests/test-photos.c: implemented new API (append at the end). git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1339 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * When adding photos to the iPod the user may or may not want toJorg Schuler2006-11-231-13/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rotate the picture shown on the iPod screen, for example deending on EXIF rotation value. This can now be achieved by passing a new parameter 'rotation' to itdb_photodb_add_photo() or itdb_photodb_add_photo_from_data(). (Valid values: 0, 90, 180, 270, rotation is counter-clockwise). These two functions now also accept a GError pointer. As a consequence Itdb_Thumb had to be extended with a field for the rotation value and itdb_artwork_add_thumbnail have been extended to accept @rotation and @error as well. The actual rotation is carried out in ithumb-writer.c/ithumb_writer_write_thumbnail() using gdk_pixbuf_rotate_simple() and require gdk-pixbuf V2.6 or higher. In contrast, itdb_track_set_thumbnails() and itdb_track_set_thumbnails_from_data have been left unchanged, even though they could be extended to accept @rotation and @error easily. Please let me know if this is wanted. * configure.ac src/itdb.h src/itdb_artwork.c src/itdb_photoalbum.c src/itdb_track.c src/ithumb-writer.c: implemented changes outlined above. * tests/test-photos.c: added @rotation and @error to the itdb_photodb_add_photo() call. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1338 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * itdb.h: Itdb_Artwork:Jorg Schuler2006-11-111-6/+15
| | | | | | | | | | | | | | | | | | | | | - added unk028, unk036 and rating - added digitized_data timestamp - changed creation_date from gint32 to guint32 * db-itunes-parser.h: db-artwork-debug.c: MhiiHeader: - renamed unknown5 to rating - renamed digitised_date to digitized_date for conformity * db-artwork-writer.c (write_mhli): sanity check to avoid access of NULL pointer. (write_mhii): write unk028, rating, unk036, digitized_data * db-artwork_parser.c (parse_mhii): - parse unk028, rating, unk036, digitized data. - unified reading of DB_TYPE_PHOTO and DB_TYPE_ITUNES, got rid of parse_mhod() and parse_mhni(). git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1335 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * itdb.h:Jorg Schuler2006-11-071-10/+45
| | | | | | | | | | | | | | | itdb_itunesdb.c: itdb_track.c: renamed some formerly unknown Itdb_Track entries and added comments: - unk184->pregap - samplecount: guint32 -> guint64. - unk192->(removed) - unk200->postgap - unk208->mediatype - unk212->season_nr - unk216->episode_nr git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1334 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* Added additional functionality for photo albumsJorg Schuler2006-10-291-7/+25
| | | | | | | | | | | | | | | * src/db-artwork-parser.c src/db-artwork-writer.c src/db-itunes-parser.c: src/itdb.h: added additional fields to MhbaHeader and Itdb_PhotoAlbum (playmusic, repeat, random, show_titles, transition_direction, slide duration, transition_duration, unk024, unk028, unk044, unk048, song_id. These fields are read and written from the PhotoDB now. Also corrected error for "album type" which was read and written as int32 even though it was a int8. Removed num_images from Itdb_PhotoAlbum -- instead count images at time of writing. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1330 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* Major rework of picture support.Jorg Schuler2006-10-291-106/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/db-artwork-parser.c, src/db-artwork-writer.c, src/itdb.h, src/db-itunes-parser.h: renamed 'master' to 'album_type' in MhbaHeader and Itdb_PhotoAlbum. * src/db-artwork-parser.c, src/db-artwork-writer.c, src/itdb_photoalbum.c: Itdb_Photoalbum->members are now pointers to the corresponding Itdb_Artwork instead of image_ids. * src/itdb_photoalbum.c: album_ids and image_ids are set just before writing the PhotoDB in itdb_photodb_write(). * src/itdb_photoalbum.c: new interface, basically use as follows: itdb_photodb_parse(): Read an existing PhotoDB. itdb_photodb_create(): Create a new Itdb_PhotoDB structure. The Photo Library Album is (first album) is created automatically. itdb_photodb_add_photo(), itdb_photodb_add_photo_from_data(): Add a photo to the PhotoDB (from file or from a chunk of memory). It is automatically added to the Photo Library Album (first album), which is created if it does not exist already. itdb_photodb_photoalbum_craete(): Create and add a new photoalbum. itdb_photodb_photoalbum_add_photo(): Add a photo (Itdb_Artwork) to an existing photoalbum. itdb_photodb_photoalbum_remove(): Remove an existing photoalbum. Pictures can be kept in the Photo Library or automatically removed as well. itdb_photodb_remove_photo(): Remove a photo either from a photoalbum or completely from the database. itdb_photodb_write(): Write out your PhotoDB. itdb_photodb_free(): Free all memory taken by the PhotoDB. itdb_photodb_photoalbum_by_name(): Find the first photoalbum with a given name. * src/itdb_playlist.c (itdb_playlist_add, itdb_playlist_add_track): src/itdb_track.c (itdb_track_add): simplify code by using g_list_insert(). * tests/test-photos.c: change to new interface, add new commands 'list' to list photo IDs in the database, 'remove' to remove IDs from an album or the iPod, or remove entire photoalbums from the iPod. * src/db-itunes-parser.h: added comments to _MhbaHeader definition. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1329 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* Reverted accidential patch.Jorg Schuler2006-09-281-4/+0
| | | git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1324 f01d2545-417e-4e96-918e-98f8d0dbbcb6
* * po/sv.po: updated version by Stefan AsserhallJorg Schuler2006-09-261-0/+4
| | | git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1323 f01d2545-417e-4e96-918e-98f8d0dbbcb6