Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
B
Backend Server
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SpinShare
Backend Server
Commits
666e7389
Commit
666e7389
authored
Apr 01, 2020
by
Andreas Heimann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed unneeded original name fields
parent
fb504347
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
58 deletions
+7
-58
src/Controller/APIController.php
src/Controller/APIController.php
+4
-4
src/Entity/Song.php
src/Entity/Song.php
+3
-54
No files found.
src/Controller/APIController.php
View file @
666e7389
...
@@ -127,13 +127,13 @@ class APIController extends AbstractController
...
@@ -127,13 +127,13 @@ class APIController extends AbstractController
$em
->
flush
();
$em
->
flush
();
$zipLocation
=
$this
->
getParameter
(
'temp_path'
)
.
DIRECTORY_SEPARATOR
;
$zipLocation
=
$this
->
getParameter
(
'temp_path'
)
.
DIRECTORY_SEPARATOR
;
$zipName
=
$result
->
get
SRTBOriginalNam
e
()
.
".zip"
;
$zipName
=
$result
->
get
FileReferenc
e
()
.
".zip"
;
$zip
=
new
\ZipArchive
;
$zip
=
new
\ZipArchive
;
$zip
->
open
(
$zipLocation
.
$zipName
,
\ZipArchive
::
CREATE
);
$zip
->
open
(
$zipLocation
.
$zipName
,
\ZipArchive
::
CREATE
);
$zip
->
addFile
(
$this
->
getParameter
(
'srtb_path'
)
.
DIRECTORY_SEPARATOR
.
$result
->
getFileReference
()
.
".srtb"
,
$result
->
get
SRTBOriginalName
()
);
$zip
->
addFile
(
$this
->
getParameter
(
'srtb_path'
)
.
DIRECTORY_SEPARATOR
.
$result
->
getFileReference
()
.
".srtb"
,
$result
->
get
FileReference
()
.
".srtb"
);
$zip
->
addFile
(
$this
->
getParameter
(
'cover_path'
)
.
DIRECTORY_SEPARATOR
.
$result
->
getFileReference
()
.
".png"
,
"AlbumArt"
.
DIRECTORY_SEPARATOR
.
$result
->
get
CoverOriginalName
()
);
$zip
->
addFile
(
$this
->
getParameter
(
'cover_path'
)
.
DIRECTORY_SEPARATOR
.
$result
->
getFileReference
()
.
".png"
,
"AlbumArt"
.
DIRECTORY_SEPARATOR
.
$result
->
get
FileReference
()
.
".png"
);
$zip
->
addFile
(
$this
->
getParameter
(
'audio_path'
)
.
DIRECTORY_SEPARATOR
.
$result
->
getFileReference
()
.
".ogg"
,
"AudioClips"
.
DIRECTORY_SEPARATOR
.
$result
->
get
AudioOriginalName
()
);
$zip
->
addFile
(
$this
->
getParameter
(
'audio_path'
)
.
DIRECTORY_SEPARATOR
.
$result
->
getFileReference
()
.
".ogg"
,
"AudioClips"
.
DIRECTORY_SEPARATOR
.
$result
->
get
FileReference
()
.
".ogg"
);
$zip
->
close
();
$zip
->
close
();
$response
=
new
Response
(
file_get_contents
(
$zipLocation
.
$zipName
));
$response
=
new
Response
(
file_get_contents
(
$zipLocation
.
$zipName
));
...
...
src/Entity/Song.php
View file @
666e7389
...
@@ -41,38 +41,23 @@ class Song
...
@@ -41,38 +41,23 @@ class Song
*/
*/
private
$fileReference
;
private
$fileReference
;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private
$srtbOriginalName
;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private
$coverOriginalName
;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private
$audioOriginalName
;
/**
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @ORM\Column(type="string", length=255, nullable=true)
*/
*/
private
$tags
;
private
$tags
;
/**
/**
* @ORM\Column(type="integer")
* @ORM\Column(type="integer"
, nullable=true
)
*/
*/
private
$views
;
private
$views
;
/**
/**
* @ORM\Column(type="integer")
* @ORM\Column(type="integer"
, nullable=true
)
*/
*/
private
$downloads
;
private
$downloads
;
/**
/**
* @ORM\Column(type="boolean")
* @ORM\Column(type="boolean"
, nullable=true, options={"default": false}
)
*/
*/
private
$isExplicit
;
private
$isExplicit
;
...
@@ -141,42 +126,6 @@ class Song
...
@@ -141,42 +126,6 @@ class Song
return
$this
;
return
$this
;
}
}
public
function
getSRTBOriginalName
()
:
?
string
{
return
$this
->
srtbOriginalName
;
}
public
function
setSRTBOriginalName
(
?
string
$srtbOriginalName
)
:
self
{
$this
->
srtbOriginalName
=
$srtbOriginalName
;
return
$this
;
}
public
function
getCoverOriginalName
()
:
?
string
{
return
$this
->
coverOriginalName
;
}
public
function
setCoverOriginalName
(
?
string
$coverOriginalName
)
:
self
{
$this
->
coverOriginalName
=
$coverOriginalName
;
return
$this
;
}
public
function
getAudioOriginalName
()
:
?
string
{
return
$this
->
audioOriginalName
;
}
public
function
setAudioOriginalName
(
?
string
$audioOriginalName
)
:
self
{
$this
->
audioOriginalName
=
$audioOriginalName
;
return
$this
;
}
public
function
getTags
()
:
?
string
public
function
getTags
()
:
?
string
{
{
return
$this
->
tags
;
return
$this
->
tags
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment