Skip to content

Commit

Permalink
Update playlist after playlist sort operations
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksiy-Yakovenko committed Feb 2, 2024
1 parent 7f78bd3 commit d429dc6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/cocoaui/Playlist/PlaylistViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -1336,6 +1336,8 @@ - (void)sortColumn:(DdbListviewCol_t)column {
deadbeef->plt_sort_v2 (plt, PL_MAIN, c->type, (c->sortFormat && c->sortFormat[0]) ? c->sortFormat : c->format, self.columns[column].sort_order);
deadbeef->plt_unref (plt);

deadbeef->sendmessage (DB_EV_PLAYLISTCHANGED, 0, DDB_PLAYLIST_CHANGE_CONTENT, 0);

PlaylistView *lv = (PlaylistView *)self.view;
lv.headerView.needsDisplay = YES;
}
Expand Down
1 change: 1 addition & 0 deletions plugins/cocoaui/Playlist/SearchViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ - (void)sortColumn:(DdbListviewCol_t)column withOrder:(int)order {
ddb_playlist_t *plt = deadbeef->plt_get_curr ();
deadbeef->plt_sort_v2 (plt, PL_SEARCH, c->type, c->format, order-1);
deadbeef->plt_unref (plt);
deadbeef->sendmessage (DB_EV_PLAYLISTCHANGED, 0, DDB_PLAYLIST_CHANGE_CONTENT, 0);
}

@end
1 change: 1 addition & 0 deletions plugins/gtkui/playlist/plcommon.c
Original file line number Diff line number Diff line change
Expand Up @@ -1125,6 +1125,7 @@ pl_common_col_sort (DdbListviewColumnSortOrder sort_order, int iter, void *user_
char *format = (c->sort_format && strlen(c->sort_format)) ? c->sort_format : c->format;
deadbeef->plt_sort_v2 (plt, iter, c->id, format, sort_order == DdbListviewColumnSortOrderDescending ? DDB_SORT_DESCENDING : DDB_SORT_ASCENDING);
deadbeef->plt_unref (plt);
deadbeef->sendmessage (DB_EV_PLAYLISTCHANGED, 0, DDB_PLAYLIST_CHANGE_CONTENT, 0);
}

void
Expand Down

0 comments on commit d429dc6

Please sign in to comment.