diff --git a/.gitignore b/.gitignore index 3c03791..7d29a6b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /.idea flixtorrentz-api.iml build -.DS_Store \ No newline at end of file +.DS_Store +.torrent.bolt.db \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index ae0d8e1..23b2f68 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,10 +2,10 @@ FROM golang:alpine as builder RUN apk add --no-cache git ca-certificates && \ - mkdir -p $GOPATH/src/git.adphi.net/Adphi/SERVICE_NAME && \ + mkdir -p $GOPATH/src/git.adphi.net/Adphi/ytsflix && \ mkdir /build -WORKDIR $GOPATH/src/git.adphi.net/Adphi/SERVICE_NAME +WORKDIR $GOPATH/src/git.adphi.net/Adphi/ytsflix ADD . . RUN go get -u github.com/gobuffalo/packr/... && \ @@ -21,6 +21,9 @@ COPY --from=builder /build/* /bin/ ENV LOG_LEVEL=INFO ENV DATA_DIR=/downloads + +VOLUME /download + EXPOSE 8080 CMD ["ytsflix"] \ No newline at end of file diff --git a/README.md b/README.md index e69de29..b737319 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,24 @@ +# YTSFlix (WIP) + +YTSFlix is web app that allow you to browse YTS.am content, +watch trailers and stream Torrent with available subtitles. + +![Home](images/home.png) +![Movie](images/movie.png) + +## Install with Docker +```bash +docker pull adphi/ytsflix +docker run -d --name ytsflix -v ytsflix:/downloads -e LOG_LEVEL=DEBUG -p 8080:8080 adphi/ytsflix +``` +The app will be available at [http://localhost:8080](http://localhost:8080) + +## Build +```bash +make build +``` + +## Run tests +```bash +make tests +``` \ No newline at end of file diff --git a/cmd/main.go b/cmd/main.go index 764001e..9d0b0f3 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -11,10 +11,11 @@ import ( ) func main() { - var storagePath = "./" + var storagePath = "/tmp" if os.Getenv("DATA_DIR") != "" { storagePath = os.Getenv("DATA_DIR") } + logrus.Infof("Using directory: %s", storagePath) setupLogging() h, err := handler.NewHandler(storagePath) if err != nil { @@ -38,10 +39,11 @@ func setupLogging() { level := os.Getenv("LOG_LEVEL") l := logrus.ErrorLevel for _, ll := range logrus.AllLevels { - if strings.ToUpper(level) == string(ll) { + if strings.ToLower(level) == ll.String() { l = ll break } } logrus.SetLevel(l) + logrus.Infof("Setting LOG_LEVEL: %s", l) } diff --git a/images/home.png b/images/home.png new file mode 100644 index 0000000..133390e Binary files /dev/null and b/images/home.png differ diff --git a/images/movie.png b/images/movie.png new file mode 100644 index 0000000..d6394a6 Binary files /dev/null and b/images/movie.png differ diff --git a/static/index.html b/static/index.html index afd3376..264758f 100644 --- a/static/index.html +++ b/static/index.html @@ -15,6 +15,7 @@ width: 100%; } .section { + padding: 0px 10px 0px 10px; display: flex; flex-direction: row; align-items: center; @@ -125,7 +126,7 @@ transform: translate3d(-10.724999999999994px, 0, 0); } .row__inner:hover .tile { - opacity: 0.3; + opacity: 0.6; } .row__inner:hover .tile:hover { -webkit-transform: scale(1.15); diff --git a/vendor/vendor.json b/vendor/vendor.json index 53e9e7e..3b63574 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -556,5 +556,5 @@ "revisionTime": "2017-12-12T22:16:18Z" } ], - "rootPath": "git.adphi.net/Adphi/flixtorrentz-api" + "rootPath": "git.adphi.net/Adphi/ytsflix" }