owntone / owntone-server

Linux/FreeBSD DAAP (iTunes) and MPD media server with support for AirPlay 1 and 2 speakers (multiroom), Apple Remote (and compatibles), Chromecast, Spotify and internet radio.
https://owntone.github.io/owntone-server
GNU General Public License v2.0
2.01k stars 232 forks source link

Compilations not correctly store #63

Open Psychoteur opened 9 years ago

Psychoteur commented 9 years ago

Hello,

I've got a small problem. I installed forked-daap on a gentoo server. My music is local on the server.

I've got all my compilations inside "./V/Various Artists/" folder. When I use Itunes on my Mac. It isn't store in "Compilations" like the old mt-daapd did.

So ,of course, I edited the /etc/forked-daapd.conf file, did a full rescan. Check the whole thing via the log file.

I can see the process correctly works but all my compilations are across the whole list. The first time I started forked-daapd it was at least in "Various Artists" but I can't restore this behaviour.

I tried:

    compilations = { "/V/Various Artists" }
    compilation_artist = "Various Artists"

    compilations = { "/V/Various Artists" }
    compilation_artist = "Compilations"

Even tried to comment both lines.

Thank you. Best regards

ejurgensen commented 9 years ago

To help narrow down the problem please do the following:

  1. Set loglevel = debug and restart forked-daapd
  2. Wait till the initial scan is complete
  3. Run 'touch [some file in /V/Various Artists]'
  4. Find the last line in the log which has something like: "db: Running query 'UPDATE files SET path [....]" and post it here.
Psychoteur commented 9 years ago

Hello, thanks taking the time at my small problem.

db: Running query 'SELECT * FROM inotify WHERE wd = 2243;' [2014-11-10 10:47:54] scan: File closed: /home/psycho/musique/V/Various Artists/mytralla [2014-11-10 10:47:54] db: Running query 'SELECT f.id, f.db_timestamp FROM files f WHERE f.path = '/home/psycho/musique/V/Various Artists/mytralla';' [2014-11-10 10:47:54] db: No results [2014-11-10 10:47:54] ffmpeg: Statistics: 0 bytes read, 0 seeks [2014-11-10 10:47:54] scan: Cannot open media file '/home/psycho/musique/V/Various Artists/mytralla': Unknown error 1094995529 [2014-11-10 10:47:54] scan: Could not extract metadata for /home/psycho/musique/V/Various Artists/mytralla

Now, I've checked more closely and some albums are in "Various Artists" and some not.

Maybe is something wrong with the value: Artist and album artist inside the id tag but the setting of forked-daapd should override this behaviour and it doesn't explain why this isn't happening with the old package mt-daapd.

By the way, you did a great job on the last update, it' s so easy to compile and install now !

Thanks. Best regards.

ejurgensen commented 9 years ago

Thanks.

I meant 'touch [some existing media file in V/Various artists that does not show up correctly]'. The reason is that I need to see how it is saved in the database (with which album_artist... it should be equal to "Various Artists" or "Compilations").

I don't know anything about mt-daapd. I think that by now forked-daapd has only small parts in common with it.

Psychoteur commented 9 years ago

oh sorry for the misunderstanding. I thought you wanted to check something with permission. db: Running query 'UPDATE files SET path = '/home/psycho/musique/V/Various Artists/Gatecrasher Classics (disc 3_ Primordial)/06 - In And Out Of My Life (Original Vocal Mix).mp3', fname = '06 - In And Out Of My Life (Original Vocal Mix).mp3', title = TRIM('In And Out Of My Life (Original Vocal Mix)'), artist = TRIM('A.T.F.C Presents OnePhatDeeva'), album = TRIM('Gatecrasher Classics (disc 3: Primordial)'), genre = TRIM('Trance'), comment = TRIM(NULL), type = 'mp3', composer = TRIM(NULL), orchestra = TRIM(NULL), conductor = TRIM(NULL), grouping = TRIM(NULL), url = NULL, bitrate = 206, samplerate = 44100, song_length = 336195, file_size = 8664522, year = 2005, track = 6, total_tracks = 0, disc = 0, total_discs = 0, bpm = 0, compilation = 1, artwork = 0, rating = 0, seek = 0, data_kind = 0, item_kind = 2, description = 'MPEG audio file', time_modified = 1415615445, db_timestamp = 1415615445, disabled = 0, sample_count = 0, codectype = 'mpeg', idx = 0, has_video = 0, bits_per_sample = 16, album_artist = TRIM('Various Artists'), media_kind = 1, tv_series_name = TRIM(NULL), tv_episode_num_str = TRIM(NULL), tv_network_name = TRIM(NULL), tv_episode_sort = 0, tv_season_num = 0, songartistid = daap_songalbumid(LOWER(TRIM('Various Artists')), ''), songalbumid = daap_songalbumid(LOWER(TRIM('Various Artists')), LOWER(TRIM('Gatecrasher Classics (disc 3: Primordial)'))), title_sort = TRIM('In And Out Of My Life (Original Vocal Mix)'), artist_sort = TRIM('A.T.F.C Presents OnePhatDeeva'), album_sort = TRIM('Gatecrasher Classics (disc 00003: Primordial)'), composer_sort = TRIM(NULL), album_artist_sort = TRIM('Various Artists') WHERE id = 27593;'

