code: def run(self):
          
          latest_track = Track.objects.all().order_by('-last_played')
          latest_track = latest_track[0] if latest_track else None
          
          importer = self.get_importer()
          tracks = importer.run()
  
          # Create/update Django Track objects for importer tracks.
          for track in tracks:
              # Only create/update if tracks with start times greater than what already exists are imported. 
              if not latest_track or not latest_track.last_played \
                      or track.start_time > latest_track.last_played:
                  obj = self.lookup_track(track)
                  # Don't update importing track that is regarded as the latest. This prevents start times from constantly incrementing.
                  if latest_track and obj == latest_track:
                      print "[%s-%s]: Start time not updated as it is the latest track." % (track.title, track.artist)
                      continue
  
                  # If no existing track object could be resolved, create it.
                  if not obj:
                      print "[%s-%s]: Created." % (track.title, track.artist)
                      obj = Track.objects.create(title=track.title)
                      obj.length = track.length
                      roles = MusicCreditOption.objects.all().order_by('role_priority') 
                      role = roles[0].role_priority if roles else 1
                      obj.create_credit(track.artist, role)
                  else:
                      print "[%s-%s]: Not created as it already exists." % (track.title, track.artist)
                  
                  # Update last played time to start time.
                  obj.last_played = track.start_time
                  obj.save()
                  print "[%s-%s]: Start time updated to %s." % (track.title, track.artist, track.start_time)
              else:
                  print "[%s-%s]: Not created as it has a past start time of %s (latest %s). " % (track.title, track.artist, track.start_time, latest_track.last_played)
docs: Run import.