Changeset e8aa094f86e08a2c690555a0767763dcd63ffb90

Show
Ignore:
Timestamp:
12/11/06 19:19:49 (2 years ago)
Author:
Clément Stenac <zorglub@videolan.org>
git-committer:
Clément Stenac <zorglub@videolan.org> 1163355589 +0000
git-parent:

[8b5528ab646fc91e2edb9bdfcd0afd87cbf70859]

git-author:
Clément Stenac <zorglub@videolan.org> 1163355589 +0000
Message:

Preparse playlist items that don't have enough meta
If the item is not to be preparsed but has enough meta, mark it as preparsed

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • include/vlc/vlc.h

    red0b72e re8aa094  
    142142#define PLAYLIST_GO              0x0004 
    143143#define PLAYLIST_PREPARSE        0x0008 
     144#define PLAYLIST_SPREPARSE       0x0010 
    144145 
    145146#define PLAYLIST_END           -666 
  • include/vlc_playlist.h

    r673861d re8aa094  
    129129    vlc_bool_t            b_doing_ml; /**< Doing media library stuff, */ 
    130130                                      /*get quicker */ 
     131    vlc_bool_t            b_auto_preparse; 
    131132 
    132133    /* Runtime */ 
  • modules/demux/playlist/asx.c

    r2374e7b re8aa094  
    371371                            playlist_BothAddInput( p_playlist, p_input, 
    372372                                                   p_item_in_category, 
    373                                                    PLAYLIST_APPEND
    374                                                    PLAYLIST_END ); 
     373                                            PLAYLIST_APPEND|PLAYLIST_SPREPARSE
     374                                            PLAYLIST_END ); 
    375375                            free( psz_string ); 
    376376                        } 
     
    451451                            playlist_BothAddInput( p_playlist, p_entry, 
    452452                                                 p_item_in_category, 
    453                                                  PLAYLIST_APPEND, PLAYLIST_END); 
     453                                                 PLAYLIST_APPEND | PLAYLIST_SPREPARSE 
     454                                                 , PLAYLIST_END); 
    454455                            free( psz_string ); 
    455456                        } 
  • modules/demux/playlist/b4s.c

    r2374e7b re8aa094  
    269269                    playlist_BothAddInput( p_playlist, p_input, 
    270270                                           p_item_in_category, 
    271                                            PLAYLIST_APPEND, PLAYLIST_END ); 
     271                                           PLAYLIST_APPEND | PLAYLIST_SPREPARSE, 
     272                                           PLAYLIST_END ); 
    272273                    FREENULL( psz_name ); 
    273274                    FREENULL( psz_mrl ); 
  • modules/demux/playlist/dvb.c

    r2374e7b re8aa094  
    120120        } 
    121121        playlist_BothAddInput( p_playlist, p_input, p_item_in_category, 
    122                                PLAYLIST_APPEND, PLAYLIST_END ); 
     122                               PLAYLIST_APPEND | PLAYLIST_SPREPARSE, 
     123                               PLAYLIST_END ); 
    123124 
    124125        while( i_options-- ) free( ppsz_options[i_options] ); 
  • modules/demux/playlist/gvp.c

    r2374e7b re8aa094  
    216216        playlist_BothAddInput( p_sys->p_playlist, p_input, 
    217217                               p_sys->p_item_in_category, 
    218                                PLAYLIST_APPEND, PLAYLIST_END ); 
     218                               PLAYLIST_APPEND | PLAYLIST_SPREPARSE, 
     219                               PLAYLIST_END ); 
    219220    } 
    220221 
  • modules/demux/playlist/m3u.c

    r2374e7b re8aa094  
    170170                                        _(VLC_META_ARTIST), "%s", psz_artist ); 
    171171            playlist_BothAddInput( p_playlist, p_input, p_item_in_category, 
    172                                    PLAYLIST_APPEND, PLAYLIST_END ); 
     172                                   PLAYLIST_APPEND | PLAYLIST_SPREPARSE, 
     173                                   PLAYLIST_END ); 
    173174            free( psz_mrl ); 
    174175        } 
  • modules/demux/playlist/pls.c

    r2374e7b re8aa094  
    158158                input_ItemCopyOptions( p_current->p_input, p_input ); 
    159159                playlist_BothAddInput( p_playlist, p_input, p_item_in_category, 
    160                                         PLAYLIST_APPEND, PLAYLIST_END ); 
     160                                       PLAYLIST_APPEND | PLAYLIST_SPREPARSE, 
     161                                       PLAYLIST_END ); 
    161162            } 
    162163            else 
     
    214215        input_ItemCopyOptions( p_current->p_input, p_input ); 
    215216        playlist_BothAddInput( p_playlist, p_input, p_item_in_category, 
    216                                PLAYLIST_APPEND, PLAYLIST_END ); 
     217                               PLAYLIST_APPEND | PLAYLIST_SPREPARSE, 
     218                               PLAYLIST_END ); 
    217219        free( psz_mrl_orig ); 
    218220        psz_mrl = NULL; 
  • modules/demux/playlist/podcast.c

    r2374e7b re8aa094  
    294294                    playlist_BothAddInput( p_playlist, p_input, 
    295295                                           p_item_in_category, 
    296                                            PLAYLIST_APPEND, PLAYLIST_END ); 
     296                                           PLAYLIST_APPEND | PLAYLIST_SPREPARSE 
     297                                           , PLAYLIST_END ); 
    297298                    FREENULL( psz_item_name ); 
    298299                    FREENULL( psz_item_mrl ); 
  • modules/demux/playlist/qtl.c

    r2374e7b re8aa094  
    362362        SADD_INFO( "mime type", psz_mimetype ); 
    363363        playlist_BothAddInput( p_sys->p_playlist, p_input, 
    364                                p_sys->p_item_in_category, PLAYLIST_APPEND, 
     364                               p_sys->p_item_in_category, 
     365                               PLAYLIST_APPEND | PLAYLIST_SPREPARSE, 
    365366                               PLAYLIST_END ); 
    366367        if( psz_qtnext ) 
     
    370371            playlist_BothAddInput( p_sys->p_playlist, p_input, 
    371372                                   p_sys->p_item_in_category, 
    372                                    PLAYLIST_APPEND, PLAYLIST_END ); 
     373                                   PLAYLIST_APPEND | PLAYLIST_SPREPARSE, 
     374                                   PLAYLIST_END ); 
    373375        } 
    374376    } 
  • modules/demux/playlist/sgimb.c

    r2374e7b re8aa094  
    408408 
    409409    playlist_BothAddInput( p_playlist, p_child, p_item_in_category, 
    410                            PLAYLIST_APPEND, PLAYLIST_END ); 
     410                           PLAYLIST_APPEND | PLAYLIST_SPREPARSE, PLAYLIST_END ); 
    411411    HANDLE_PLAY_AND_RELEASE 
    412412    return -1; /* Needed for correct operation of go back */ 
  • modules/demux/playlist/shoutcast.c

    r2374e7b re8aa094  
    243243                    playlist_BothAddInput( p_sys->p_playlist, p_input, 
    244244                                           p_sys->p_item_in_category, 
    245                                            PLAYLIST_APPEND, PLAYLIST_END ); 
     245                                           PLAYLIST_APPEND | PLAYLIST_SPREPARSE, 
     246                                           PLAYLIST_END ); 
    246247                    FREENULL( psz_name ); 
    247248                } 
     
    434435                    playlist_BothAddInput( p_sys->p_playlist, p_input, 
    435436                                           p_sys->p_item_in_category, 
    436                                            PLAYLIST_APPEND, PLAYLIST_END ); 
     437                                           PLAYLIST_APPEND | PLAYLIST_SPREPARSE, 
     438                                           PLAYLIST_END ); 
    437439 
    438440                    FREENULL( psz_name ); 
  • modules/demux/playlist/xspf.c

    r2374e7b re8aa094  
    482482                    playlist_BothAddInput( p_playlist, p_new_input, 
    483483                                           p_demux->p_sys->p_item_in_category, 
    484                                            PLAYLIST_APPEND, PLAYLIST_END ); 
     484                                           PLAYLIST_APPEND | PLAYLIST_SPREPARSE, 
     485                                           PLAYLIST_END ); 
    485486                    if( p_demux->p_sys->i_identifier < 
    486487                        p_demux->p_sys->i_tracklist_entries ) 
  • src/playlist/engine.c

    rd3217fc re8aa094  
    5454{ 
    5555    playlist_t *p_playlist; 
     56    vlc_bool_t b_save; 
    5657    int i_tree; 
    5758 
     
    9091 
    9192    p_playlist->b_doing_ml = VLC_FALSE; 
     93 
     94    p_playlist->b_auto_preparse = 
     95                        var_CreateGetBool( p_playlist, "auto-preparse") ; 
    9296 
    9397    p_playlist->p_root_category = playlist_NodeCreate( p_playlist, NULL, NULL); 
     
    133137 
    134138    vlc_object_attach( p_playlist, p_parent ); 
    135  
     139    b_save = p_playlist->b_auto_preparse; 
     140    p_playlist->b_auto_preparse = VLC_FALSE; 
    136141    playlist_MLLoad( p_playlist ); 
     142    p_playlist->b_auto_preparse = VLC_TRUE; 
    137143    return p_playlist; 
    138144} 
  • src/playlist/item.c

    r3bed3c3 re8aa094  
    575575        vlc_cond_signal( &p_playlist->object_wait ); 
    576576    } 
    577     if( i_mode & PLAYLIST_PREPARSE && 
    578         var_CreateGetBool( p_playlist, "auto-preparse" ) ) 
    579     { 
     577    /* Preparse if PREPARSE or SPREPARSE & not enough meta */ 
     578    if( p_playlist->b_auto_preparse && 
     579          (i_mode & PLAYLIST_PREPARSE || 
     580          ( i_mode & PLAYLIST_SPREPARSE && 
     581            ( !p_item_cat->p_input->p_meta || (p_item_cat->p_input->p_meta && 
     582              ( EMPTY_STR( p_item_cat->p_input->p_meta->psz_artist ) || 
     583                EMPTY_STR( p_item_cat->p_input->p_meta->psz_album ) ) 
     584              ) 
     585            ) 
     586          ) ) ) 
    580587        playlist_PreparseEnqueue( p_playlist, p_item_cat->p_input ); 
    581     } 
     588    /* If we already have it, signal it */ 
     589    else if( p_item_cat->p_input->p_meta && 
     590             !EMPTY_STR( p_item_cat->p_input->p_meta->psz_artist ) && 
     591             !EMPTY_STR( p_item_cat->p_input->p_meta->psz_album ) ) 
     592        p_item_cat->p_input->p_meta->i_status = ITEM_PREPARSED; 
    582593} 
    583594