tattwamasi / TeslaTunes

Copy your iTunes library, automatically converting Apple Lossless to flac, to a destination for use with your Tesla Model S
https://teslatunes.loci.net
43 stars 5 forks source link

Feature request: Playlist m3u Files Added to Playlist Folder #19

Open tezgno opened 5 years ago

tezgno commented 5 years ago

I have a small feature request that would be nice if it could be added. While I know that the Tesla doesn't support proper playlist m3u files (yet), it would be nice if in the playlist folder, the tool could actually still create the m3u files. The reason is for people, like myself, who use a flash drive in multiple vehicles. My other car supports m3u files (but not folders) and the Tesla supports folders (but not m3u). What I have been doing is manually creating m3u files inside of playlist folder so that when I move the drive to my other car, it works there as well. The Tesla presently just ignores the m3u files and moves on like nothing ever happened.

tattwamasi commented 5 years ago

That sounds cool. I will look at adding this, if/when I dig back into the code again.

tattwamasi commented 5 years ago

I'm looking into this now. The idea is that the utility would create it's own .m3u from the actual copied iTunes playlist (so it wouldn't have the songs on the original playlist that didn't get copied, for example)?

Also, currently if you ever reused the utility to freshen the playlists, I think the utility would delete the .m3u file you manually moved over (and any other file that wasn't processed as supposed to be there). I'd make sure that wouldn't happened if there were a "make m3u" checkbox.

Separately, If it is anything more complicated than that, I could just add .m3u to the files copied list in order to copy any handcrafted playlist files to the destination, but they'd have to come from the folder selection, not from the playlist selections (since there is no single source directory for a playlist for me to look for a pre-existing .m3u). I'm ambivalent about doing this since it's specifically copying something the Tesla can't use, but I'm open for suggestions and opinions on whether it (or any of this) is helpful or not.

tezgno commented 5 years ago

For me, that is exactly how I would expect the behavior to be. Whatever songs from the playlist that were copied over, it would create the m3u file in the playlist folder with just the items that the program copied. If you refreshed the playlist, I would expect it to replace the m3u file with a new one with the appropriate files. Presently, the manual m3u that I make is named the same as the playlist and contains the songs that I copied using the utility. Others can comment on if they would like to see the feature or not. I just know for me, it makes it easier for me to move flash drives versus having multiple or manually creating the m3u like I do today.

lraesly commented 5 years ago

I must have missed an earlier message. Is the playlist file so other music players can use the folder?

I wish Tesla supported m3u files. Make things a lot easier.

As an aside, my Tesla was in the shop for some minor bodywork and I had a rented Hyundai Elantra. Very basic car but it supported both Apple CarPlay and the android variant. I used the CarPlay and was very impressed…

Lee

On Jan 26, 2019, at 1:46 PM, tattwamasi notifications@github.com wrote:

I'm looking into this now. The idea is that the utility would create it's own .m3u from the actual copied iTunes playlist (so it wouldn't have the songs on the original playlist that didn't get copied, for example)?

Also, currently if you ever reused the utility to freshen the playlists, I think the utility would delete the .m3u file you manually moved over (and any other file that wasn't processed as supposed to be there). I'd make sure that wouldn't happened if there were a "make m3u" checkbox.

Separately, If it is anything more complicated than that, I could just add .m3u to the files copied list in order to copy any handcrafted playlist files to the destination, but they'd have to come from the folder selection, not from the playlist selections (since there is no single source directory for a playlist for me to look for a pre-existing .m3u). I'm ambivalent about doing this since it's specifically copying something the Tesla can't use, but I'm open for suggestions and opinions on whether it (or any of this) is helpful or not.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tattwamasi/TeslaTunes/issues/19#issuecomment-457855311, or mute the thread https://github.com/notifications/unsubscribe-auth/AKvQ3RT5eFpwWwsS2aqqrM0ugxY0gpziks5vHKKigaJpZM4Zfghh.

tattwamasi commented 5 years ago

Asides first, yeah CarPlay, Android Auto would be big improvements 😤 As would actually supporting Apple Lossless directly and un-breaking their AAC support. The latter is pretty crazy and unacceptable really. Very disappointing. I'm sure there are reasons, but it's lame.

As for the playlist feature - anyone that's wanting this… can you look in some of your .m3u files and let me know if there's anything that needs supporting besides the basic header and items (duration, title), example:

#EXTM3U

#EXTINF:240,The Sample Band - My 4 Minute Song
my_4_minute_song.m4a

#EXTINF:127,The Sample Band - My 127sec Song
my_127sec_song.m4a

<etc.>

Assuming no special needs, I'll probably have a version to test in the next day.

tezgno commented 5 years ago

Mine doesn't have anything special at all. Willing to give it a try once you have something.

tattwamasi commented 5 years ago

Here's a test version. This is not a tested, released build. In addition to it being a work in progress in terms of me updating the various autoupdate, tag and Flac libraries, etc. I wedged in the playlist feature. Let me know how it seems and if anything else seems freshly broken, fixed, or otherwise weird.

TeslaTunes_1.2.6-16-g8858973-dirty.zip

Check it out and tell me if it's useful. Note that it will create the .m3u playlist in each playlist directory, even if you just have the utility set to scan. Seems wrong, but it was faster to add to get to a version we could test. Also note it will overwrite any existing .m3u file of the same name.

Also note, the filenames in the playlist are written assuming there are not subdirectories inside each playlist folder and use the same name as the song file I put in that folder - including any spaces, etc. in the filename. The Tesla seems to work fine with the filenames, but if whatever is reading the .m3u files needs filenames with escaped/encoded characters, then I need details. Hopefully works as is.