Merge branch 'release/3.1.0' into develop
This commit is contained in:
commit
dc48fdbe68
|
@ -153,7 +153,7 @@
|
|||
<my-select-options
|
||||
id="liveTranscodingProfile"
|
||||
formControlName="profile"
|
||||
[items]="getAvailableTranscodingProfile()"
|
||||
[items]="transcodingProfiles"
|
||||
[clearable]="false"
|
||||
>
|
||||
</my-select-options>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
import { SelectOptionsItem } from 'src/types/select-options-item.model'
|
||||
import { Component, Input, OnInit } from '@angular/core'
|
||||
import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core'
|
||||
import { FormGroup } from '@angular/forms'
|
||||
import { ServerConfig } from '@shared/models'
|
||||
import { ConfigService } from '../shared/config.service'
|
||||
|
@ -11,12 +11,14 @@ import { EditConfigurationService, ResolutionOption } from './edit-configuration
|
|||
templateUrl: './edit-live-configuration.component.html',
|
||||
styleUrls: [ './edit-custom-config.component.scss' ]
|
||||
})
|
||||
export class EditLiveConfigurationComponent implements OnInit {
|
||||
export class EditLiveConfigurationComponent implements OnInit, OnChanges {
|
||||
@Input() form: FormGroup
|
||||
@Input() formErrors: any
|
||||
@Input() serverConfig: ServerConfig
|
||||
|
||||
transcodingThreadOptions: SelectOptionsItem[] = []
|
||||
transcodingProfiles: SelectOptionsItem[] = []
|
||||
|
||||
liveMaxDurationOptions: SelectOptionsItem[] = []
|
||||
liveResolutions: ResolutionOption[] = []
|
||||
|
||||
|
@ -39,7 +41,13 @@ export class EditLiveConfigurationComponent implements OnInit {
|
|||
this.liveResolutions = this.editConfigurationService.getLiveResolutions()
|
||||
}
|
||||
|
||||
getAvailableTranscodingProfile () {
|
||||
ngOnChanges (changes: SimpleChanges) {
|
||||
if (changes['serverConfig']) {
|
||||
this.transcodingProfiles = this.buildAvailableTranscodingProfile()
|
||||
}
|
||||
}
|
||||
|
||||
buildAvailableTranscodingProfile () {
|
||||
const profiles = this.serverConfig.live.transcoding.availableProfiles
|
||||
|
||||
return profiles.map(p => {
|
||||
|
|
|
@ -181,7 +181,7 @@
|
|||
<my-select-options
|
||||
id="transcodingProfile"
|
||||
formControlName="profile"
|
||||
[items]="getAvailableTranscodingProfile()"
|
||||
[items]="transcodingProfiles"
|
||||
[clearable]="false"
|
||||
></my-select-options>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
import { SelectOptionsItem } from 'src/types/select-options-item.model'
|
||||
import { Component, Input, OnInit } from '@angular/core'
|
||||
import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core'
|
||||
import { FormGroup } from '@angular/forms'
|
||||
import { ServerConfig } from '@shared/models'
|
||||
import { ConfigService } from '../shared/config.service'
|
||||
|
@ -11,12 +11,13 @@ import { EditConfigurationService, ResolutionOption } from './edit-configuration
|
|||
templateUrl: './edit-vod-transcoding.component.html',
|
||||
styleUrls: [ './edit-custom-config.component.scss' ]
|
||||
})
|
||||
export class EditVODTranscodingComponent implements OnInit {
|
||||
export class EditVODTranscodingComponent implements OnInit, OnChanges {
|
||||
@Input() form: FormGroup
|
||||
@Input() formErrors: any
|
||||
@Input() serverConfig: ServerConfig
|
||||
|
||||
transcodingThreadOptions: SelectOptionsItem[] = []
|
||||
transcodingProfiles: SelectOptionsItem[] = []
|
||||
resolutions: ResolutionOption[] = []
|
||||
|
||||
constructor (
|
||||
|
@ -31,7 +32,13 @@ export class EditVODTranscodingComponent implements OnInit {
|
|||
this.checkTranscodingFields()
|
||||
}
|
||||
|
||||
getAvailableTranscodingProfile () {
|
||||
ngOnChanges (changes: SimpleChanges) {
|
||||
if (changes['serverConfig']) {
|
||||
this.transcodingProfiles = this.buildAvailableTranscodingProfile()
|
||||
}
|
||||
}
|
||||
|
||||
buildAvailableTranscodingProfile () {
|
||||
const profiles = this.serverConfig.transcoding.availableProfiles
|
||||
|
||||
return profiles.map(p => {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { DatePipe } from '@angular/common'
|
||||
import { Component, Input, OnChanges, OnInit } from '@angular/core'
|
||||
import { Component, Input, OnChanges } from '@angular/core'
|
||||
import { FromNowPipe } from '../angular/from-now.pipe'
|
||||
|
||||
@Component({
|
||||
|
@ -14,10 +13,7 @@ export class DateToggleComponent implements OnChanges {
|
|||
dateRelative: string
|
||||
dateAbsolute: string
|
||||
|
||||
constructor (
|
||||
private datePipe: DatePipe,
|
||||
private fromNowPipe: FromNowPipe
|
||||
) { }
|
||||
constructor (private fromNowPipe: FromNowPipe) { }
|
||||
|
||||
ngOnChanges () {
|
||||
this.updateDates()
|
||||
|
|
|
@ -5,7 +5,8 @@ $playlist-menu-width: 350px;
|
|||
right: 0;
|
||||
height: 100%;
|
||||
width: $playlist-menu-width;
|
||||
background: rgba(0, 0, 0, 0.8);
|
||||
// !important to prevent none background set on focus
|
||||
background: rgba(0, 0, 0, 0.8) !important;
|
||||
z-index: 101;
|
||||
transition: right 0.2s;
|
||||
overflow-y: scroll;
|
||||
|
|
|
@ -76,7 +76,7 @@ function getYoutubeDLSubs (url: string, opts?: object): Promise<YoutubeDLSubs> {
|
|||
logger.debug('Get subtitles from youtube dl.', { url, files })
|
||||
|
||||
const subtitles = files.reduce((acc, filename) => {
|
||||
const matched = filename.match(/\.([a-z]{2})\.(vtt|ttml)/i)
|
||||
const matched = filename.match(/\.([a-z]{2})(-[a-z]+)?\.(vtt|ttml)/i)
|
||||
if (!matched || !matched[1]) return acc
|
||||
|
||||
return [
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
import * as Sequelize from 'sequelize'
|
||||
|
||||
async function up (utils: {
|
||||
transaction: Sequelize.Transaction
|
||||
queryInterface: Sequelize.QueryInterface
|
||||
sequelize: Sequelize.Sequelize
|
||||
db: any
|
||||
}): Promise<void> {
|
||||
|
||||
await utils.sequelize.query(
|
||||
'DELETE FROM "videoCaption" v1 USING (SELECT MIN(id) as id, "filename" FROM "videoCaption" ' +
|
||||
'GROUP BY "filename" HAVING COUNT(*) > 1) v2 WHERE v1."filename" = v2."filename" AND v1.id <> v2.id'
|
||||
)
|
||||
}
|
||||
|
||||
function down (options) {
|
||||
throw new Error('Not implemented.')
|
||||
}
|
||||
|
||||
export {
|
||||
up,
|
||||
down
|
||||
}
|
|
@ -917,7 +917,7 @@ export class VideoModel extends Model {
|
|||
},
|
||||
include: [
|
||||
{
|
||||
attributes: [ 'language', 'fileUrl' ],
|
||||
attributes: [ 'filename', 'language', 'fileUrl' ],
|
||||
model: VideoCaptionModel.unscoped(),
|
||||
required: false
|
||||
},
|
||||
|
|
|
@ -2646,6 +2646,11 @@ paths:
|
|||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
total:
|
||||
type: integer
|
||||
example: 1
|
||||
data:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/VideoChannel'
|
||||
|
|
Loading…
Reference in New Issue