Skip to content

Commit

Permalink
Add search by cast or director
Browse files Browse the repository at this point in the history
  • Loading branch information
gen2brain committed Jun 9, 2017
1 parent bdae598 commit 6bbae29
Show file tree
Hide file tree
Showing 16 changed files with 782 additions and 61 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ v2.4 :
* Added support for tor socks5 proxy and .onion links
* Added torrent blocklist, disabled by default
* Desktop app now supports translations for UI
* Added search by cast or director

v2.3 Oct 20, 2016:

Expand Down
28 changes: 26 additions & 2 deletions desktop/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ func (c *Client) Top(widget *List, category, limit, force, cacheDays int, tpbHos
}

// Search movies
func (c *Client) Search(widget *List, query string, limit, force, cacheDays int, pages int, tpbHost string, eztvHost string) {
data, err := bukanir.Search(query, limit, force, c.CacheDir, int64(cacheDays), pages, tpbHost, eztvHost)
func (c *Client) Search(widget *List, query string, limit, force, cacheDays, pages int, tpbHost, eztvHost, sortBy string) {
data, err := bukanir.Search(query, limit, force, c.CacheDir, int64(cacheDays), pages, tpbHost, eztvHost, sortBy)
if err != nil {
log.Printf("ERROR: Search: %s\n", err.Error())
widget.Finished("")
Expand Down Expand Up @@ -112,3 +112,27 @@ func (c *Client) Genre(widget *List, id int, limit int, force int, cacheDays int

widget.Finished(data)
}

// Cast movies
func (c *Client) Cast(widget *List, id int, limit int, force int, cacheDays int, tpbHost string) {
data, err := bukanir.Cast(id, limit, force, c.CacheDir, int64(cacheDays), tpbHost)
if err != nil {
log.Printf("ERROR: Genre: %s\n", err.Error())
widget.Finished("")
return
}

widget.Finished(data)
}

// Crew movies
func (c *Client) Crew(widget *List, id int, limit int, force int, cacheDays int, tpbHost string) {
data, err := bukanir.Crew(id, limit, force, c.CacheDir, int64(cacheDays), tpbHost)
if err != nil {
log.Printf("ERROR: Genre: %s\n", err.Error())
widget.Finished("")
return
}

widget.Finished(data)
}
5 changes: 3 additions & 2 deletions desktop/dist/windows/bukanir.iss.in
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{

[Files]
Source: "bukanir\bukanir.exe"; DestDir: "{app}";
Source: "bukanir\mpv.exe"; DestDir: "{app}";
Source: "bukanir\tor.exe"; DestDir: "{app}";
Source: "bukanir\*.dll"; DestDir: "{app}";
Source: "bukanir\AUTHORS"; DestDir: "{app}";
Source: "bukanir\COPYING"; DestDir: "{app}";
Source: "bukanir\ChangeLog"; DestDir: "{app}";
Source: "bukanir\CHANGELOG"; DestDir: "{app}";
Source: "bukanir\README.md"; DestDir: "{app}";

[Icons]
Expand Down
2 changes: 1 addition & 1 deletion desktop/dist/windows/version.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
VERSION=`cat ../../../lib/bukanir/bukanir.go | grep Version | awk -F' = ' '{print $2}' | tr -d '"'`
VERSION=`cat ../../../lib/bukanir.go | grep Version | awk -F' = ' '{print $2}' | tr -d '"'`
sed "s/{VERSION}/$VERSION/g" bukanir.iss.in > bukanir.iss
41 changes: 19 additions & 22 deletions desktop/make.bash
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,23 @@ CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -tags 'static minimal' -o build/b


# windows/386
#MINGW="/usr/i686-w64-mingw32"
#INCPATH="$MINGW/usr/include"
#PLUGPATH="$MINGW/usr/plugins"
#export CC="i686-w64-mingw32-gcc" CXX="i686-w64-mingw32-g++"
#export PKG_CONFIG="/usr/bin/i686-w64-mingw32-pkg-config"
#export PKG_CONFIG_PATH="$MINGW/usr/lib/pkgconfig:$MINGW/usr/lib/pkgconfig"
#export PKG_CONFIG_LIBDIR="$MINGW/usr/lib/pkgconfig:$MINGW/usr/lib/pkgconfig"
MINGW="/usr/i686-w64-mingw32"
INCPATH="$MINGW/usr/include"
PLUGPATH="$MINGW/usr/plugins"
export CC="i686-w64-mingw32-gcc" CXX="i686-w64-mingw32-g++"
export PKG_CONFIG="/usr/bin/i686-w64-mingw32-pkg-config"
export PKG_CONFIG_PATH="$MINGW/usr/lib/pkgconfig:$MINGW/usr/lib/pkgconfig"
export PKG_CONFIG_LIBDIR="$MINGW/usr/lib/pkgconfig:$MINGW/usr/lib/pkgconfig"

##CGO_LDFLAGS="$CGO_LDFLAGS -lmpv -lopengl32 -lSDL2 -ljpeg -lass -lharfbuzz -luchardet -lavformat -lswscale -lavdevice -llua -lversion -lgdi32 -lopengl32 -lshlwapi -lvfw32 -lwinmm -lstrmiids -lole32 -loleaut32" \
##CGO_LDFLAGS="$CGO_LDFLAGS -lavfilter -lavcodec -lavutil -lswresample -lavresample -lpostproc -lavrt -lsecur32 -lcomctl32 -liconv -luuid -ladvapi32 -lole32 -loleaut32 -lshell32 -lws2_32 -ldwmapi -lz" \
##CGO_LDFLAGS="$CGO_LDFLAGS -lvpx -lvorbisenc -lvorbis -logg -ltheoraenc -ltheoradec -logg -lmp3lame -lfdk-aac -lx264" \
#CGO_CFLAGS="-Wno-unused-parameter -Wno-unused-variable" \
#CGO_CXXFLAGS="-I$INCPATH -I$INCPATH/QtCore -I$INCPATH/QtGui -I$INCPATH/QtWidgets -I$INCPATH/QtNetwork -I$INCPATH/libtorrent -Wno-unused-parameter -Wno-unused-variable" \
#CGO_CXXFLAGS="$CGO_CXXFLAGS -pipe -O2 -std=gnu++11 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -DQT_NETWORK_LIB" \
#CGO_LDFLAGS="-L$MINGW/usr/lib -L$MINGW/lib -L$PLUGPATH/platforms -L$PLUGPATH/generic" \
#CGO_LDFLAGS="$CGO_LDFLAGS -lQt5Core -lz -lpcre16 -ldouble-conversion -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32 -lmpr" \
#CGO_LDFLAGS="$CGO_LDFLAGS -ljpeg -lQt5Network -lQt5Widgets -lQt5Gui -lws2_32 -lpng -lharfbuzz -lz -lopengl32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lglu32 -lopengl32 -liphlpapi -ldnsapi" \
#CGO_LDFLAGS="$CGO_LDFLAGS -lgdi32 -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32 -lmpr -ldouble-conversion -lqtpcre -lqtharfbuzzng" \
#CGO_LDFLAGS="$CGO_LDFLAGS -lQt5Network -lQt5Widgets -lQt5Gui -lQt5Core -lfontconfig -lexpat -lfreetype -lbz2 -lpng16 -lgdi32" \
#CGO_LDFLAGS="$CGO_LDFLAGS -ltorrent-rasterbar -lssl -lcrypto -lgdi32 -lcrypt32 -lboost_system -lws2_32 -lmswsock -lgdi32" \
#CGO_LDFLAGS="$CGO_LDFLAGS -lqwindows -lgdi32 -limm32 -loleaut32 -lwinmm -lQt5PlatformSupport -lfontconfig -lfreetype -lQt5Gui -lole32 -ljpeg -lpng -lharfbuzz -lz -lbz2 -lopengl32 -lQt5Core -lopengl32 -ldouble-conversion -lole32 -lgdi32" \
#CC_FOR_TARGET="i686-w64-mingw32-gcc" CXX_FOR_TARGET="i686-w64-mingw32-g++" \
#CGO_ENABLED=1 GOOS=windows GOARCH=386 go build -tags 'static minimal' -o build/bukanir.exe -v -x -ldflags "-H=windowsgui -linkmode external -s -w"
CGO_CFLAGS="-Wno-unused-parameter -Wno-unused-variable -Wno-return-type" \
CGO_CXXFLAGS="-I$INCPATH -I$INCPATH/QtCore -I$INCPATH/QtGui -I$INCPATH/QtWidgets -I$INCPATH/QtNetwork -I$INCPATH/libtorrent -Wno-unused-parameter -Wno-unused-variable -Wno-return-type" \
CGO_CXXFLAGS="$CGO_CXXFLAGS -pipe -O2 -std=gnu++11 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -DQT_NETWORK_LIB" \
CGO_LDFLAGS="-L$MINGW/usr/lib -L$MINGW/lib -L$PLUGPATH/platforms -L$PLUGPATH/generic -L$PLUGPATH/imageformats" \
CGO_LDFLAGS="$CGO_LDFLAGS -lQt5Core -lz -lpcre16 -ldouble-conversion -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32 -lmpr" \
CGO_LDFLAGS="$CGO_LDFLAGS -ljpeg -lQt5Network -lQt5Widgets -lQt5Gui -lws2_32 -lpng -lharfbuzz -lz -lopengl32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lglu32 -lopengl32 -liphlpapi -ldnsapi" \
CGO_LDFLAGS="$CGO_LDFLAGS -lgdi32 -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32 -lmpr -ldouble-conversion -lqtpcre -lqtharfbuzzng" \
CGO_LDFLAGS="$CGO_LDFLAGS -lQt5Network -lQt5Widgets -lQt5Gui -lQt5Core -lfontconfig -lexpat -lfreetype -lbz2 -lpng16 -lgdi32" \
CGO_LDFLAGS="$CGO_LDFLAGS -ltorrent-rasterbar -lssl -lcrypto -lgdi32 -lcrypt32 -lboost_system -lws2_32 -lmswsock -lgdi32" \
CGO_LDFLAGS="$CGO_LDFLAGS -lqwindows -lqgif -lqjpeg -lgdi32 -limm32 -loleaut32 -lwinmm -luxtheme -ldwmapi -lQt5EventDispatcherSupport -lQt5ThemeSupport -lQt5DeviceDiscoverySupport -lQt5FontDatabaseSupport -lfontconfig -lfreetype -lQt5Gui -lole32 -ljpeg -lpng -lharfbuzz -lz -lbz2 -lopengl32 -lQt5Core -lopengl32 -ldouble-conversion -lole32 -lgdi32" \
CC_FOR_TARGET="i686-w64-mingw32-gcc" CXX_FOR_TARGET="i686-w64-mingw32-g++" \
CGO_ENABLED=1 GOOS=windows GOARCH=386 go build -tags 'static minimal' -o build/bukanir.exe -v -x -ldflags "-H=windowsgui -linkmode external -s -w '-extldflags=-static-libstdc++ -static-libgcc'"
24 changes: 24 additions & 0 deletions desktop/qml/i18n/bukanir.en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,18 @@
<source>Settings</source>
<translation>Settings</translation>
</message>
<message>
<source>Sort By</source>
<translation>Sort By</translation>
</message>
<message>
<source>Seeders</source>
<translation>Seeders</translation>
</message>
<message>
<source>Episodes</source>
<translation>Episodes</translation>
</message>
<message>
<source>Top</source>
<translation>Top</translation>
Expand Down Expand Up @@ -251,5 +263,17 @@
<source>Help</source>
<translation>Help</translation>
</message>
<message>
<source>Tor is not running. Anonymous network is not available.</source>
<translation>Tor is not running. Anonymous network is not available.</translation>
</message>
<message>
<source>Tor is enabled and is running.</source>
<translation>Tor is enabled and is running.</translation>
</message>
<message>
<source>Tor is not enabled. Anonymous network is not available.</source>
<translation>Tor is not enabled. Anonymous network is not available.</translation>
</message>
</context>
</TS>
24 changes: 24 additions & 0 deletions desktop/qml/i18n/bukanir.it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,18 @@
<source>Settings</source>
<translation>Impostazioni</translation>
</message>
<message>
<source>Sort By</source>
<translation>Sort By</translation>
</message>
<message>
<source>Seeders</source>
<translation>Seeders</translation>
</message>
<message>
<source>Episodes</source>
<translation>Episodes</translation>
</message>
<message>
<source>Top</source>
<translation>Migliori</translation>
Expand Down Expand Up @@ -251,5 +263,17 @@
<source>Help</source>
<translation>Aiuto</translation>
</message>
<message>
<source>Tor is not running. Anonymous network is not available.</source>
<translation>Tor is not running. Anonymous network is not available.</translation>
</message>
<message>
<source>Tor is enabled and is running.</source>
<translation>Tor is enabled and is running.</translation>
</message>
<message>
<source>Tor is not enabled. Anonymous network is not available.</source>
<translation>Tor is not enabled. Anonymous network is not available.</translation>
</message>
</context>
</TS>
24 changes: 24 additions & 0 deletions desktop/qml/i18n/bukanir.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,18 @@
<source>Settings</source>
<translation>Settings</translation>
</message>
<message>
<source>Sort By</source>
<translation>Sort By</translation>
</message>
<message>
<source>Seeders</source>
<translation>Seeders</translation>
</message>
<message>
<source>Episodes</source>
<translation>Episodes</translation>
</message>
<message>
<source>Top</source>
<translation>Top</translation>
Expand Down Expand Up @@ -251,5 +263,17 @@
<source>Help</source>
<translation>Help</translation>
</message>
<message>
<source>Tor is not running. Anonymous network is not available.</source>
<translation>Tor is not running. Anonymous network is not available.</translation>
</message>
<message>
<source>Tor is enabled and is running.</source>
<translation>Tor is enabled and is running.</translation>
</message>
<message>
<source>Tor is not enabled. Anonymous network is not available.</source>
<translation>Tor is not enabled. Anonymous network is not available.</translation>
</message>
</context>
</TS>
2 changes: 1 addition & 1 deletion desktop/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func NewSettings(parent *widgets.QWidget) *Settings {
labelDays := widgets.NewQLabel2(tr("Days to keep cache"), widget, 0)

comboLimit := widgets.NewQComboBox(widget)
comboLimit.AddItems([]string{"10", "30", "50", "70", "100"})
comboLimit.AddItems([]string{"10", "30", "50", "70", "100", "150"})

comboDays := widgets.NewQComboBox(widget)
comboDays.AddItems([]string{"3", "7", "30", "90", "180"})
Expand Down
Loading

0 comments on commit 6bbae29

Please sign in to comment.