Revision 1833 trunk/base/nzbcreator.c

nzbcreator.c (revision 1833)
94 94
    g_object_unref(msg);
95 95
    g_object_unref(session);
96 96

                
97
    if (result == 20110409) {
97
    if (result == 20110613) {
98 98
        *api_okay = TRUE;
99 99
    } else {
100 100
        *api_okay = FALSE;
... ...
354 354
        int complete_percentage = 0;
355 355
        int num_regular_files = 0;
356 356
        int num_par2_files = 0;
357
        int first_file_id = -1;
357 358

                
358 359
        if (!soup_value_array_get_nth(matches, i, G_TYPE_HASH_TABLE, &hash_collection)) {
359 360
            g_warning(__FILE__ ":%i Unable to parse values", __LINE__);
... ...
372 373
                                                            "complete_percentage", G_TYPE_INT, &complete_percentage,
373 374
                                                            "num_regular_files", G_TYPE_INT, &num_regular_files,
374 375
                                                            "num_par2_files", G_TYPE_INT, &num_par2_files,
376
                                                            "first_file_id", G_TYPE_INT, &first_file_id,
375 377
                                                            NULL)) {
376 378
            g_warning(__FILE__ ":%i Unable to parse values", __LINE__);
377 379
            g_hash_table_destroy(hash_collection);
... ...
391 393
        collection->complete_percentage = complete_percentage;
392 394
        collection->num_regular_files = num_regular_files;
393 395
        collection->num_par2_files = num_par2_files;
396
        collection->first_file_id = first_file_id;
394 397

                
395 398
        result->collections = ng_list_append(result->collections, collection);
396 399
    }
... ...
404 407
}
405 408

                
406 409
NGList *
407
nntpgrab_utils_nzbcreator_retrieve_collection_details(ngint64 collection_id, char **errmsg)
410
nntpgrab_utils_nzbcreator_retrieve_collection_details(ngint64 collection_id, time_t stamp, char **errmsg)
408 411
{
409 412
    NGList *result = NULL;
410 413

                
... ...
432 435

                
433 436
#ifdef HAVE_SOUP_GZIP
434 437
    /* Enable gzip compression */
435
    //soup_session_add_feature_by_type(session, SOUP_TYPE_CONTENT_DECODER);
438
    soup_session_add_feature_by_type(session, SOUP_TYPE_CONTENT_DECODER);
436 439
#endif
437 440

                
438 441
    g_signal_connect (session, "authenticate", G_CALLBACK(authenticate_cb), NULL);
439 442

                
440
    args = soup_value_hash_new_with_vals("collection_id", G_TYPE_INT, (int) collection_id, NULL);
443
    args = soup_value_hash_new_with_vals("collection_id", G_TYPE_INT, (int) collection_id,
444
                                         "stamp", G_TYPE_INT, (int) stamp,
445
                                         NULL);
441 446
    msg = soup_xmlrpc_request_new(URI, "retrieveCollectionDetails", G_TYPE_HASH_TABLE, args, G_TYPE_INVALID);
442 447

                
443 448
    soup_session_send_message(session, msg);
... ...
510 515
        strncpy(file->poster, poster, sizeof(file->poster) - 1);
511 516
        file->num_parts_found = num_parts_found;
512 517
        file->num_parts_expected = num_parts_expected;
513
        file->file_type = file_type;
514
        file->file_size = (NNTPFileType) file_size;
518
        file->file_type = (NNTPFileType) file_type;
519
        file->file_size = file_size;
515 520
        file->stamp = (time_t) stamp;
516 521
        file->complete_percentage = complete_percentage;
517 522

                

Also available in: Unified diff