Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SpotifyBackup
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Robert Goldmann
SpotifyBackup
Compare revisions
b75130cc0a9611f195b09cb5572c9c62aa290bed to d639d11c35d258beb594a724e922e0f79c4a9c97
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
deadlocker8/SpotifyBackup
Select target project
No results found
d639d11c35d258beb594a724e922e0f79c4a9c97
Select Git revision
Loading items
Swap
Target
deadlocker8/SpotifyBackup
Select target project
deadlocker8/SpotifyBackup
1 result
b75130cc0a9611f195b09cb5572c9c62aa290bed
Select Git revision
Loading items
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
SpotifyRecorder: check for valid start number
· 8c272286
Robert Goldmann
authored
1 year ago
8c272286
SpotifyRecorder: fix unsafe file name characters
· d639d11c
Robert Goldmann
authored
1 year ago
d639d11c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
SpotifyRecorder.py
+11
-0
11 additions, 0 deletions
SpotifyRecorder.py
with
11 additions
and
0 deletions
SpotifyRecorder.py
View file @
d639d11c
...
...
@@ -40,7 +40,11 @@ class SpotifyRecorder:
self
.
_spotifyDeviceName
=
spotifyDeviceName
self
.
_audioDeviceName
=
audioDeviceName
self
.
_destinationFolder
=
destinationFolder
if
startNumber
<=
0
:
raise
ValueError
(
f
'
startNumber must be greater than 0
'
)
self
.
_startNumber
=
startNumber
self
.
_limit
=
limit
os
.
makedirs
(
self
.
_destinationFolder
,
exist_ok
=
True
)
...
...
@@ -181,6 +185,13 @@ class SpotifyRecorder:
artists
=
self
.
__join_artists
(
track
)
fileName
=
f
'
{
index
}
-
{
artists
}
-
{
track
[
"
track
"
][
"
name
"
]
}
'
fileName
=
fileName
.
replace
(
'
/
'
,
'
_
'
)
fileName
=
fileName
.
replace
(
'"'
,
''
)
fileName
=
fileName
.
replace
(
'
:
'
,
'
_
'
)
fileName
=
fileName
.
replace
(
'
*
'
,
'
_
'
)
fileName
=
fileName
.
replace
(
'
?
'
,
'
_
'
)
fileName
=
fileName
.
replace
(
'
>
'
,
'
_
'
)
fileName
=
fileName
.
replace
(
'
<
'
,
'
_
'
)
fileName
=
fileName
.
replace
(
'
|
'
,
'
_
'
)
return
os
.
path
.
join
(
self
.
_destinationFolder
,
fileName
)
@staticmethod
...
...
This diff is collapsed.
Click to expand it.