jreklund / php4dvd

php4dvd is an open source php/mysql powered movie database. Catalog your video collection with ease. Automatic update of information and images.
GNU General Public License v3.0
83 stars 43 forks source link

Allow searching on media type #3

Closed jdeluyck closed 7 years ago

jdeluyck commented 7 years ago

Hello,

Would it be possible to incorporate searching on media type? I've tried adding this myself, but I seem to be missing some part somewhere. Tried it on my own repo at https://github.com/jdeluyck/php4dvd/ - but modifications are from dec/jan.

jreklund commented 7 years ago

Hello,

Change your php4dvd.js line 53 into: url += "&f=" + encodeURIComponent(f);

In sidebar.html I added "All", so you don't have to choose.

<select id="format" onchange="search();">
    <option value="0">{$smarty.const.ALL|htmlentities:3:'UTF-8'}</option>
    {section name=f loop=$movieformats}
    <option value="{$movieformats[f]}">{translate($movieformats[f])|htmlentities:3:'UTF-8'}</option>
    {/section}
</select>

After merging my repo you got some << inside all language files. So everything just crashed. FORMAT is also defined already. Just open my language files, and paste them into yours.

Edit: Will add this in a future release.

jdeluyck commented 7 years ago

Thanks, that indeed did the trick. I'd been searching for a while but i completely missed that one 's' ;)

Also a big thanks for keeping this project alive!

jreklund commented 7 years ago

Yeah, I missed it at first too. I discovered it by looking at the "Network" inside Developer Tools (Chrome) and saw that it got the wrong format; f=name%20asc.

You're very welcome. This is my first time giving back to the community, have "stolen" so much in the past. Just open a new issue if you come up with a new feature or find a bug.

Things planned for future releases: