Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
* upstream/master: (36 commits)
  docker: use alpine:edge base image for building
  Refactor geo-bypass
  shard: update to crystal 0.30.1
  shard: update dependencies
  Format Crystal files
  Fix annoying typo in Preferences view
  travis: also test Docker build
  Fix typo in ConfigPreferences
  Update videojs-http-source-selector
  Force redirect for videos without audio
  Add support for player styles
  Format history.ecr
  Update icon for unlisted videos
  Fix detection of unavailable videos
  shard: update dependencies
  Fix detection of premium content
  Fix overflow for channel description
  Bump Crystal version
  Add Travis CI and pin dependencies (iv-org#655)
  docker: various improvements to Dockerfile
  ...
  • Loading branch information
greentornado committed Aug 15, 2019
2 parents ba4a0e5 + 19eceb4 commit 0bdc8a9
Show file tree
Hide file tree
Showing 27 changed files with 352 additions and 179 deletions.
28 changes: 28 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
dist: bionic

jobs:
include:
- stage: build
language: crystal
crystal: latest
before_install:
- shards update
- shards install
install:
- crystal build --error-on-warnings src/invidious.cr
script:
- crystal tool format --check
- crystal spec

- stage: build_docker
language: minimal
services:
- docker
install:
- docker-compose build
script:
- docker-compose up -d
- sleep 15 # Wait for cluster to become ready, TODO: do not sleep
- HEADERS="$(curl -I -s http://localhost:3000/)"
- STATUS="$(echo $HEADERS | head -n1)"
- if [[ "$STATUS" != *"200 OK"* ]]; then echo "$HEADERS"; exit 1; fi
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Invidious

[![Build Status](https://travis-ci.org/omarroth/invidious.svg?branch=master)](https://travis-ci.org/omarroth/invidious)

## Invidious is an alternative front-end to YouTube

- Audio-only mode (and no need to keep window open on mobile)
Expand Down
23 changes: 22 additions & 1 deletion assets/css/default.css
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ img.thumbnail {
}

.navbar > .searchbar .pure-form input[type="search"] {
margin-bottom: 1px;

border-top: 0;
border-left: 0;
border-right: 0;
Expand All @@ -169,7 +171,6 @@ img.thumbnail {

box-shadow: none;

transition: 0.1s border-bottom;
-webkit-appearance: none;
}

Expand All @@ -188,6 +189,7 @@ input[type="search"]::-webkit-search-cancel-button {

/* attract focus to the searchbar by adding a subtle transition */
.navbar > .searchbar .pure-form input[type="search"]:focus {
margin-bottom: 0px;
border-bottom: 2px solid #aaa;
}

Expand Down Expand Up @@ -431,3 +433,22 @@ video.video-js {
.pure-control-group label {
word-wrap: normal;
}

.video-js.player-style-invidious {
/* This is already the default */
}

.video-js.player-style-youtube .vjs-control-bar {
display: flex;
flex-direction: row;
}
.video-js.player-style-youtube .vjs-big-play-button {
/*
Styles copied from video-js.min.css, definition of
.vjs-big-play-centered .vjs-big-play-button
*/
top: 50%;
left: 50%;
margin-top: -.81666em;
margin-left: -1.5em;
}
2 changes: 1 addition & 1 deletion assets/css/videojs-http-source-selector.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* videojs-http-source-selector
* @version 1.1.5
* @version 1.1.6
* @copyright 2019 Justin Fujita <Justin@pivotshare.com>
* @license MIT
*/
Expand Down
4 changes: 2 additions & 2 deletions assets/js/videojs-http-source-selector.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 25 additions & 12 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,28 @@
FROM archlinux/base

RUN pacman -Sy --noconfirm shards crystal imagemagick librsvg \
which pkgconf gcc ttf-liberation glibc
# base-devel contains many other basic packages, that are normally assumed to already exist on a clean arch system

ADD . /invidious

FROM alpine:edge AS builder
RUN apk add -u crystal shards libc-dev \
yaml-dev libxml2-dev sqlite-dev sqlite-static zlib-dev openssl-dev
WORKDIR /invidious
COPY ./shard.yml ./shard.yml
RUN shards update && shards install
COPY ./src/ ./src/
# TODO: .git folder is required for building – this is destructive.
# See definition of CURRENT_BRANCH, CURRENT_COMMIT and CURRENT_VERSION.
COPY ./.git/ ./.git/
RUN crystal build --static --release \
# TODO: Remove next line, see https://github.com/crystal-lang/crystal/issues/7946
-Dmusl \
./src/invidious.cr

RUN sed -i 's/host: localhost/host: postgres/' config/config.yml && \
shards update && shards install && \
crystal build src/invidious.cr

FROM alpine:latest
RUN apk add -u imagemagick ttf-opensans
WORKDIR /invidious
RUN addgroup -g 1000 -S invidious && \
adduser -u 1000 -S invidious -G invidious
COPY ./assets/ ./assets/
COPY ./config/config.yml ./config/config.yml
COPY ./config/sql/ ./config/sql/
COPY ./locales/ ./locales/
RUN sed -i 's/host: localhost/host: postgres/' config/config.yml
COPY --from=builder /invidious/invidious .
USER invidious
CMD [ "/invidious/invidious" ]
26 changes: 13 additions & 13 deletions locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
"Clear watch history?": "Verlauf löschen?",
"New password": "Neues Passwort",
"New passwords must match": "Neue Passwörter müssen übereinstimmen",
"Cannot change password for Google accounts": "Das Passwort für Google -Konten kann nicht geändert werden",
"Cannot change password for Google accounts": "Das Passwort für Google-Konten kann nicht geändert werden",
"Authorize token?": "Token autorisieren?",
"Authorize token for `x`?": "Token für `x` autorisieren?",
"Yes": "Ja",
"No": "Nein",
"Import and Export Data": "Import und Export Daten",
"Import and Export Data": "Daten importieren und exportieren",
"Import": "Importieren",
"Import Invidious data": "Invidious Daten importieren",
"Import YouTube subscriptions": "YouTube Abonnements importieren",
Expand All @@ -39,18 +39,18 @@
"source": "Quelle",
"Log in": "Einloggen",
"Log in/register": "Einloggen/Registrieren",
"Log in with Google": "In Google einloggen",
"Log in with Google": "Mit Google einloggen",
"User ID": "Benutzer ID",
"Password": "Passwort",
"Time (h:mm:ss):": "Zeit (h:mm:ss):",
"Text CAPTCHA": "Text CAPTCHA",
"Image CAPTCHA": "Image CAPTCHA",
"Image CAPTCHA": "Bild CAPTCHA",
"Sign In": "Einloggen",
"Register": "Registrieren",
"E-mail": "Email",
"Google verification code": "Google Bestätigungscode",
"Preferences": "Einstellungen",
"Player preferences": "Playereinstellungen",
"Player preferences": "Wiedergabeeinstellungen",
"Always loop: ": "Immer wiederholen: ",
"Autoplay: ": "Automatisch abspielen: ",
"Play next by default: ": "Standardmäßig als nächstes abspielen: ",
Expand All @@ -59,7 +59,7 @@
"Proxy videos: ": "Proxy-Videos? ",
"Default speed: ": "Standardgeschwindigkeit: ",
"Preferred video quality: ": "Bevorzugte Videoqualität: ",
"Player volume: ": "Playerlautstärke: ",
"Player volume: ": "Wiedergabelautstärke: ",
"Default comments: ": "Standardkommentare: ",
"youtube": "youtube",
"reddit": "reddit",
Expand Down Expand Up @@ -90,7 +90,7 @@
"`x` is live": "`x` ist live",
"Data preferences": "Dateneinstellungen",
"Clear watch history": "Verlauf löschen",
"Import/export data": "Daten im- exportieren",
"Import/export data": "Daten im-/exportieren",
"Change password": "Passwort ändern",
"Manage subscriptions": "Abonnements verwalten",
"Manage tokens": "Token verwalten",
Expand All @@ -106,7 +106,7 @@
"Report statistics: ": "Statistiken berichten? ",
"Save preferences": "Einstellungen speichern",
"Subscription manager": "Abonnementverwaltung",
"Token manager": "Token-Manager",
"Token manager": "Token-Verwaltung",
"Token": "Token",
"`x` subscriptions": "`x` Abonnements",
"`x` tokens": "`x` Tokens",
Expand Down Expand Up @@ -136,7 +136,7 @@
"Shared `x`": "Geteilt `x`",
"`x` views": "`x` Ansichten",
"Premieres in `x`": "Premieren in `x`",
"Premieres `x`": "",
"Premieres `x`": "Erster Start `x`",
"Hi! Looks like you have JavaScript turned off. Click here to view comments, keep in mind they may take a bit longer to load.": "Hallo! Anscheinend haben Sie JavaScript deaktiviert. Klicken Sie hier um Kommentare anzuzeigen, beachten sie dass es etwas länger dauern kann um sie zu laden.",
"View YouTube comments": "YouTube Kommentare anzeigen",
"View more comments on Reddit": "Mehr Kommentare auf Reddit anzeigen",
Expand Down Expand Up @@ -177,9 +177,9 @@
"Hidden field \"challenge\" is a required field": "Verstecktes Feld \"challenge\" ist eine erforderliche Eingabe",
"Hidden field \"token\" is a required field": "Verstecktes Feld \"token\" ist eine erforderliche Eingabe",
"Erroneous challenge": "Ungültiger Test",
"Erroneous token": "Ungöltige Marke",
"Erroneous token": "Ungültiger Token",
"No such user": "Ungültiger Benutzer",
"Token is expired, please try again": "Marke ist abgelaufen, bitte erneut versuchen",
"Token is expired, please try again": "Token ist abgelaufen, bitte erneut versuchen",
"English": "Englisch",
"English (auto-generated)": "Englisch (automatisch erzeugt)",
"Afrikaans": "Afrikaans",
Expand Down Expand Up @@ -310,12 +310,12 @@
"%A %B %-d, %Y": "%A %B %-d, %Y",
"(edited)": "(editiert)",
"YouTube comment permalink": "YouTube-Kommentar Permalink",
"permalink": "",
"permalink": "Permalink",
"`x` marked it with a ❤": "`x` markierte es mit einem ❤",
"Audio mode": "Audiomodus",
"Video mode": "Videomodus",
"Videos": "Videos",
"Playlists": "Wiedergabelisten",
"Community": "",
"Community": "Community",
"Current version: ": "Aktuelle Version: "
}
Loading

0 comments on commit 0bdc8a9

Please sign in to comment.