Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracks with no album [singles] are not downloaded #863

Open
Hate9 opened this issue Sep 5, 2024 · 14 comments
Open

Tracks with no album [singles] are not downloaded #863

Hate9 opened this issue Sep 5, 2024 · 14 comments

Comments

@Hate9
Copy link

Hate9 commented Sep 5, 2024

If I have a track with an artist but no album, and I download the library it's in, all the tracks in albums download, but none of the tracks without albums do.

This is on beta 9.9.

Also, there is no way to list non-album tracks for an artist without adding everything of theirs to the queue or searching in the "tracks" tab, but idk if that should go in this issue.

@Chaphasilor
Copy link
Collaborator

Hmm, this was added back in 0.9.7, so I'm not sure why it isn't working for you.

Could you share more info about your setup? How and where does Jellyfin show the track? How does it look in Finamp?

If you could provide some logs after deleting and re-downloading your library, that might also help!

@Hate9
Copy link
Author

Hate9 commented Sep 5, 2024

Sure! Jellyfin also does not show the track under the artist unless it's in an album, and also adds non-album tracks to the queue when adding all songs by an artist.
Both Jellyfin and Finamp (online) list the track in "all tracks".
Offline, Finamp shows all album-tracks by all artists in their artist pages and the global tracks listing, but not non-album tracks.
I can create a queue with albumless tracks in online mode and continue to play it in offline mode, but if I restart the app, the albumless tracks "cannot be restored" and are removed from the queue.

My library is kinda large, but I'll make a new library with just one artist's stuff, download it, and upload the logs.

@Chaphasilor
Copy link
Collaborator

Great, thanks for the info. I'm also interested in your file structure to make sure there's nothing unexpectes going on :)

@Hate9
Copy link
Author

Hate9 commented Sep 6, 2024

image

I have a top-level directory which contains loose tracks, playlists, artist folders, and album folders.
Artist folders contain a list of albums and/or a collection of loose tracks (or very occasionally multiple subfolders of albums).

@Chaphasilor
Copy link
Collaborator

Are "Big Blue Wave" and "Complicated" downloaded? I use this exact directory structure for testing, and just confirmed the tracks download fine on 0.9.9.

Also, what happens if you manually download one of these tracks using the long-press menu? Does it show up in offline mode?

@Hate9
Copy link
Author

Hate9 commented Sep 6, 2024

Yeah, weirdly enough, the loose tracks in the top-level folder download fine. Odd...

@Hate9
Copy link
Author

Hate9 commented Sep 6, 2024

Manually downloading a track still works, so it appears it can download and will show up, it just doesn't without explicitly selecting that track.

@Chaphasilor
Copy link
Collaborator

Yeah, if the top-level tracks work then it seems like the request we make to the server to get the tracks not belonging to any album only catch the top-level tracks, but not the other ones. I'll see if I can modify it to include those as well. We just need to make sure tracks aren't downloaded multiple times :)

@Chaphasilor
Copy link
Collaborator

I'm guessing in the case of the other tracks, the parent item is not the library itself (like it is for the top-most tracks), but the artist. So applying the same fix we did for the top-level orphans should also work if applied to each artist.

@Komodo5197 do you think this section could easily be copied to the artist fetching as well?

https://github.com/jmshrv/finamp/blob/redesign/lib%2Fservices%2Fdownloads_service_backend.dart#L1311-L1321

I haven't tested my theory yet, but I'm reasonably sure it would work, that's why I'm asking :)

@Komodo5197
Copy link

I don't believe trying to grab loose artist tracks is a good idea, because I don't believe artist-related requests can be limited to a specific library. If you can find a way to limit that, I guess it would work, although it would dramatically increase the amount of requests needed to perform a library sync update for a very small improvement.

@Chaphasilor
Copy link
Collaborator

Ah that's a good point, I always forget that Jellyfin has no library filter 🙃

As for the requests, I belive it would require #artists more requests, correct?

I have some time to spare now, will play around with it!

@Komodo5197
Copy link

Yeah, it would add #artists requests, which could easily be 100+. Currently, a full library sync with no changes is 2 requests.

@Chaphasilor
Copy link
Collaborator

Chaphasilor commented Sep 9, 2024

Okay, so there is a way to get those tracks, by using Recursive=false and also using the ParentId instead of ArtistIds (normally ArtistIds has to be used to properly fetch albums).
We could make this an optional setting for compatibility, emphasizing that normally all tracks should be part of an album.
@Hate9 or do you think it would be easier to just add pseudo-albums for all of your singles?

Edit: I'm guessing the two requests are checking for new albums and new artists?

@Hate9
Copy link
Author

Hate9 commented Sep 9, 2024

We can definitely make it an optional setting, and I'll probably just make pseudo-albums in the mean-time, but Jellyfin already breaks in lots of ways if your library isn't setup very specifically, and we don't want to exaccerbate that further here, so it should definitely be fixed, even if only optionally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants