Merge pull request #651 from WebTools-NG/ukdtom/issue647

Ukdtom/issue647
This commit is contained in:
Tommy Mikkelsen 2022-12-04 21:37:21 +01:00 committed by GitHub
commit 9249f7cd10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 4 deletions

View file

@ -10,6 +10,7 @@
**Changes**:
* [#646 File Count on Download module page](https://github.com/WebTools-NG/WebTools-NG/issues/646) (Enhancement)
* [#647 Download item selection](https://github.com/WebTools-NG/WebTools-NG/issues/647) (Enhancement)
## V1.2.0 ( 20221203 )

View file

@ -583,7 +583,8 @@
"sourceUri": "Uri",
"targetDir": "Target Directory",
"targetFile": "Target File",
"errors": "Errors"
"errors": "Errors",
"subtitle": "Subtitle"
},
"Queue": {
"btnStartQueue": "Start Queue",

View file

@ -154,7 +154,8 @@
MItableConfig: [
{ prop: '_action', name: ' ', actionName: 'actionCommon', width: 10 },
{ prop: 'Key', isHidden: true },
{ prop: 'File',searchable: false,sortable: false, width: 100 },
{ prop: 'Title', searchable: false,sortable: false, width: 100 },
{ prop: 'File', isHidden: true, searchable: false,sortable: false, width: 100 },
{ prop: 'Type',searchable: false,sortable: false, width: 10 },
{ prop: 'Hash',isHidden: true },
{ prop: 'Size', isHidden: true }
@ -243,7 +244,7 @@
const url = `${this.srvBaseAddress}/library/metadata/${key}?${this.uriExclude}`;
let header = wtutils.PMSHeader;
header['X-Plex-Token'] = this.srvToken;
log.debug(`[Download.vue] (getMediaInfo) - Get mediainfo for with url ${url}`);
log.debug(`[Download.vue] (getMediaInfo) - Get mediainfo with url ${url}`);
await axios({
method: 'get',
url: url,
@ -257,6 +258,7 @@
let entry = {};
if ( this.MItableData.map(function(x) {return x.Key; }).indexOf(parts[idx]['key']) == -1){
entry['Key'] = parts[idx]['key'];
entry['Title'] = response['data']['MediaContainer']['Metadata'][0]['title'];
entry['Type'] = response['data']['MediaContainer']['Metadata'][0]['type'];
entry['Size'] = parts[idx]['size'];
for (var x in this.selLibrary['location']){
@ -277,12 +279,14 @@
// Get media file without ext
const mFile = path.parse(parts[idx]['file']).name
for ( x in parts[idx]['Stream']){
if (parts[idx]['Stream'][x]['key'] ){
if ( parts[idx]['Stream'][x]['key'] ){
const streamKey = parts[idx]['Stream'][x]['key'];
if ( this.MItableData.map(function(x) {return x.Key; }).indexOf(streamKey) == -1){
entry = {};
entry['Key'] = parts[idx]['Stream'][x]['key'];
entry['Title'] = `${i18n.t("Modules.Download.mediaInfo.subtitle")} (${parts[idx]['Stream'][x]['language']})`;
entry['Type'] = parts[idx]['Stream'][x]['format'];
entry['Language'] = parts[idx]['Stream'][x]['language'];
entry['File'] = `${mFile}.${parts[idx]['Stream'][x]['languageTag']}.${parts[idx]['Stream'][x]['format']}`;
this.MItableData.push(entry); //Add sub
}