Skip to content

Commit

Permalink
Let Livestreamer use the GUI's client ID. See #310
Browse files Browse the repository at this point in the history
Revert 84d5245
  • Loading branch information
bastimeyer committed Sep 15, 2016
1 parent 9480bc0 commit df63541
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 38 deletions.
2 changes: 0 additions & 2 deletions src/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ import ModalConfirmComponent from "components/modal/ModalConfirmComponent";
import ModalFirstrunComponent from "components/modal/ModalFirstrunComponent";
import ModalFooterComponent from "components/modal/ModalFooterComponent";
import ModalHeaderComponent from "components/modal/ModalHeaderComponent";
import ModalAuthRequiredComponent from "components/modal/ModalAuthRequiredComponent";
import ModalLivestreamerComponent from "components/modal/ModalLivestreamerComponent";
import ModalLogComponent from "components/modal/ModalLogComponent";
import ModalNewreleaseComponent from "components/modal/ModalNewreleaseComponent";
Expand Down Expand Up @@ -444,7 +443,6 @@ export default Application.create({
ModalFirstrunComponent,
ModalFooterComponent,
ModalHeaderComponent,
ModalAuthRequiredComponent,
ModalLivestreamerComponent,
ModalLogComponent,
ModalNewreleaseComponent,
Expand Down
19 changes: 0 additions & 19 deletions src/app/components/modal/ModalAuthRequiredComponent.js

This file was deleted.

6 changes: 6 additions & 0 deletions src/app/models/Livestreamer.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ import {
} from "EmberData";
import { parameters } from "models/LivestreamerParameters";
import Parameter from "utils/Parameter";
import { twitch } from "config";


const { alias } = computed;
const { service } = inject;
const { oauth: { "client-id": clientId } } = twitch;


/**
Expand Down Expand Up @@ -43,6 +45,10 @@ export default Model.extend({
session: alias( "auth.session" ),


// let Livestreamer use the GUI's client-id
clientID: `Client-ID=${clientId}`,


kill() {
var spawn = get( this, "spawn" );
if ( spawn ) {
Expand Down
5 changes: 5 additions & 0 deletions src/app/models/LivestreamerParameters.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ export const parameters = [
"settings.advanced",
"settings.livestreamer_params"
),
new Parameter(
"--http-header",
null,
"clientID"
),
new Parameter(
"--no-version-check"
),
Expand Down
5 changes: 0 additions & 5 deletions src/app/services/LivestreamerService.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ function setIfNotNull( objA, objB, key ) {


export default Service.extend( ChannelSettingsMixin, {
auth: service(),
chat: service(),
modal: service(),
settings: service(),
Expand All @@ -111,10 +110,6 @@ export default Service.extend( ChannelSettingsMixin, {


startStream( stream, quality ) {
if ( !get( this, "auth.session.isLoggedIn" ) ) {
return get( this, "modal" ).openModal( "authRequired" );
}

get( this, "modal" ).openModal( "livestreamer", this, {
error : null,
active: null,
Expand Down
12 changes: 0 additions & 12 deletions src/templates/components/modal/ModalAuthRequiredComponent.hbs

This file was deleted.

0 comments on commit df63541

Please sign in to comment.