Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
See what's new at GitLab
4
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Sublime Music
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
117
Issues
117
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
2
Merge Requests
2
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
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
Sublime Music
Sublime Music
Commits
6452cf10
Verified
Commit
6452cf10
authored
Oct 23, 2020
by
Sumner Evans
💬
2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A couple more ignored article fixes
parent
734e21bd
Pipeline
#210191484
passed with stages
in 26 minutes and 36 seconds
Changes
3
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
73 additions
and
4 deletions
+73
-4
sublime_music/adapters/subsonic/adapter.py
sublime_music/adapters/subsonic/adapter.py
+4
-2
sublime_music/adapters/subsonic/api_objects.py
sublime_music/adapters/subsonic/api_objects.py
+2
-2
tests/adapter_tests/mock_data/get_artists-supysonic.json
tests/adapter_tests/mock_data/get_artists-supysonic.json
+67
-0
No files found.
sublime_music/adapters/subsonic/adapter.py
View file @
6452cf10
...
...
@@ -642,12 +642,14 @@ class SubsonicAdapter(Adapter):
try
:
# If we already got the ignored articles from the get_artists, do that here.
with
open
(
self
.
ignored_articles_cache_file
,
"rb+"
)
as
f
:
ignored_articles
=
pickle
.
load
(
f
)
if
ia
:
=
pickle
.
load
(
f
):
ignored_articles
=
ia
except
Exception
:
try
:
# Whatever the exception, fall back on getting from the server.
if
artists
:
=
self
.
_get_json
(
self
.
_make_url
(
"getArtists"
)).
artists
:
ignored_articles
=
artists
.
ignored_articles
if
ia
:
=
artists
.
ignored_articles
:
ignored_articles
=
ia
except
Exception
:
# Use the default ignored articles.
pass
...
...
sublime_music/adapters/subsonic/api_objects.py
View file @
6452cf10
...
...
@@ -284,7 +284,7 @@ class IndexID3:
@
dataclass_json
(
letter_case
=
LetterCase
.
CAMEL
)
@
dataclass
class
ArtistsID3
:
ignored_articles
:
str
ignored_articles
:
Optional
[
str
]
=
None
index
:
List
[
IndexID3
]
=
field
(
default_factory
=
list
)
...
...
@@ -303,7 +303,7 @@ class Genres:
@
dataclass_json
(
letter_case
=
LetterCase
.
CAMEL
)
@
dataclass
class
Indexes
:
ignored_articles
:
str
ignored_articles
:
Optional
[
str
]
=
None
index
:
List
[
Index
]
=
field
(
default_factory
=
list
)
...
...
tests/adapter_tests/mock_data/get_artists-supysonic.json
0 → 100644
View file @
6452cf10
{
"subsonic-response"
:
{
"status"
:
"ok"
,
"version"
:
"1.15.0"
,
"artists"
:
{
"index"
:
[
{
"name"
:
"A"
,
"artist"
:
[
{
"id"
:
"102"
,
"name"
:
"Adele"
,
"coverArt"
:
"ar-102"
,
"albumCount"
:
1
},
{
"id"
:
"122"
,
"name"
:
"Austin French"
,
"coverArt"
:
"ar-122"
,
"albumCount"
:
1
},
{
"id"
:
"75"
,
"name"
:
"The Afters"
,
"coverArt"
:
"ar-75"
,
"albumCount"
:
2
}
]
},
{
"name"
:
"B"
,
"artist"
:
[
{
"id"
:
"95"
,
"name"
:
"The Band Perry"
,
"coverArt"
:
"ar-95"
,
"albumCount"
:
1
},
{
"id"
:
"41"
,
"name"
:
"Basshunter"
,
"coverArt"
:
"ar-41"
,
"albumCount"
:
1
}
]
},
{
"name"
:
"X-Z"
,
"artist"
:
[
{
"id"
:
"154"
,
"name"
:
"Zac Brown Band"
,
"coverArt"
:
"ar-154"
,
"albumCount"
:
3
},
{
"id"
:
"25"
,
"name"
:
"Zach Williams"
,
"coverArt"
:
"ar-25"
,
"albumCount"
:
1
}
]
}
]
}
}
}
Sumner Evans
💬
@sumner
mentioned in issue
#277
·
Oct 24, 2020
mentioned in issue
#277
mentioned in issue #277
Toggle commit list
Sumner Evans
💬
@sumner
mentioned in issue
#264
·
Oct 25, 2020
mentioned in issue
#264
mentioned in issue #264
Toggle commit list
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