Giter Site home page Giter Site logo

dentrax / gmdb Goto Github PK

View Code? Open in Web Editor NEW
234.0 8.0 12.0 27.36 MB

GMDB is the ultra-simple, cross-platform Movie Library with Features (Search, Take Note, Watch Later, Like, Import, Learn, Instantly Torrent Magnet Watch)

License: GNU General Public License v3.0

Shell 0.24% Go 99.76%
imdb imdb-webscrapping movie-database movies movie rottentomatoes rotten-tomatoes scraper goquery torrent

gmdb's Introduction

GMDB   Tweet

License: GPL v3 Open Source Love Build Status codecov FOSSA Status Sourcegraph

GMDB is the ultra-simple, open-source, cross-platform Movie Library with Features (Search, Take Note, Watch Later, Like, Import, Learn)

Warning: Are you binge watcher? Let the fun begin with: SEARCH-WATCH-REPEAT!

asciicast

What It Is

Features

How To Use

Installation

Configuration

Requirements

Dependencies

About

Collaborators

Branches

Copyright & Licensing

Contributing

Contact

What It Is

GMDB is the painless, ultra-simple, open-source, cross-platform Movie Library built in Golang

Screenshots

Search

IMDB

Search Result

IMDB

Questions

IMDB

Note

IMDB

Features

  • Search movies from IMDB and RottenTomatoes (without API key)

  • Search magnet links from 1337.x. LEGAL_DISCLAIMER

  • Watch the movie Trailers with MPV that fetched from IMDB

  • Play the torrent magnet links directly (peerflix)

  • Take the personal notes for the movies

  • Personal movie list (Watch Later, Movies Like)

  • AI Learning for your Movies list (SOON)

  • Terminal compatible colorful output

  • Import your movie data from your Netflix data Learn More

  • Store your datas in SQLite Database

  • Local Movie Database with SQLite

How To Use

Play Cast: asciinema play screenshots/asciinema.cast

  1. help command:
$ ./GMDB help
  1. search command:
$ ./GMDB search movie to search
  1. learn command:
$ ./GMDB learn ~/path/to/your/import/data.extension
  1. history command:
$ ./GMDB history
  1. list command:
$ ./GMDB list
  1. note command:
$ ./GMDB note
  1. torrent command:
$ ./GMDB torrent movie to search
  1. update command:
$ ./GMDB update

Installation

Simply just build from remote URL:

$ go get -u github.com/Dentrax/GMDB; go build -o ./GMDB github.com/Dentrax/GMDB

or

  1. Clone the project to your computer and navigate to folder by executing the following command:
$ git clone https://github.com/Dentrax/GMDB.git && cd ./GMDB/
  • Run this command if you want to test project before build & install
$ go test -v -cover -race ./...
  • Run this command to get required packages before build & install
$ go get -v ./...
  1. Build the all project using this command
$ go build .
  1. Install the GMDB with following command
$ go install .

Install the dependencies:

$ brew cask install mpv
$ brew install youtube-dl
$ npm install -g peerflix

Configuration

You can use custom file with config arg:

$ ./GMDB --config=/path/to/config search movie to search

Default config path is: ./config.ini

Example config.ini file:

[log]
path = /path/to/log
name = my-movie-logger
ext = .log
format = date

[cache]
use-cache=false
search-cache=true
movie-cache=true
trailer-cache=true

Known Issues

  • --no-color argument option not working for every situation

  • mpv and peerflix are hard-coded necessary to operation

  • The situation without the Internet has not been tested yet

  • Not tested in Windows

  • I am absolutely sure there may be many untested cases. ^^

TO-DO

  • Add comments for functions

  • Add benchmark tests for service parsers

  • Add tests for Netflix data import

  • Add Encrypt/Decrypt features to the database

  • Add Live tests for IMDB

  • Add Live tests for RottenTomatoes

  • Add Live tests for 1337x torrent service

  • Sync database for some services (Evernote, Keep, etc.)

  • Export/Import the database as a .org format for orgmode

  • New search services

  • Support for media players other than MPV

  • gmdb.go file is too long and bad. Make it simple as possible

