Coder Social home page Coder Social logo

ipod-shuffle-4g's People

Contributors

ahippo avatar babymastodon avatar fracai avatar josefnpat avatar nicohood avatar nims11 avatar thomas-hori avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ipod-shuffle-4g's Issues

Add file compression

I am wondering if it would be possible to place the mp3 file in a directory outside the ipod and then transfer them. We could then also reduce the filesize with compressing the files.

Itunes also has this option and I really appreciated this. I normally only have 320kb/s mp3, but on an ipod it its really low space. Having an option for 192kb/s or others would be really nice. If you dont need to manually do it and just select a folder from your music library, copy and shrink it, that'd be perfect.

Any chance to see this?

gTTS support

gTTS (Google Text-to-Speech) can provide very naturally sounding TTS. Would you be interested in gTTS support? I can program this if a pull request would be accepted.

it's not generating an index

My procedure:
-remove all the files from the shuffle
-boot in windows so it regenerates the control folder
-boot in linux and copy a folder to the mount point of the ipod, then run the script

# /root/.p/ipod-shuffle-4g/2016q4/ipod-shuffle-4g.py . 
# the pwd is the mount point where the control folder is and where my music folder is placed as well

drwxr-xr-x 2 root root 16K Jan  1  2016 dos-ep
drwxr-xr-x 6 root root 16K Mar 22 14:06 iPod_Control

the output is:
Database written successfully:
Tracks 0
Albums 0
Artists 0
Playlists 0

Voiceover per playlists and tracks

I'd like to discuss the voiceover feature:
If you ask me I prefer to disable it by default. This also makes the script independent from any voiceover dependencies. Voiceover just uses more storage capacity of the limited 2gb. So why not disable it by default?

And the 2nd point is: We could enable voiceover for tracks and playlists separately. This gives us a lot advantages:

  • Only use playlist voiceover to find the correct playlist out of the 1000 playlists we have, but save memory for tracks
  • Only enable it for tracks to only use it if you need to. Playlists dont use the "ugly" voice. (How Itunes does it)
  • Use both cause you want to have voiceover an everything

So we need to add those features:

  • Switch disable to enable
  • New parameter names (enable voiceover for tracks/playlists)
  • Separate between tracks and playlists implementation

Switch to python3

2to3 -w filename.py can be used to autoconvert the script. However this gives a few errors, as not all is translated correct.

Edit: it took some time but I think i managed to get the code working. I have not tested all options yet though. Please test release 1.5

GPG signatures for source validation

As we all know, today more than ever before, it is crucial to be able to trust our computing environments. One of the main difficulties that package maintainers of Linux distributions face, is the difficulty to verify the authenticity and the integrity of the source code.

The Arch Linux team would appreciate it if you would provide us GPG signatures in order to verify easily and quickly of your source code releases.

Overview of the required tasks:

Additional Information:

Thanks.

Automatically find ipod directory

I am so lazy I just want to automatically find the ipod directory. We could just scan all available mount points and check for s specific folder structure there. If more than 2 mountpoints suits we can make a selection or simply abort and give a message that more than 1 was found and you need to specify which you want to use.

UnicodeDecodeError

Hello,

This is a great script! It worked fine the first time. But now I added more music files and it throws an error after processing some files:

$ python shuffle.py --disable-voiceover /media/IPOD/
...
[*] Adding track /media/IPOD/Lágrimas e chuvas.mp3
Traceback (most recent call last):
  File "shuffle.py", line 480, in <module>
    shuffle.write_database()
  File "shuffle.py", line 435, in write_database
    f.write(self.tunessd.construct())
  File "shuffle.py", line 143, in construct
    track_header = self.track_header.construct()
  File "shuffle.py", line 178, in construct
    track.populate(i)
  File "shuffle.py", line 249, in populate
    self["dbid"] = hashlib.md5(text.encode("ascii", "ignore")).digest()[:8] #pylint: disable-msg=E1101
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128)
$

I am guessing it has something do do with the accented characters..

Do you have any idea how to solve this?

thanks!

[Request] Convert FLAC to alac (m4a)

It would be a nice feature to automaticly convert flac to m4a (or any other lossless ipod compatible format).
I've got a lots of flac albums which I had encoded a while ago and I don't really want to encode them all once again.

How to format/restore iPod Shuffle 4G?

First off, thank you for sharing this absolutely fantastic little script, and I hope I can be forgiven for asking for help here, although this isn't strictly a bug:

This morning, my iPod was "full" – really, the hidden Trash folder was, but I didn't know of its existence at the time. Annoyed and a bit cavalierly, I reformatted the device (as GPT with a single FAT partition). Now I can add files again and run your script without problems. However, when I switch the thing on the LED lights up red and the voice says "Please use iTunes to restore this iPod."

I am hoping that someone might be able to share their partition configuration with me, and chime in with any ideas about what exactly the iPod firmware may be looking for? 🙇‍♂️

Support for non-ASCII characters in playlists

Rhythmbox organizes files inside iPod using ID3 tags. ID3 tags has UTF8 characters, as "é", ´"á", "ã", etc. The .pls files and .mp3 files are right in iPod, but IPod-Shuffle-4g, when creating playlists in database, ignore this files.

[Feature Request] Create playlists by folders

It would be nice to create a playlist for each folder. Or at least somehow set a marker.

Lets say you have:

Eminem
 -album1
 -album2
 -album3
David Guetta
 -album1
 -album2

It would be nice to have per interpret playlists. But maybe one also only want a single album as playlist. So maybe placing a .playlist inside the folder just creates a playlist for the folder and all its subfolders.

