# Offline files deleted after media provider refresh

**URL:** <http://support.symfonium.app/t/offline-files-deleted-after-media-provider-refresh/4665>\
**Category:** Support\
**Tags:** fixed\
**Created:** [July 4, 2024, 7:36pm UTC](http://support.symfonium.app/t/offline-files-deleted-after-media-provider-refresh/4665 "2024-07-04T19:36:03Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![gid](http://support.symfonium.app/letter_avatar_proxy/v4/letter/g/439d5e/32.png) [@gid](http://support.symfonium.app/u/gid)\
**Post date:** [July 4, 2024, 7:36pm UTC](http://support.symfonium.app/t/offline-files-deleted-after-media-provider-refresh/4665/1 "2024-07-04T19:36:03Z")

</div>

## Issue description:

I am using a subsonic server (navidrome) as a media provider. I have my entire media library in the permanent offline cache.

When one or more new albums are added to the server, the next time Symfonium refreshes the media provider it starts to delete files in the permanent offline cache even though those tracks are still present on the server.

## Logs:

Upload description: gidofflinefiles

## Additional information:

&nbsp;

&nbsp;

## Reproduction steps:

&nbsp;  
1.Add new album to media server  
2. Open Symfonium, wait for it to refresh the media provider  
3. Notice that permanent offline cache files start to be deleted  
&nbsp;

## Media provider:

Subsonic

## Screenshots:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

---

<div class="post-metadata">

**Author:** ![Tolriq](http://support.symfonium.app/user_avatar/support.symfonium.app/tolriq/32/726_2.png) [@Tolriq](http://support.symfonium.app/u/Tolriq)\
**Post date:** [July 5, 2024, 6:56am UTC](http://support.symfonium.app/t/offline-files-deleted-after-media-provider-refresh/4665/2 "2024-07-05T06:56:39Z")

</div>

```auto
19:47:47.061 P:Verbose T:DownloadManager 
Removing auto cached media without matching rule MediaItem{externalId='e68b4ae1225158bceb209699238a54de', mediaType=Song, file='/media/ssd/Music/Full of Hell/2019-05-17 - Weeping Choir/02 - Haunted Arches.flac', title='Haunted Arches', resume=0}

```

You cached those media via some rules and those rules no more exists, so after a sync the cleaner runs and remove the files auto cached via rules that no more exists.

How are you caching the media?

---

<div class="post-metadata">

**Author:** ![gid](http://support.symfonium.app/letter_avatar_proxy/v4/letter/g/439d5e/32.png) [@gid](http://support.symfonium.app/u/gid)\
**Post date:** [July 5, 2024, 7:11am UTC](http://support.symfonium.app/t/offline-files-deleted-after-media-provider-refresh/4665/3 "2024-07-05T07:11:53Z")

</div>

I have a smart playlist that contains all tracks, and I’ve set up an auto-download rule for that playlist.

The tracks getting deleted after a media provider refresh haven’t changed on the media server so I don’t understand why they’re getting removed from the offline cache.

---

<div class="post-metadata">

**Author:** ![Tolriq](http://support.symfonium.app/user_avatar/support.symfonium.app/tolriq/32/726_2.png) [@Tolriq](http://support.symfonium.app/u/Tolriq)\
**Post date:** [July 5, 2024, 7:16am UTC](http://support.symfonium.app/t/offline-files-deleted-after-media-provider-refresh/4665/4 "2024-07-05T07:16:15Z")

</div>

To cache everything it’s better to just check the option in the provider itself it’s a lot lot lot more efficient.

---

<div class="post-metadata">

**Author:** ![gid](http://support.symfonium.app/letter_avatar_proxy/v4/letter/g/439d5e/32.png) [@gid](http://support.symfonium.app/u/gid)\
**Post date:** [July 5, 2024, 7:40am UTC](http://support.symfonium.app/t/offline-files-deleted-after-media-provider-refresh/4665/5 "2024-07-05T07:40:56Z")

</div>

Well this smart playlist filters out silence tracks in my library (that I have rated 1 star out of 5). I have a large library and don’t want to cache those silence tracks.

---

<div class="post-metadata">

**Author:** ![Tolriq](http://support.symfonium.app/user_avatar/support.symfonium.app/tolriq/32/726_2.png) [@Tolriq](http://support.symfonium.app/u/Tolriq)\
**Post date:** [July 5, 2024, 8:25am UTC](http://support.symfonium.app/t/offline-files-deleted-after-media-provider-refresh/4665/6 "2024-07-05T08:25:35Z")

</div>

Hum then when Navidrome supports multiple libraries you should split them in another library.

With so much songs, you use more battery than necessary to check them a lot more frequently than required.

From your logs seems there was a race and the sync and cleanup starts more or less at the same time. Should be fixed in next release.

---

<div class="post-metadata">

**Author:** ![gid](http://support.symfonium.app/letter_avatar_proxy/v4/letter/g/439d5e/32.png) [@gid](http://support.symfonium.app/u/gid)\
**Post date:** [July 5, 2024, 9:38am UTC](http://support.symfonium.app/t/offline-files-deleted-after-media-provider-refresh/4665/7 "2024-07-05T09:38:01Z")

</div>

> [@Tolriq](#):
>
> From your logs seems there was a race and the sync and cleanup starts more or less at the same time. Should be fixed in next release.

Thanks very much for fixing this. And I appreciate the advice about multiple libraries.
