mediathekview / mediathekviewweb

Eine Weboberfläche als Alternative zum Java-Client
https://mediathekviewweb.de/
GNU General Public License v3.0
887 stars 67 forks source link

duration search filter using < and > in seconds #158

Closed marcusfey closed 4 years ago

marcusfey commented 4 years ago

Sometimes you are just looking for movies (i.e. something long) or something particularly short. Up to know that's not possible for the web version in contrast to the desktop app. It would be nice to have this feature included using < and > for indicating maximum/minimum duration.

Admittedly I am for from being an expert on elasticsearch et al. My solution does not work, I get an error stating "duration" is not indexed which I cannot solve. It's hopefully easy for you.

Since I could not test my code: you might want to add *60 while parsing the parameters to convert the input into seconds. Also my implementation really sticks to the true meaning of < and >, i.e. true less than and greater than (not equals). Maybe you want to change this.

marcusfey commented 4 years ago

Some changes were missing. I'll create a new pull requrest