If I do "get info" with itunes : there is a value for "Album artist". When I check with amarok or easytag. I've got no value.

I did not have this the first time I ran forked-daapd. It only starts doing that after I edited the conf file to have everything inside "Compilations".

I tried several forked-daapd before finding yours and every one shows under the genuine Itunes Compilations icon.

Psychoteur commented 9 years ago

I did some editing of the tags inside Gatecrasher Classics (disc 3: Primordial)". If I put "Various Artists" as tag inside "album artists" it's back inside "Various Artists" in Itunes view tree.

And for few second I got the same icon as in default Itunes view then it's replaced by the first album artwork in the list.

But the purpose of the line compilations = { "/V/Various Artists" } is everything inside this particular folder is compilation ?

And then changing compilation_artist = "Compilations" It should appear under "compilations" inside Itunes view tree ?

I hope I'm not bothering you. I'm feeling like a noob right now.

Thanks

ejurgensen commented 9 years ago

Don’t worry about bothering me, this is all voluntary!

The purpose of setting a compilations directory is that everything in it gets its album artist set to “Various Artists” (or whatever you configured in compilation_artist), meaning that the actual tag for album artist is ignored. So changing the tag should make no difference what so ever. Any client (like iTunes) asking for album artist will receive “Various Artists” from forked-daapd.

I don’t understand the behavior you are describing, I think I need to test with iTunes myself. I’ll get back to you when I have done that.

Psychoteur commented 9 years ago

Well, yeah that's what I thought it should ignore the tag. The quick fix I found it is to select all Various Artists folder with amarok set tag with "Various Artists" in album artist label.

It still got some music not in the right place. Itunes 4518 music in Various Artists - Amarok 4586.

Itunes has some changes. It's a brand Yosemite install. Before in "Get info" I could change the status "Album is a compilation of songs by various artists". Now I can't but it should be the behaviour since it doesn't directly access the directory. Now thinking about it, Itunes detects "compilations" and put it in a special folder and display it at the top of the list. That's what I was trying to reproduce changing "Various Artists" to "Compilations" but even if I do that I stil got "Compilations" at "C" not at the top.

I don't get the behaviour and why it was right the first time. It's as if I forgot to do a full rescan after changing the parameters.

Otherwise everything works great, I'm happy to play flac, ogg and having artwork.

Well I'm reading myself and I realize how much my writing is bad. Sorry.

Thanks for your time.

ejurgensen commented 9 years ago

So tested a bit, and the reason iTunes and Amarok have a different number of tracks in "Various artists" is that iTunes uses the album artist tag, while Amarok uses the artist tag. So I would say that iTunes does the correct thing here.

You cannot change "Album is a compilation of songs by various artists" in iTunes because it is a field set and sent by forked-daapd. It will be set to true for everything inside the directory you configure as your compilations directory.

My "Various artists" is also shown at "V", and I didn't know it was possible to have compilations displayed in a special way. I don't know how to make iTunes do that, maybe it requires an other field to be set by forked-daapd.

Psychoteur commented 9 years ago

Hello,

Well I found out that the number where different because of doubles. Forked-daap and amarok don't share the same usage about database. Amarok ignores the second entry not forked-dapp. In Amarok: artist = artist's name and the field "album artists" should be left blank or set to "Various artists", but you can override this behaviour with "display inside various artists".

Itunes got its own tag field "compilation".

So basically, I sorted my music directory.

If you set Itunes to use a local directory for your music and if you have compilations. You should see it. I did try another forked-daapd before and it has the basic itunes behaviour. Or I will do a snapshot of mine.

Sorry, for the late respond I had other things in mind.