Requirements

  • mpv: A free, open source, and cross-platform media player Learn More

  • peerflix: Streaming torrent clients Learn More

  • You will need a computer on which you have the rights to compile files

Dependencies

  • Please see Copyright & Licensing section for more information

About

GMDB was created to serve three purposes:

GMDB is your painless CLI movie browser

  1. To act as a painless CLI movie browser

  2. To provide a simplest and easiest way to search and watch movies

  3. There is a source for you to develop your own CLI browser in Golang

Collaborators

Project Manager - Furkan Türkal (GitHub: Dentrax)

Branches

We publish source for the [GMDB] in single rolling branch:

The master branch is extensively tested and makes a great starting point. Also tracks live changes by commits.

Copyright & Licensing

The base project code is copyrighted by Furkan 'Dentrax' Türkal and is covered by single licence.

All program code (i.e. .go) is licensed under GNU GPLv3 License unless otherwise specified. Please see the LICENSE.md file for more information.

Package Author License
go-sqlite3 mattn MIT
go-ini Unknwon Apache 2.0
goconvey SmartyStreets MIT
goquery PuerkitoBio BSD 3
spinner briandowns Apache 2.0
chalk ttacon MIT
parsetorrentname middelink MIT
sqlx jmoiron MIT

FOSSA Status

References

While this repository is being prepared, it may have been quoted from some sources that already mentioned on specific files.

If there is an unspecified source or if you think that I made a copyright infringement, please contact with me.

Special Thanks

Contributing

Please check the CONTRIBUTING.md file for contribution instructions and naming guidelines.

Contact

GMDB was created by Furkan 'Dentrax' Türkal

You can contact by URL: CONTACT

Best Regards

gmdb's People

Contributors

dentrax avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gmdb's Issues

Unable to install

I'm unable to install it

https://termbin.com/05y9

I'm not sure if this is the right place to mention it though.

sqlite3-binding.c: In function ‘sqlite3SelectNew’:
sqlite3-binding.c:128049:10: warning: function may return address of local variable [-Wreturn-local-addr]
128049 |   return pNew;
       |          ^~~~
sqlite3-binding.c:128009:10: note: declared here
128009 |   Select standin;
       |          ^~~~~~~

Installing go-sqlite3 manually gives me the same error message

Search Error

I don't know why I'm getting this error when I try to search anything.

Example: GMDB search batman

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x8177d1]

goroutine 1 [running]:
flag.(*FlagSet).Lookup(...)
        /home/vagrant/.go/src/flag/flag.go:411
github.com/urfave/cli.lookupFlagSet(0x9e3ae6, 0x6, 0xc0000c3900, 0xc0000ab100)
        /home/vagrant/go/src/github.com/urfave/cli/context.go:153 +0x71
github.com/urfave/cli.(*Context).Bool(0xc0000c3900, 0x9e3ae6, 0x6, 0xc0000ab100)
        /home/vagrant/go/src/github.com/urfave/cli/flag_bool.go:90 +0x3f
main.main.func1(0xc0000c3900, 0x14, 0x28)
        /home/vagrant/go/src/github.com/Dentrax/GMDB/main.go:141 +0xad
github.com/urfave/cli.(*Command).Run(0xc0000ecd80, 0xc0000c3380, 0x0, 0x0)
        /home/vagrant/go/src/github.com/urfave/cli/command.go:161 +0x4ae
github.com/urfave/cli.(*App).RunContext(0xc000080780, 0xa94d80, 0xc0000a4010, 0xc00008e150, 0x3, 0x3, 0x0, 0x0)
        /home/vagrant/go/src/github.com/urfave/cli/app.go:302 +0x785
github.com/urfave/cli.(*App).Run(...)
        /home/vagrant/go/src/github.com/urfave/cli/app.go:211
main.main()
        /home/vagrant/go/src/github.com/Dentrax/GMDB/main.go:428 +0x1676

