commit a893ffd7b337f445a53f1a229bb92c1ccc9af002
Merge: 8018e31 a01ac3d
Author: phantomjinx <p.g.richard...@phantomjinx.co.uk>
Date:   Mon Dec 21 15:39:42 2009 +0000

    Merge branch 'master' into plugin-framework

 src/display_playlists.c |   24 ++--
 src/display_tracks.c    |   33 +++---
 src/misc_playlist.c     |   41 ++++---
 src/misc_track.c        |  295 ++++++++++++++++++++++++-----------------------
 src/mp4file.c           |    9 +-
 5 files changed, 209 insertions(+), 193 deletions(-)
---
diff --cc src/misc_playlist.c
index 71e6737,09431df..ecbc25d
--- a/src/misc_playlist.c
+++ b/src/misc_playlist.c
@@@ -816,82 -915,94 +816,91 @@@ static void check_db_danglingok1(gpoint
  
      g_return_if_fail (itdb);
  
 -    block_widgets ();
 +    block_widgets();
  
      /* traverse the list and append to the str */
 -    for (tlist = g_list_first(tlist);
 -       tlist != NULL;
 -       tlist = g_list_next(tlist))
 -    {
 -      Track *oldtrack;
 -      Track *track = tlist->data;
 -      ExtraTrackData *etr;
 -      gchar *buf;
 -
 -      g_return_if_fail (track);
 -      etr = track->userdata;
 -      g_return_if_fail (etr);
 +    for (tlist = g_list_first(tlist); tlist != NULL; tlist = 
g_list_next(tlist)) {
 +        Track *oldtrack;
 +        Track *track = tlist->data;
 +        ExtraTrackData *etr;
 +        gchar *buf;
 +
 +        g_return_if_fail (track);
 +        etr = track->userdata;
 +        g_return_if_fail (etr);
          /* printf("Handling track %d\n", track->ipod_id); */
  
 -      buf = get_track_info (track, TRUE);
 -      gtkpod_statusbar_message (_("Processing '%s'..."), buf);
 -      g_free (buf);
 -                                
 -      while (widgets_blocked && gtk_events_pending ())
 -          gtk_main_iteration ();
 -
 -      /* Indicate that file needs to be transfered */
 -      track->transferred=FALSE;
 -      /* Update SHA1 information */
 -      /* remove track from sha1 hash and reinsert it
 -         (hash value may have changed!) */
 -      sha1_track_remove (track);
 -      /* need to remove the old value manually! */
 -      g_free (etr->sha1_hash);
 -      etr->sha1_hash = NULL;
 -      oldtrack = sha1_track_exists_insert (itdb, track);
 -      if (oldtrack) { /* track exists, remove old track
 -                        and register the new version */
 -          sha1_track_remove (oldtrack);
 -          gp_duplicate_remove (track, oldtrack);
 -          sha1_track_exists_insert (itdb, track);
 -      }
 -      /* mark for conversion / transfer */
 -      file_convert_add_track (track);
 +        buf = get_track_info(track, TRUE);
 +        g_warning("TODO check_db_danglingok1- status\n");
 +        //    gtkpod_statusbar_message (_("Processing '%s'..."), buf);
 +        g_free(buf);
 +
 +        while (widgets_blocked && gtk_events_pending())
 +            gtk_main_iteration();
 +
 +        /* Indicate that file needs to be transfered */
 +        track->transferred = FALSE;
 +        /* Update SHA1 information */
 +        /* remove track from sha1 hash and reinsert it
 +         (hash value may have changed!) */
 +        sha1_track_remove(track);
 +        /* need to remove the old value manually! */
 +        g_free(etr->sha1_hash);
 +        etr->sha1_hash = NULL;
 +        oldtrack = sha1_track_exists_insert(itdb, track);
 +        if (oldtrack) { /* track exists, remove old track
 +         and register the new version */
 +            sha1_track_remove(oldtrack);
 +            gp_duplicate_remove(track, oldtrack);
 +            sha1_track_exists_insert(itdb, track);
 +        }
 +        /* mark for conversion / transfer */
 +        file_convert_add_track(track);
      }
      g_list_free(l_dangling);
 -    data_changed (itdb);
 -    gtkpod_statusbar_message (_("Dangling tracks with files on PC were 
handled."));
 +    data_changed(itdb);
 +    g_warning("TODO check_db_danglingok1- status\n");
 +    //    gtkpod_statusbar_message (_("Dangling tracks with files on PC were 
handled."));
      /* I don't think it's too interesting to pop up the list of
 -       duplicates -- but we should reset the list. */
 -    gp_duplicate_remove (NULL, (void *)-1);
 +     duplicates -- but we should reset the list. */
 +    gp_duplicate_remove(NULL, (void *) -1);
  
 -    release_widgets ();
 +    release_widgets();
  }
  
 -
 -
+ static void glist_list_tracks (GList * tlist, GString * str)
 -      {
++{
+           if (str==NULL)
+           {
+               fprintf(stderr, "Report the bug please: shouldn't be NULL at 
%s:%d\n",__FILE__,__LINE__);
+               return;
+           }
+           /* traverse the list and append to the str */
+           for (tlist = g_list_first(tlist);
+                tlist != NULL;
+                tlist = g_list_next(tlist))
+           {
+               ExtraTrackData *etr;
+               Track *track = tlist->data;
+               g_return_if_fail (track);
+               etr = track->userdata;
+               g_return_if_fail (etr);
+               g_string_append_printf
+                   (str,"%s(%d) %s-%s -> %s\n",_("Track"),
+                    track->id, track->artist,  track->title,  
etr->pc_path_utf8);
+           }
 -      } /* end of glist_list_tracks */
++} /* end of glist_list_tracks */
+ 
  /* checks iTunesDB for presence of dangling links and checks IPODs
   * Music directory on subject of orphaned files */
- void check_db(iTunesDB *itdb) {
+ void check_db (iTunesDB *itdb)
+ {
  
-     void glist_list_tracks(GList * tlist, GString * str) {
-         if (str == NULL) {
-             fprintf(stderr, "Report the bug please: shouldn't be NULL at 
%s:%d\n", __FILE__, __LINE__);
-             return;
-         }
-         /* traverse the list and append to the str */
-         for (tlist = g_list_first(tlist); tlist != NULL; tlist = 
g_list_next(tlist)) {
-             ExtraTrackData *etr;
-             Track *track = tlist->data;
-             g_return_if_fail (track);
-             etr = track->userdata;
-             g_return_if_fail (etr);
-             g_string_append_printf(str, "%s(%d) %s-%s -> %s\n", _("Track"), 
track->id, track->artist, track->title, etr->pc_path_utf8);
-         }
-     } /* end of glist_list_tracks */
  
      GTree *files_known = NULL;
 -    GDir  *dir_des = NULL;
 +    GDir *dir_des = NULL;
  
 -    gchar *pathtrack=NULL;
 +    gchar *pathtrack = NULL;
      gchar *ipod_filename = NULL;
  #   define localdebug  0      /* may be later becomes more general verbose 
param */
      Playlist* pl_orphaned = NULL;

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
gtkpod-cvs2 mailing list
gtkpod-cvs2@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2

Reply via email to