PhpDev.App
hakanersu/iwatched

hakanersu/iwatched

Stars: 122

Forks: 9

Pull Requests: 23

Issues: 6

Watchers: 4

Last Updated: 2022-03-19 11:29:53

Track movies or tv shows you watched.

License:

Languages: PHP, Shell, Vue, Dockerfile, Blade

iWatched

I am currently working on a new version which you can find in pull requests. Also here is a demo

iWatched is movie, tv series tracker for personal usage. iWatched uses imdb dataset. By a command it downloads all required datasets, unzips and imports to PostgreSQL database.

Import part is done by native PostgreSql command copy with Eloquent query builder. Part of the importing process also added weight column which will help ranking more accurately. You can find more information about imdb ranking algorithm here.

Searching

By default search is done by elasticsearch if you wish to search directly from database add ELASTICSEARCH=false variable to you .env file. Keep in mind database search is very slow.

ElasticSearch

You can use abc tool to import titles table. After that you will get pretty fast search results.

abc import --src_type=postgres --src_filter=titles --src_uri="postgresql://postgres:<your-password>@127.0.0.1:5432/<database-name>" "http://localhost:9200/titles"

Image of Searching

You can also use some shortcuts to find desired title.

the gift :year 2000
tt0903747 :imdb

Movies

Image of Movies

Series

Image of Series

Posters

Posters automatically fetched from themoviedb.org and stored at default storage.

Commands

php artisan import:titles

You can skip tables.

php artisan import:titles --skip=title

Or import only given tables.

php artisan import:titles --only=rating

Docker compose

Check .env.example file and be sure above ports not used.

PSQL_PORT=5439:5432
APP_PORT=8000:8000

Commands

docker-compose up -d

# If you getting any error when storage:link just remove public/storage folder.
docker-compose run --rm --no-deps iwatched-server php artisan storage:link
# This will migrate basic user tables.
docker-compose run --rm --no-deps iwatched-server php artisan migrate
# Downloads imdb dataset if its not already downloaded and imports to pgsql.
docker-compose run --rm --no-deps iwatched-server php artisan import:titles

You can now access app http://localhost:8000 with this url.

# If you start docker-compose recently please wait es cluster up and try again.
docker-compose run --rm --no-deps iwatched-server php artisan import:elastic

After first run you can start/stop app with below commands.

docker-compose start
docker-compose stop

TODO

  • Minio/AWS integration for posters.

RELEASES

See all