Changeset 5eb23c8e0a5ba9756ecbd83c8136fafbc0d3beb9

Show
Ignore:
Timestamp:
14/12/04 20:29:50 (4 years ago)
Author:
Clément Stenac <zorglub@videolan.org>
git-committer:
Clément Stenac <zorglub@videolan.org> 1103052590 +0000
git-parent:

[d2adc9f3c197dfb3b148db04d24f838d7f0befcd]

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

Restore loop
Fix command line parsing

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/misc/configuration.c

    rd2adc9f r5eb23c8  
    213213    } 
    214214 
     215 
    215216    /* return a copy of the string */ 
    216217    vlc_mutex_lock( p_config->p_lock ); 
     
    236237    p_config = config_FindConfig( p_this, psz_name ); 
    237238 
     239 
    238240    /* sanity checks */ 
    239241    if( !p_config ) 
     
    246248        (p_config->i_type!=CONFIG_ITEM_DIRECTORY) && 
    247249        (p_config->i_type!=CONFIG_ITEM_MODULE_LIST) && 
     250        (p_config->i_type!=CONFIG_ITEM_MODULE_CAT) && 
    248251        (p_config->i_type!=CONFIG_ITEM_MODULE_LIST_CAT) && 
    249252        (p_config->i_type!=CONFIG_ITEM_MODULE) ) 
     
    14451448            case CONFIG_ITEM_DIRECTORY: 
    14461449            case CONFIG_ITEM_MODULE: 
     1450            case CONFIG_ITEM_MODULE_LIST: 
     1451            case CONFIG_ITEM_MODULE_LIST_CAT: 
     1452            case CONFIG_ITEM_MODULE_CAT: 
    14471453                config_PutPsz( p_this, psz_name, optarg ); 
    14481454                break; 
     
    14731479            case CONFIG_ITEM_DIRECTORY: 
    14741480            case CONFIG_ITEM_MODULE: 
     1481            case CONFIG_ITEM_MODULE_CAT: 
     1482            case CONFIG_ITEM_MODULE_LIST: 
     1483            case CONFIG_ITEM_MODULE_LIST_CAT: 
    14751484                config_PutPsz( p_this, pp_shortopts[i_cmd]->psz_name, optarg ); 
    14761485                break; 
  • src/playlist/playlist.c

    rca0f0c5 r5eb23c8  
    871871                                    p_playlist->request.p_node, 
    872872                                    p_new ); 
    873                     if( p_new == NULL ) break; 
     873                    if( p_new == NULL ) 
     874                    { 
     875                        if( b_loop ) 
     876                        { 
     877                            p_new = playlist_FindNextFromParent( p_playlist, 
     878                                      p_playlist->request.i_view, 
     879                                      p_view->p_root, 
     880                                      p_playlist->request.p_node, 
     881                                      NULL ); 
     882                            if( p_new == NULL ) break; 
     883                        } 
     884                        else 
     885                        { 
     886                            break; 
     887                        } 
     888                    } 
    874889                } 
    875890            } 
     
    910925            { 
    911926                msg_Dbg( p_playlist,"finished" ); 
    912                 p_new = NULL; 
     927                if( b_loop && p_playlist->i_size > 0) 
     928                { 
     929                    p_playlist->i_index = 0; 
     930                    p_new = p_playlist->pp_items[0]; 
     931                } 
     932                else 
     933                    p_new = NULL; 
    913934            } 
    914935        } 
     
    924945                            p_playlist->status.p_node, 
    925946                            p_playlist->status.p_item ); 
     947            if( p_new == NULL && b_loop ) 
     948            { 
     949                p_new = playlist_FindNextFromParent( p_playlist, 
     950                                   p_playlist->status.i_view, 
     951                                   p_view->p_root, 
     952                                   p_playlist->status.p_node, 
     953                                   NULL ); 
     954            } 
    926955        } 
    927956    } 
     
    939968#endif 
    940969 
    941     if( p_new == NULL ) { msg_Info( p_playlist, "Nothing to play" ); } 
    942  
     970    if( p_new == NULL ) 
     971    { 
     972        msg_Info( p_playlist, "Nothing to play" ); 
     973    } 
    943974    return p_new; 
    944975}