I did install this by running go get -u github.com/Dentrax/GMDB which installs all the dependencies under the $GOPATH/src and builds the binary under $GOPATH/bin.

I don't know if it being done that way does not work, or it is a kind of bug on the code.

Searching with whitespaces gets a 400 error

After installing, this is what I get from searching "star wars".

…/github.com/Dentrax/GMDB # master took 3s 
➜ GMDB search "star wars"
 
 ██████╗ ███╗   ███╗██████╗ ██████╗
██╔════╝ ████╗ ████║██╔══██╗██╔══██╗
██║  ███╗██╔████╔██║██║  ██║██████╔╝
██║   ██║██║╚██╔╝██║██║  ██║██╔══██╗
╚██████╔╝██║ ╚═╝ ██║██████╔╝██████╔╝
 ╚═════╝ ╚═╝     ╚═╝╚═════╝ ╚═════╝

◣ 2019/12/30 21:21:30 status code error: 400 400 Bad Request

After performing some tests, it seems related to the use of whitespace inside the query string.

Empty torrent list

I get no torrents to choose from, it is not just this show I've tried several like the joker movie but still no result.

$ ./GMDB search the good doctor

 ██████╗ ███╗   ███╗██████╗ ██████╗
██╔════╝ ████╗ ████║██╔══██╗██╔══██╗
██║  ███╗██╔████╔██║██║  ██║██████╔╝
██║   ██║██║╚██╔╝██║██║  ██║██╔══██╗
╚██████╔╝██║ ╚═╝ ██║██████╔╝██████╔╝
 ╚═════╝ ╚═╝     ╚═╝╚═════╝ ╚═════╝


From IMDB
 1) The Good Doctor (2017)
 2) The Good Doctor (I)
 3) The Good Doctor (2021)
 4) The Making of a Hollywood Madam (1996)
 5) The Good Doctor (2009)
 6) The Good Doctor (1978)
 7) Blackout (I)
 8) The Good Doctor Bodkin-Adams (1986)
 9) Good Doctor (2013)
10) The Good Doctor (2000)
 0) 190 more...

(Enter 'q' to exit)
Please select your choice: 5

Getting information...

Movie Name:  The Good Doctor
Year:  2009
Released:  18 May 2009 (France)
Rating:  8.7/10 (12)
Genres:  Short, Drama
Duration:  15min
Summary:  An aging ex-Nazi doctor decides to tell the truth about his past to his son Alex.
Directors:  Rick Larkin
Writers:  Rick Larkin
Stars:  Mark Huberman, David Kelly, Natalia Kostrzewa

:: Did you watch this movie before? [y/N] N
:: Do you want to watch this movie now? [Y/n] Y
:: I have read and agree to the LEGAL_DISCLAIMER.md for torrent usage. [Y/n] Y

(Enter 'q' to exit)
Please select your choice:

I do have peerflix installed:

$ which peerflix
/usr/bin/peerflix

I installed this (GMDB) using manual installation, cause the short one didn't work.
it created a file called GMDB, but didn't install it in the system.

Im on linux, specifically Arch Linux, kernel: 5.12.10-arch1-1

Build/Install fails.

Got a few type errors/warnings while building, and then install failed. I don't know enough about Go to begin to debug this; any help appreciated.

# github.com/Dentrax/GMDB/pkg
../../.go/src/github.com/Dentrax/GMDB/pkg/gmdb.go:527:40: cannot use c.Args() (type cli.Args) as type []string in argument to strings.Join
../../.go/src/github.com/Dentrax/GMDB/pkg/gmdb.go:594:38: cannot use c.Args() (type cli.Args) as type []string in argument to strings.Join
../../.go/src/github.com/Dentrax/GMDB/pkg/gmdb.go:695:43: cannot use c.Args() (type cli.Args) as type []string in argument to strings.Join

$ go install .
go install: no install location for directory /home/username/GMDB outside GOPATH
	For more details see: 'go help gopath'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.