[vlc-devel] [PATCH] playlist: Media Library automatic item removal

Aleksandr Pasechnik al at megamicron.net
Mon May 25 15:07:08 CEST 2015



> On Mon May 25, 2015, at 08:25, Rémi Denis-Courmont <remi at remlab.net> wrote:
> 
>   Hello,
> 
> Le 2015-05-25 14:52, Aleksandr Pasechnik a écrit :
>> Added a setting that automatically removes the last played item from the
>> playlist once the next item starts playing. This setting only effects
>> the Media Library portion of the playlist.
> 
> That's going to confuse users.
> 
>> Items are not removed if the user manually selects an item to play from the
>> playlist.
> 
> That's even more confusing.

How about this description:

Played items are removed from the Media Library during automatic playback.


I think this would always be an “Advanced” setting, so maybe not so confusing for the users that take the time to find it and read the documentation? Is that too optimistic?

> 
>> diff --git a/src/playlist/thread.c b/src/playlist/thread.c
>> index 178c5cc..d55af83 100644
>> --- a/src/playlist/thread.c
>> +++ b/src/playlist/thread.c
>> @@ -240,6 +240,16 @@ static bool PlayItem( playlist_t *p_playlist,
>> playlist_item_t *p_item )
>>     var_SetAddress( p_playlist, "input-current", p_input_thread );
>> 
>>     PL_LOCK;
>> +
>> +    if( strcmp( PLI_NAME( p_sys->status.p_node ), "Media Library" ) == 0 )
> 
> This is very brittle. In fact, it is plain wrong.
> 
> -- 
> Rémi Denis-Courmont
> Remlab T:mi
> http://www.remlab.net/


Is there a standard way to detect if we are currently in the media library? This feature wouldn’t make a lot of sense for other playlists, since those aren’t saved automatically.

—
Best regards,
Aleksandr (apiarian)




More information about the vlc-devel mailing list