Changeset 18969 for titan/plugins/tmdb


Ignore:
Timestamp:
12/07/12 05:51:04 (11 years ago)
Author:
obi
Message:

fix merge

File:
1 edited

Legend:

Unmodified
Added
Removed
  • titan/plugins/tmdb/tmdb.h

    r18967 r18969  
    171171//flag1: 0 = save pic in tmp
    172172//flag1: 1 = save pic in mediadb path if pic not exist
     173//flag1: 2 = save pic in mediadb path
    173174//flag2: 2 = save no pic
    174175struct tmdb* gettmdb(struct tmdb** first, char* title, int flag, int flag1)
     
    330331                                tnode->backdrop = oregex(".*<image type=\"backdrop\" url=\".*(http://.*/poster/.*)\" size=\"poster\".*", tmpstr1);
    331332
    332                                 printf("0000022222222222zzzzzzzzzzz\n");
     333                        if(ostrstr(tmpstr1, "<imdb_id>") != NULL)
     334                                tnode->imdbid = string_resub("<imdb_id>", "</imdb_id>", tmpstr1, 0);
    333335
    334336                        if(getconfigint("mediadbdebug", NULL) == 1 && tnode->backdrop == NULL)
     
    365367                                tnode->id = string_resub("<id>", "</id>", tmpstr1, 0);
    366368
    367                         if(ostrstr(tmpstr1, "<imdb_id>") != NULL)
    368                                 tnode->imdbid = string_resub("<imdb_id>", "</imdb_id>", tmpstr1, 0);
    369 
    370369                        if((flag1 == 0 && count == 1) || flag1 == 1)
    371370                        {
     
    379378
    380379                                savefile = savetmdbpic(tnode->imdbid, tnode->postermid, TMPTMDBPIC3, "_postermid.jpg", flag1);
     380                                posterurl = ostrcat(posterurl, tnode->postermid, 1, 0);
    381381                                free(tnode->postermid);
    382382                                tnode->postermid = savefile;
     
    390390                        }
    391391
    392                         if(flag1 == 1 && tnode->backdrop != NULL && tnode->imdbid != NULL)
     392                        if((flag1 == 1 && tnode->backdrop != NULL && tnode->imdbid != NULL) || (flag1 == 2 && tnode->backdrop != NULL && tnode->imdbid != NULL))
    393393                        {
    394394                                char* tmppath = NULL;
     
    606606                                free(tmpstr2), tmpstr2 = NULL;
    607607                        }
    608                         else if(flag1 == 1 && tnode->postermid != NULL && tnode->imdbid != NULL && file_exist(savefile))
     608                        else if((flag1 == 1 && tnode->postermid != NULL && tnode->imdbid != NULL && file_exist(savefile)) || (flag1 == 2 && tnode->postermid != NULL && tnode->imdbid != NULL && file_exist(savefile)))
    609609                        {
    610610                                free(tnode->mvi);
     
    763763                        tmpstr1 = ostrstr(tmpstr1, "<movie>");
    764764
     765                        free(tmpstr1), tmpstr1 = NULL;
     766                        free(posterurl), posterurl = NULL;
     767                        free(logdir), logdir = NULL;
     768                        free(logfile), logfile = NULL;
     769
    765770                        debug(133, "----------------------tmdb start----------------------");
    766771                        debug(133, "title: %s", tnode->title);
Note: See TracChangeset for help on using the changeset viewer.