Skip to content

Commit

Permalink
Make extension check case insensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
OzGav authored Dec 18, 2024
1 parent c33e766 commit fcde4a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions music_assistant/providers/filesystem_local/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,15 +314,15 @@ async def _process_item(self, item: FileSystemItem, prev_checksum: str | None) -
"""Process a single item."""
try:
self.logger.debug("Processing: %s", item.path)
if item.ext in TRACK_EXTENSIONS:
if item.ext.lower() in TRACK_EXTENSIONS:
# add/update track to db
# note that filesystem items are always overwriting existing info
# when they are detected as changed
track = await self._parse_track(item)
await self.mass.music.tracks.add_item_to_library(
track, overwrite_existing=prev_checksum is not None
)
elif item.ext in PLAYLIST_EXTENSIONS:
elif item.ext.lower() in PLAYLIST_EXTENSIONS:
playlist = await self.get_playlist(item.path)
# add/update] playlist to db
playlist.cache_checksum = item.checksum
Expand Down

0 comments on commit fcde4a2

Please sign in to comment.