Another question:
Is it also possible to enable voiceover for playlist names (havent tried voiceover yet)? The best would be to use voiceover for playlists but not for the songs as it takes too much data. But then you could have tons of playlists which are not names just "playlist 1,2,3...".

Question for usuage of the tool

Hi everyone, I'm sorry for making an extra issue for this.
I just wanted to ask, if that is the right way to use the tool:

  • I plug in my iPod Shuffle (4th Gen) & put all my mp3-files in the root directory
  • Then I execute the script by also specifying the path to the root directory of the iPod

Also do I need to keep the mp3-files in the root directory after the script ran through or can I remove them?
Sorry those questions might be obvious to many people, it's just for my understanding.

review of ipod-shuffle-4g

I mounted the device, copied the music over in mp3 format, ran ipod-shuffle-4g.py on the mounted directory, unmounted the device. Now I can listen to all the songs, no complications, no GUIs.
Thank you so much! It was about time, I hated Apple's iTunes, that slow bloated piece of fing s.

Use default Speaker when voiceover is disabled

Normally you hear a male speaker if no voiceover was selected via ITunes. Those sound files are still there ./NICO'S IPOD/iPod_Control/Speakable/Messages/.

However I checked my old Ipod backup and it seems the ipod does not generate any database for this "non voiceover" ipod settings from itunes. So there must be a way to use the internal voices without merging the sounds and doing complicated stuff.

If I disable voiceover with your tool I only get "Playlist zero" for ALL playlists. "All Songs" disappeared and is silent.

We should be able to fix this somehow. This also means we do not have to provide the closed source male speaker voiceover, which is great. I will look at the hex output with xxd. But I have nothing more than my backup. Not even a windows PC I could use to regenerate Itunes files.

Broken (.pls) playlist track paths gives error

Traceback (most recent call last):
  File "./shuffle.py", line 576, in <module>
    shuffle.write_database()
  File "./shuffle.py", line 512, in write_database
    f.write(self.tunessd.construct())
  File "./shuffle.py", line 212, in construct
    play_header = self.play_header.construct(self.track_header.tracks)
  File "./shuffle.py", line 350, in construct
    construction = playlist.construct(tracks)
  File "./shuffle.py", line 451, in construct
    position = tracks.index(self.ipod_to_path(i))

ValueError: "/media/linuxuser/NICO'S IPOD/music/k.i.z./ganz oben/01 - duhastaufdeinenkokaturndeinegeistigbehinderteschwestergefiktmucke.mp3" is not in list

I used this within a playlist, that gave me the error. Not using playlists is file. I guess its just a too long name (or path!!) of the song. And yeah, that is an official name. K.I.Z. fucked you again ;D

relative filenames in m3u playlists

If /path/to/ipod/music/artist/playlist.m3u has abc.mp3, it should consider /path/to/ipod/music/artist/abc.mp3 rather than throwing an error.

Playlists are not found

First thank you for your amazing work! I love my iPod Shuffle 4 and wouldn't be able to sync it nowadays without this script.

Lately I have some problems generating the playlists on the iPod. I use Rhythmbox to sync, and they are also detected by gtkPod. However some randomly pop up with the name Playlist 0 for example.

Might this be caused during the latest update? I have also switched to Fedora, so the problem might also be there.

Playlist files not ignored when using -d or -i

Example:
I've got a dir with a m3u file within an directory. When using -d switch, said directory produces 2 playlists: one from the dir, another from the playlist file.
Same for id3 option.

Expected behaviour:
m3u / pls / any other supported playlist type should be ignored when using -d / -i switch.

Generating playlists by Genre issues

I'm trying to generate two different voiceover playlists for two different Genres of music. I want one for Rock, and one for Soundtrack.

However, it's not accepting playlists set up by Banshee OR Rhythmbox, with the -p and -t options.
It also won't accept any .m3u or .pls because of the relative files.
-i Rock does not work, or does -i {Genre}.

This is probably my fault because I misinterpreted the instructions, but they are still unclear. Any advice?

Catch no space left error

Traceback (most recent call last):
  File "/usr/bin/ipod-shuffle-4g", line 739, in <module>
    shuffle.write_database()
  File "/usr/bin/ipod-shuffle-4g", line 631, in write_database
    f.write(self.tunessd.construct())

Edit: This happens if the generated voiceover files exceed the space left on the ipod. Affects v1.3

Catch Ctrl + C

If you interrupt the program it will output some errors. There should be a way to catch this and shut down properly (aka closing all file handles).

Certain files added to DB but not recognized by IPOD (Unicode problem?)

This might be related to #4

When syncing my files with rhythmbox and this script, I realized that some files are correctly added to the DB but the iPod does not recognize them and, for example skips the according playlist.

I explored the issue a little bit further and I found that it occurs when non-standard characters like "ó" are found in the filename or an ID3 tag field. The interesting thing is, after I updated tags with Easytag for both v1 and v2 to be UTF-8, the file was recognized.

I guess one can easily implement a function to rewrite the tags but I wanted to ask if someone else stumbled over the same problem and knows what actually is the problem.

Add releases + changelog

Since we fixed some issues and are going to fix a lot more, it would make sense to keep track of it.

I suggest to start from v1.0 (the original code you forked) and add a list of the fixes you made so far. After that you can tag new releases here:
https://github.com/nims11/IPod-Shuffle-4g/releases

Btw thx for looking into the othe issues I opened. I am currently trying to fix this disabled voiceover thing. Also I sent you an email some time ago, you must have missed it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.