Changeset 18686


Ignore:
Timestamp:
11/21/12 19:51:39 (11 years ago)
Author:
obi
Message:

[titan] update imdb manual scan add imdbapi

Location:
titan
Files:
7 edited

Legend:

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

    r18685 r18686  
    540540                        mediadbfindfilecb(path, file, 0, node->id, 1);
    541541                        clearscreen(load);
    542                         drawscreen(imdbskin, 0, 0);
    543                         continue;
     542                        break;
    544543                }
    545544        }
  • titan/plugins/imdbapi/imdbapi.h

    r17176 r18686  
    174174}
    175175
    176 void screenimdbapi(char* title)
     176void screenimdbapi(char* title, char* dummy1, char* dummy2, char* path, char* file)
    177177{
     178        debug(133, "title: %s",title);
     179        debug(133, "path: %s",path);
     180        debug(133, "file: %s",file);   
     181
    178182        int rcret = 0;
    179183        struct skin* imdbapiskin = getscreen("imdbapi");
     
    186190        struct skin* skin_cover = getscreennode(imdbapiskin, "cover");
    187191        struct skin* skin_actors = getscreennode(imdbapiskin, "actors");
     192        struct skin* skin_b2 = getscreennode(imdbapiskin, "b2");
    188193        struct skin* load = getscreen("loading");
    189194        struct imdbapi* node = NULL;
    190195        char* search = NULL;
    191196
    192         setfbtransparent(255);
     197        if(path == NULL || file == NULL)
     198                skin_b2->hidden = YES;
     199        else
     200                skin_b2->hidden = NO;
     201
     202//      setfbtransparent(255);
    193203        status.hangtime = 99999;
    194204
    195205        if(title == NULL) title = getepgakttitle(NULL);
     206        debug(133, "title: %s",title);
    196207
    197208        drawscreen(load, 0, 0);
     
    236247                        continue;
    237248                }
     249
     250                if(path != NULL && file != NULL && node != NULL && node->id != NULL && rcret == getrcconfigint("rcgreen", NULL))
     251                {
     252                        drawscreen(load, 0, 0);
     253                        debug(133, "path: %s",path);
     254                        debug(133, "file: %s",file);
     255                        debug(133, "type: 2");
     256                        debug(133, "imdbid: %s",node->id);                             
     257                        mediadbfindfilecb(path, file, 0, node->id, 3);
     258                        clearscreen(load);
     259                        break;
     260                }
    238261        }
    239262
    240263        freeimdbapi(&node, 0); node = NULL;
    241         setosdtransparent(getskinconfigint("osdtransparent", NULL));
     264//      setosdtransparent(getskinconfigint("osdtransparent", NULL));
    242265        status.hangtime = getconfigint("hangtime", NULL);
    243266        clearscreen(imdbapiskin);
  • titan/plugins/mc/mc_videoplayer.h

    r18677 r18686  
    583583                else if(rcret == getrcconfigint("rcinfo", NULL))
    584584                {
    585                         info_menu(files, filelist, filelistpath);
    586                         drawscreen(skin, 0, 0);
    587585                        if(status.play == 0 && status.pause == 0)
    588586                        {
     587                                drawscreen(blackscreen, 0, 0);
     588
     589                                if(filelist->select != NULL && filelist->select->input == NULL)
     590                                {
     591                                        filename = createpath(filelistpath->text, filelist->select->name);
     592                                        debug(133, "filename: %s", filename);                           
     593                                        playrcred(filename, playinfobarstatus, playertype, flag);
     594                                }
     595                        }
     596                        else
     597                        {
     598                        printf("2222222222222\n");
     599
     600                                info_menu(files, filelist, filelistpath);
     601                        }
     602                        printf("3333333333333\n");
     603
     604                        if(status.play == 0 && status.pause == 0)
     605                        {
     606                        printf("4444444444444\n");
     607
     608                                drawscreen(skin, 0, 0);
    589609                                drawscreen(blackscreen, 0, 0);
    590610                                drawscreen(loadmediadb, 0, 0);
  • titan/plugins/tmdb/tmdb.h

    r18685 r18686  
    498498                        mediadbfindfilecb(path, file, 0, node->imdbid, 2);
    499499                        clearscreen(load);
    500                         drawscreen(tmdbskin, 0, 0);
    501                         continue;
    502 
     500                        break;
    503501                }
    504502        }
  • titan/skins/imdbapi/skin.xml

    r16415 r18686  
    1717<node name=cover valign=middle halign=middle parent=listbox posx=640 posy=0 width=640 height=720 picwidth=640 picheight=720/>
    1818<node name=b1 text="SEARCH" halign=center valign=middle bordercol=red bordersize=6 bordertype=2 posx=0 posy=0 width=150 height=39/>
     19<node name=b2 text="SAVE" halign=center valign=middle bordercol=green bordersize=6 bordertype=2 posx=170 posy=0 width=150 height=39/>
    1920</screen>
  • titan/titan/mediadb.h

    r18682 r18686  
    14391439}
    14401440
     1441// flag 0 = autoscan
     1442// flag 1 = manual scan imdb
     1443// flag 2 = manual scan tmdb
     1444// flag 3 = manual scan imdbapi
    14411445void mediadbfindfilecb(char* path, char* file, int type, char* id, int flag)
    14421446{
     
    15231527                        if(flag == 2 && imdb != NULL && id != NULL)
    15241528                                imdb->id = ostrcat(id, NULL, 0, 0);
     1529
     1530                        if(flag == 3 && imdb != NULL && id != NULL)
     1531                                imdb->id = ostrcat(id, NULL, 0, 0);
    15251532       
    15261533                        struct skin* imdbapiplugin = getplugin("IMDb-API");
     
    15541561
    15551562                debugimdbnode(imdb);
     1563
     1564                        // manuel tmdb
    15561565                        if(flag == 2 && imdb != NULL && tmdb != NULL)
    15571566                        {
     
    15711580                                if(tmdb->year != NULL) imdb->year = ostrcat(tmdb->year, NULL, 0, 0);
    15721581                        }
    1573                                                
     1582
     1583                debugimdbnode(imdb);
     1584
     1585                        // manuel imdbapi
     1586                        if(flag == 3 && imdb != NULL && tmdb != NULL)
     1587                        {
     1588                                if(imdbapi->id != NULL) imdb->id = ostrcat(imdbapi->id, NULL, 0, 0);                   
     1589                                if(imdbapi->title != NULL) imdb->title = ostrcat(imdbapi->title, NULL, 0, 0);   
     1590                                if(imdbapi->genre != NULL) imdb->genre = ostrcat(imdbapi->genre, NULL, 0, 0);
     1591                                if(imdbapi->writer != NULL) imdb->writer = ostrcat(imdbapi->writer, NULL, 0, 0);
     1592                                if(imdbapi->director != NULL) imdb->director = ostrcat(imdbapi->director, NULL, 0, 0);
     1593                                if(imdbapi->actors != NULL) imdb->actors = ostrcat(imdbapi->actors, NULL, 0, 0);
     1594                                if(imdbapi->rating != NULL) imdb->rating = ostrcat(imdbapi->rating, NULL, 0, 0);
     1595                                if(imdbapi->votes != NULL) imdb->votes = ostrcat(imdbapi->votes, NULL, 0, 0);
     1596                                if(imdbapi->runtime != NULL) imdb->runtime = ostrcat(imdbapi->runtime, NULL, 0, 0);
     1597                                if(imdbapi->plot != NULL) imdb->plot = ostrcat(imdbapi->plot, NULL, 0, 0);
     1598                                if(imdbapi->released != NULL) imdb->released = ostrcat(imdbapi->released, NULL, 0, 0);
     1599//                              if(imdbapi->postermid != NULL) imdb->poster = ostrcat(imdbapi->postermid, NULL, 0, 0);
     1600//                              if(imdbapi->thumb != NULL) imdb->thumb = ostrcat(imdbapi->thumb, NULL, 0, 0);
     1601                                if(imdbapi->year != NULL) imdb->year = ostrcat(imdbapi->year, NULL, 0, 0);
     1602                        }
     1603               
    15741604                        if(imdb != NULL && tmdb != NULL)
    15751605                        {
  • titan/titan/play.h

    r18681 r18686  
    394394                if(startplugin != NULL)
    395395                {
     396                                debug(133, "file=%s", basename(file));
    396397                        if(file != NULL)
    397398                        {
     
    425426{
    426427//      if(checkbit(status.playercan, 5) == 0) return;
    427         screenplayinfobar(file, 1, playertype, flag);
     428        if(status.play == 1)
     429                screenplayinfobar(file, 1, playertype, flag);
    428430
    429431        struct skin* pluginnode = NULL;
     
    434436        char* skintitle = "Menu";
    435437
    436         addmenulist(&mlist, "Video Settings", NULL, NULL, 0, 0);
    437         addmenulist(&mlist, "AV Settings", NULL, NULL, 0, 0);
    438         addmenulist(&mlist, "iD3Tag Info", NULL, NULL, 0, 0);
     438        if(status.play == 1)
     439        {
     440                addmenulist(&mlist, "Video Settings", NULL, NULL, 0, 0);
     441                addmenulist(&mlist, "AV Settings", NULL, NULL, 0, 0);
     442                addmenulist(&mlist, "iD3Tag Info", NULL, NULL, 0, 0);
     443        }
    439444
    440445        //add plugins
     
    443448                if(child->del == PLUGINDELMARK && (status.security == 1 || (status.security == 0 && checkpluginskip(child->name) == 0)))
    444449                {
    445                         if(ostrcmp(child->name, "Streaminfo") == 0)
     450                        if(ostrcmp(child->name, "Streaminfo") == 0 && status.play == 1)
    446451                                addmenulist(&mlist, child->name, NULL, child->pic, 0, 0);
    447452                        else if(ostrcmp(child->name, "IMDb") == 0)
     
    486491        drawscreen(skin, 0, 0);
    487492        resettvpic();
    488         if(playinfobarstatus > 0)
     493        if(playinfobarstatus > 0 &&     status.play == 1)
    489494                screenplayinfobar(file, 0, playertype, flag);
    490495}
Note: See TracChangeset for help on using the changeset viewer.