Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
28563cf1
Commit
28563cf1
authored
Sep 15, 2005
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sort-by-album patch by Pierre Marc Dumuid
parent
b879e009
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
59 additions
and
4 deletions
+59
-4
THANKS
THANKS
+2
-1
include/vlc_playlist.h
include/vlc_playlist.h
+3
-0
modules/gui/wxwidgets/playlist.cpp
modules/gui/wxwidgets/playlist.cpp
+2
-0
src/playlist/sort.c
src/playlist/sort.c
+51
-3
src/playlist/view.c
src/playlist/view.c
+1
-0
No files found.
THANKS
View file @
28563cf1
...
...
@@ -34,7 +34,7 @@ Colin Simmonds <colin_simmonds at Mac.lover.org> - compile fix for Mac OS X
Damian Ivereigh <damian at cisco.com> - ac3dec uninitialized data structure fix
Damien Fouilleul <damien.fouilleul at laposte.net> - DirectShow input improvements
Daniel Fischer <dan at subsignal dot org> - Shoutcast output support
Daniel Strnger <vlc at schmaller d0t de> - M3U improvements
Daniel Strnger <vlc at schmaller d0t de> - M3U
and playlist
improvements
David Kennedy <dkennedy at tinytoad.com> - X11 fullscreen patch
David Weber <david_weber at gmx.de> - Mac OS X interface design & graphics (v0.5.0)
Davor Orel <syntheticamac at yahoo.it> - Mac OS X icons
...
...
@@ -89,6 +89,7 @@ Olivier Pomel <pomel at via.ecp.fr> - original VLC code
yvind Kolbu <oyvindk at world-online.no> - FreeBSD patches
Paul Mackerras <paulus at linuxcare.com.au> - AltiVec IDCT and motion
Philippe Van Hecke <philippe at belnet dot be> - SAP header hash patch
Pierre Marc Dumuid <pierre.dumuid at adelaide dot edu dot au> - Playlist patches
Rgis Duchesne <regis at via.ecp.fr> - original VLC code
Remco Poortinga <poortinga at telin.nl> - IPv6 multicast patch
Rene Gollent <rgollent at u.arizona.edu> - BeOS interface fix
...
...
include/vlc_playlist.h
View file @
28563cf1
...
...
@@ -108,6 +108,7 @@ struct playlist_view_t
#define VIEW_FIRST_SORTED 4
#define VIEW_S_AUTHOR 4
#define VIEW_S_GENRE 5
#define VIEW_S_ALBUM 6
#define VIEW_LAST_SORTED 10
...
...
@@ -232,6 +233,7 @@ struct playlist_add_t
#define SORT_RANDOM 5
#define SORT_DURATION 6
#define SORT_TITLE_NUMERIC 7
#define SORT_ALBUM 8
#define ORDER_NORMAL 0
#define ORDER_REVERSE 1
...
...
@@ -351,6 +353,7 @@ VLC_EXPORT( int, playlist_ItemAddOption, (playlist_item_t *, const char *) );
#define playlist_SortID(p, i) playlist_Sort( p, SORT_ID, i)
#define playlist_SortTitle(p, i) playlist_Sort( p, SORT_TITLE, i)
#define playlist_SortAuthor(p, i) playlist_Sort( p, SORT_AUTHOR, i)
#define playlist_SortAlbum(p, i) playlist_Sort( p, SORT_ALBUM, i)
#define playlist_SortGroup(p, i) playlist_Sort( p, SORT_GROUP, i)
VLC_EXPORT
(
int
,
playlist_Sort
,
(
playlist_t
*
,
int
,
int
)
);
VLC_EXPORT
(
int
,
playlist_Move
,
(
playlist_t
*
,
int
,
int
)
);
...
...
modules/gui/wxwidgets/playlist.cpp
View file @
28563cf1
...
...
@@ -1219,6 +1219,8 @@ wxMenu * Playlist::ViewMenu()
wxU
(
_
(
"Normal"
)
)
);
p_view_menu
->
Append
(
FirstView_Event
+
VIEW_S_AUTHOR
,
wxU
(
_
(
"Sorted by artist"
)
)
);
p_view_menu
->
Append
(
FirstView_Event
+
VIEW_S_ALBUM
,
wxU
(
_
(
"Sorted by Album"
)
)
);
return
p_view_menu
;
}
...
...
src/playlist/sort.c
View file @
28563cf1
...
...
@@ -40,7 +40,7 @@ int playlist_ItemArraySort( playlist_t *p_playlist, int i_items,
/**
* Sort the playlist.
* \param p_playlist the playlist
* \param i_mode: SORT_ID, SORT_TITLE, SORT_AUTHOR, SORT_RANDOM
* \param i_mode: SORT_ID, SORT_TITLE, SORT_AUTHOR, SORT_
ALBUM, SORT_
RANDOM
* \param i_type: ORDER_NORMAL or ORDER_REVERSE (reversed order)
* \return VLC_SUCCESS on success
*/
...
...
@@ -86,7 +86,7 @@ int playlist_Sort( playlist_t * p_playlist , int i_mode, int i_type )
*
* \param p_playlist the playlist
* \param p_node the node to sort
* \param i_mode: SORT_ID, SORT_TITLE, SORT_AUTHOR, SORT_RANDOM
* \param i_mode: SORT_ID, SORT_TITLE, SORT_AUTHOR, SORT_
ALBUM, SORT_
RANDOM
* \param i_type: ORDER_NORMAL or ORDER_REVERSE (reversed order)
* \return VLC_SUCCESS on success
*/
...
...
@@ -110,7 +110,7 @@ int playlist_NodeSort( playlist_t * p_playlist , playlist_item_t *p_node,
*
* \param p_playlist the playlist
* \param p_node the node to sort
* \param i_mode: SORT_ID, SORT_TITLE, SORT_AUTHOR, SORT_RANDOM
* \param i_mode: SORT_ID, SORT_TITLE, SORT_AUTHOR, SORT_
ALBUM, SORT_
RANDOM
* \param i_type: ORDER_NORMAL or ORDER_REVERSE (reversed order)
* \return VLC_SUCCESS on success
*/
...
...
@@ -226,6 +226,49 @@ int playlist_ItemArraySort( playlist_t *p_playlist, int i_items,
i_test
=
strcmp
(
psz_b
,
psz_a
);
}
}
else
if
(
i_mode
==
SORT_ALBUM
)
{
char
*
psz_a
=
vlc_input_item_GetInfo
(
&
pp_items
[
i
]
->
input
,
_
(
"Meta-information"
),
_
(
"Album/movie/show title"
)
);
char
*
psz_b
=
vlc_input_item_GetInfo
(
&
pp_items
[
i_small
]
->
input
,
_
(
"Meta-information"
),
_
(
"Album/movie/show title"
)
);
if
(
pp_items
[
i
]
->
i_children
==
-
1
&&
pp_items
[
i_small
]
->
i_children
>=
0
)
{
i_test
=
1
;
}
else
if
(
pp_items
[
i
]
->
i_children
>=
0
&&
pp_items
[
i_small
]
->
i_children
==
-
1
)
{
i_test
=
-
1
;
}
// both are nodes
else
if
(
pp_items
[
i
]
->
i_children
>=
0
&&
pp_items
[
i_small
]
->
i_children
>=
0
)
{
i_test
=
strcasecmp
(
pp_items
[
i
]
->
input
.
psz_name
,
pp_items
[
i_small
]
->
input
.
psz_name
);
}
else
if
(
psz_a
==
NULL
&&
psz_b
!=
NULL
)
{
i_test
=
1
;
}
else
if
(
psz_a
!=
NULL
&&
psz_b
==
NULL
)
{
i_test
=
-
1
;
}
else
if
(
psz_a
==
NULL
&&
psz_b
==
NULL
)
{
i_test
=
strcasecmp
(
pp_items
[
i
]
->
input
.
psz_name
,
pp_items
[
i_small
]
->
input
.
psz_name
);
}
else
{
i_test
=
strcmp
(
psz_b
,
psz_a
);
}
}
else
if
(
i_mode
==
SORT_TITLE_NODES_FIRST
)
{
/* Alphabetic sort, all nodes first */
...
...
@@ -284,6 +327,11 @@ int playlist_NodeGroup( playlist_t * p_playlist , int i_view,
psz_search
=
vlc_input_item_GetInfo
(
&
pp_items
[
i
]
->
input
,
_
(
"Meta-information"
),
_
(
"Artist"
)
);
}
else
if
(
i_mode
==
SORT_ALBUM
)
{
psz_search
=
vlc_input_item_GetInfo
(
&
pp_items
[
i
]
->
input
,
_
(
"Meta-information"
),
_
(
"Album/movie/show title"
)
);
}
else
if
(
i_mode
==
SORT_GENRE
)
{
psz_search
=
vlc_input_item_GetInfo
(
&
pp_items
[
i
]
->
input
,
...
...
src/playlist/view.c
View file @
28563cf1
...
...
@@ -187,6 +187,7 @@ int playlist_ViewUpdate( playlist_t *p_playlist, int i_view)
switch
(
i_view
)
{
case
VIEW_S_AUTHOR
:
i_sort_type
=
SORT_AUTHOR
;
break
;
case
VIEW_S_ALBUM
:
i_sort_type
=
SORT_ALBUM
;
break
;
case
VIEW_S_GENRE
:
i_sort_type
=
SORT_GENRE
;
break
;
default:
i_sort_type
=
SORT_AUTHOR
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment