41
public Position position {get; private set; default = Position.AUTOMATIC;}
42
public Collection<int> medias {get; private set;}
44
// Displayed medias (search results)
45
public LinkedList<int> media_results;
46
public LinkedList<int> album_results;
43
48
public LibraryManager lm {get; private set;}
44
49
public LibraryWindow lw {get; private set;}
46
51
public ViewWrapper.Hint view_type {get; private set;}
47
public Collection<int> medias {get; private set;}
52
public Position position {get; private set; default = Position.AUTOMATIC;}
48
53
public LinkedList<unowned MillerColumn> columns {get; private set;}
50
55
private Gtk.Menu column_chooser_menu;
197
202
foreach (var col in columns) {
198
203
// Higher hierarchical levels (parent columns)
199
if (col.category <= category) {
200
if (col.category == MillerColumn.Category.GENRE) {
201
search_genre = (col.category == category) ? val : col.get_selected ();
203
else if (col.category == MillerColumn.Category.ARTIST) {
204
search_artist = (col.category == category) ? val : col.get_selected ();
206
else if (col.category == MillerColumn.Category.ALBUM) {
207
search_album = (col.category == category) ? val : col.get_selected ();
209
else if (col.category == MillerColumn.Category.YEAR) {
210
var year = (col.category == category) ? val : col.get_selected ();
211
search_year = (year == "") ? -1 : int.parse (year);
213
else if (col.category == MillerColumn.Category.RATING) {
214
var rating = (col.category == category) ? val : col.get_selected ();
215
search_rating = (rating == "") ? -1 : int.parse (rating);
204
if (col.category < category) {
205
if (col.category == MillerColumn.Category.GENRE) {
206
search_genre = col.get_selected ();
208
else if (col.category == MillerColumn.Category.ARTIST) {
209
search_artist = col.get_selected ();
211
else if (col.category == MillerColumn.Category.ALBUM) {
212
search_album = col.get_selected ();
214
else if (col.category == MillerColumn.Category.YEAR) {
215
search_year = (col.get_selected () == "") ? -1 : int.parse (col.get_selected ());
217
else if (col.category == MillerColumn.Category.RATING) {
218
search_rating = (col.get_selected () == "") ? -1 : int.parse (col.get_selected ());
220
} else if (col.category == category) {
221
if (col.category == MillerColumn.Category.GENRE) {
224
else if (col.category == MillerColumn.Category.ARTIST) {
227
else if (col.category == MillerColumn.Category.ALBUM) {
230
else if (col.category == MillerColumn.Category.YEAR) {
231
search_year = (val == "") ? -1 : int.parse (val);
233
else if (col.category == MillerColumn.Category.RATING) {
234
search_rating = (val == "") ? -1 : int.parse (val);
220
239
// Perform search
221
LinkedList<int> search_results;
223
lm.do_search (medias, out search_results, null, null, null, null, hint,
241
lm.do_search (medias, out media_results, out album_results, null, null, null, hint,
224
242
lw.searchField.get_text (),
225
243
search_artist, search_album, search_genre, search_year, search_rating);
292
LinkedList<int> searched_medias, searched_medias_albums;
294
lm.do_search (medias, out searched_medias, out searched_medias_albums, null, null, null,
310
lm.do_search (medias, out media_results, out album_results, null, null, null,
295
311
hint, lw.searchField.get_text ());
297
313
foreach (var column in columns) {
298
314
var column_set = new HashMap<string, int>();
300
foreach (int id in searched_medias) {
316
foreach (int id in media_results) {
301
317
var media = lm.media_from_id (id);