Skip to content

Commit

Permalink
Merge pull request #858 from AI4Bharat/revert-857-minorchange001
Browse files Browse the repository at this point in the history
Revert "changes for export filename"
  • Loading branch information
kartikvirendrar authored Dec 19, 2024
2 parents 1d54efa + 832e054 commit 2c500f5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 16 deletions.
8 changes: 4 additions & 4 deletions src/containers/Organization/OrgLevelTaskList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,8 @@ const OrgLevelTaskList = () => {

if (res.ok) {
const resp = await res.blob();
const filename = res.headers.get('content-type');
exportFile(resp, currentTaskDetails, transcript, "transcription", filename);

exportFile(resp, currentTaskDetails, transcript, "transcription");
} else {
const resp = await res.json();

Expand Down Expand Up @@ -486,8 +486,8 @@ const OrgLevelTaskList = () => {

if (res.ok) {
const resp = await res.blob();
const filename = res.headers.get('content-type');
exportFile(resp, currentTaskDetails, translate, "translation", filename);

exportFile(resp, currentTaskDetails, translate, "translation");
} else {
const resp = await res.json();

Expand Down
8 changes: 4 additions & 4 deletions src/containers/Organization/Project/TaskList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -534,8 +534,8 @@ const TaskList = () => {

if (res.ok) {
const resp = await res.blob();
const filename = res.headers.get('content-type');
exportFile(resp, currentTaskDetails, transcript, "transcription", filename);

exportFile(resp, currentTaskDetails, transcript, "transcription");
} else {
const resp = await res.json();

Expand Down Expand Up @@ -575,8 +575,8 @@ const TaskList = () => {

if (res.ok) {
const resp = await res.blob();
const filename = res.headers.get('content-type');
exportFile(resp, currentTaskDetails, translate, "translation", filename);

exportFile(resp, currentTaskDetails, translate, "translation");
} else {
const resp = await res.json();

Expand Down
8 changes: 4 additions & 4 deletions src/containers/Organization/Video/VoiceOverRightPanel1.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -789,8 +789,8 @@ const VoiceOverRightPanel1 = ({ currentIndex, setCurrentIndex, showTimeline, seg

if (res.ok) {
const resp = await res.blob();
const filename = res.headers.get('content-type');
exportFile(resp, taskData, transcript, "transcription", filename);

exportFile(resp, taskData, transcript, "transcription");
} else {
const resp = await res.json();

Expand Down Expand Up @@ -828,8 +828,8 @@ const VoiceOverRightPanel1 = ({ currentIndex, setCurrentIndex, showTimeline, seg

if (res.ok) {
const resp = await res.blob();
const filename = res.headers.get('content-type');
exportFile(resp, taskData, translate, "translation", filename);

exportFile(resp, taskData, translate, "translation");
} else {
const resp = await res.json();

Expand Down
6 changes: 2 additions & 4 deletions src/utils/subtitleUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ export const exportVoiceover = (data, taskDetails, exportTypes) => {
}
};

export const exportFile = (data, taskDetails, exportType, type, filename) => {
export const exportFile = (data, taskDetails, exportType, type) => {
const {
video: videoId,
src_language: sourceLanguage,
Expand Down Expand Up @@ -740,9 +740,7 @@ export const exportFile = (data, taskDetails, exportType, type, filename) => {
let fileName = "";
if (specialOrgIds.includes(userOrgId) && description.length) {
fileName = `${description}.${format}`;
}else if(filename.length){
fileName = `${filename}.${format}`;
}else {
} else {
fileName = `Chitralekha_Video${videoId}_${YYYYMMDD}_${HHMMSS}_${language}.${format}`;
}

Expand Down

0 comments on commit 2c500f5

Please sign in to comment.