Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
3935c13b
Commit
3935c13b
authored
Jun 10, 2005
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement SORT_AUTHOR. Closes #196
parent
df73e4b3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
5 deletions
+46
-5
modules/gui/wxwindows/playlist.cpp
modules/gui/wxwindows/playlist.cpp
+6
-4
src/playlist/sort.c
src/playlist/sort.c
+40
-1
No files found.
modules/gui/wxwindows/playlist.cpp
View file @
3935c13b
...
...
@@ -972,12 +972,14 @@ void Playlist::OnSort( wxCommandEvent& event )
switch
(
event
.
GetId
()
)
{
case
SortTitle_Event
:
playlist_RecursiveNodeSort
(
p_playlist
,
playlist_ItemGetById
(
p_playlist
,
p_wxitem
->
i_id
),
SORT_TITLE_NODES_FIRST
,
ORDER_NORMAL
);
playlist_RecursiveNodeSort
(
p_playlist
,
playlist_ItemGetById
(
p_playlist
,
p_wxitem
->
i_id
),
SORT_TITLE_NODES_FIRST
,
ORDER_NORMAL
);
break
;
case
RSortTitle_Event
:
playlist_RecursiveNodeSort
(
p_playlist
,
playlist_ItemGetById
(
p_playlist
,
p_wxitem
->
i_id
),
SORT_TITLE_NODES_FIRST
,
ORDER_REVERSE
);
playlist_RecursiveNodeSort
(
p_playlist
,
playlist_ItemGetById
(
p_playlist
,
p_wxitem
->
i_id
),
SORT_TITLE_NODES_FIRST
,
ORDER_REVERSE
);
}
UnlockPlaylist
(
p_intf
->
p_sys
,
p_playlist
);
...
...
src/playlist/sort.c
View file @
3935c13b
...
...
@@ -185,7 +185,46 @@ int playlist_ItemArraySort( playlist_t *p_playlist, int i_items,
}
else
if
(
i_mode
==
SORT_AUTHOR
)
{
msg_Err
(
p_playlist
,
"META SORT not implemented"
);
char
*
psz_a
=
vlc_input_item_GetInfo
(
&
pp_items
[
i
]
->
input
,
_
(
"Meta-information"
),
_
(
"Artist"
)
);
char
*
psz_b
=
vlc_input_item_GetInfo
(
&
pp_items
[
i_small
]
->
input
,
_
(
"Meta-information"
),
_
(
"Artist"
)
);
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
)
{
...
...
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