Fix logging level, improved README.md

This commit is contained in:
Adphi 2018-11-04 16:39:38 +01:00
parent cef5d1c3d6
commit 62d3df0725
8 changed files with 38 additions and 7 deletions

3
.gitignore vendored
View File

@ -1,4 +1,5 @@
/.idea
flixtorrentz-api.iml
build
.DS_Store
.DS_Store
.torrent.bolt.db

View File

@ -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"]

View File

@ -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
```

View File

@ -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)
}

BIN
images/home.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 MiB

BIN
images/movie.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

View File

@ -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);

2
vendor/vendor.json vendored
View File

@ -556,5 +556,5 @@
"revisionTime": "2017-12-12T22:16:18Z"
}
],
"rootPath": "git.adphi.net/Adphi/flixtorrentz-api"
"rootPath": "git.adphi.net/Adphi/ytsflix"
}