Example #1
0
    def _download_playlist(self):
        playlist_url = 'http://compo.thasauce.net/rounds/view/%s' % self.compo_id

        print "Downloading playlist."
        self.playlist_download_stream = StringIO()
        self.playlist_download_task = download_with_retries(
            playlist_url, self.playlist_download_stream, 5, 5)
Example #2
0
    def _download_track(self, track):
        source_url = track.url
        destination_path = self._get_local_url_for_track(track)

        print "Commencing download for track id %s." % track.id
        self.track_statuses[track.id] = "downloading"

        self.song_download_file = open(destination_path, "wb")
        self.song_download_filepath = destination_path
        self.song_download_task = download_with_retries(source_url, self.song_download_file, 5, 5)
        self.song_download_track = track
Example #3
0
    def _download_track(self, track):
        source_url = track.url
        destination_path = self._get_local_url_for_track(track)

        print "Commencing download for track id %s." % track.id
        self.track_statuses[track.id] = "downloading"

        self.song_download_file = open(destination_path, "wb")
        self.song_download_filepath = destination_path
        self.song_download_task = download_with_retries(
            source_url, self.song_download_file, 5, 5)
        self.song_download_track = track
Example #4
0
    def _download_playlist(self):
        playlist_url = 'http://compo.thasauce.net/rounds/view/%s' % self.compo_id

        print "Downloading playlist."
        self.playlist_download_stream = StringIO()
        self.playlist_download_task = download_with_retries(playlist_url, self.playlist_download_stream, 5, 5)