ipodsync 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
ipodsync/__init__.py ADDED
@@ -0,0 +1,27 @@
1
+ """ipodsync — upload music to iPod nano 6G/7G without iTunes/Apple Music.
2
+
3
+ Transport is a plain volume (mass storage); it edits the SQLite library
4
+ `iTunes Library.itlp` and the `Locations.itdb.cbk` signature (hashAB). Cover art
5
+ is written in pure Python (ArtworkDB + .ithmb). Knows nothing about where the
6
+ files came from.
7
+
8
+ Public API:
9
+ from ipodsync import find_ipod, ItlpLibrary, Track, HashAB
10
+ """
11
+ from .hashab import HashAB, HashABError
12
+ from .library import ItlpLibrary
13
+ from .models import Track
14
+ from .transport import IPod, IPodNotFound, find_ipod
15
+
16
+ __version__ = "0.1.0"
17
+
18
+ __all__ = [
19
+ "find_ipod",
20
+ "IPod",
21
+ "IPodNotFound",
22
+ "ItlpLibrary",
23
+ "Track",
24
+ "HashAB",
25
+ "HashABError",
26
+ "__version__",
27
+ ]
ipodsync/__main__.py ADDED
@@ -0,0 +1,5 @@
1
+ """`python -m ipodsync` -> CLI."""
2
+ from .cli import main
3
+
4
+ if __name__ == "__main__":
5
+ raise SystemExit(main())
@@ -0,0 +1,29 @@
1
+ """Constant byte templates of nano 7G ArtworkDB atoms.
2
+
3
+ Generated by scripts/gen_art_templates.py from the iTunes reference
4
+ native/fixtures/itunes_artwork/ArtworkDB. Do not edit by hand —
5
+ these are real iTunes bytes; the writer patches only image_id/song_id/ithmb_offset.
6
+ """
7
+
8
+ MHII_HEADER = bytes.fromhex("6d68696998000000a0030000050000006500000000000000000000000000000000000000000000000000000000000000cd4401000000000001000000010000000000000000000000000000000000f87f000000000000f87f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")
9
+ MHOD_CONTAINER = bytes.fromhex("6d686f6418000000a4000000020000000000000000000000")
10
+ MHOD_MHAF = bytes.fromhex("6d686f6418000000780000000600000000000000000000006d686166600000003c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")
11
+ MHFD_TEMPLATE = bytes.fromhex("6d6866648400000020290a000000000006000000030000000000000031030000ea356c5898804379b5100a34de06a1c70100000000000000000000005b96a7fed08a706600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")
12
+ MHLI_TEMPLATE = bytes.fromhex("6d686c695c000000cc0200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")
13
+ MHLA_TEMPLATE = bytes.fromhex("6d686c615c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")
14
+ MHLF_TEMPLATE = bytes.fromhex("6d686c665c000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")
15
+ MHIF_ALL = bytes.fromhex("6d6869667c0000007c00000000000000ed03000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006d6869667c0000007c00000000000000ef03000000a80c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006d6869667c0000007c00000000000000f203000000c20100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006d6869667c0000007c00000000000000f503000088130000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006d6869667c0000007c00000000000000f7030000481a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006d6869667c0000007c00000000000000f8030000d419000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")
16
+
17
+ MHNI = {
18
+ 1010: bytes.fromhex("6d686e694c0000008c00000001000000f20300000000000000c2010000000000f000f0000000000000c201000000000000000000000000000000000000000000000000000000000000000000"),
19
+ 1013: bytes.fromhex("6d686e694c0000008c00000001000000f50300000000000088130000000000003200320000000000881300000000000000000000000000000000000000000000000000000000000000000000"),
20
+ 1015: bytes.fromhex("6d686e694c0000008c00000001000000f703000000000000481a0000000000003a003a0000000000481a00000000000000000000000000000000000000000000000000000000000000000000"),
21
+ 1016: bytes.fromhex("6d686e694c0000008c00000001000000f803000000000000d4190000000000003900390000000000d41900000000000000000000000000000000000000000000000000000000000000000000"),
22
+ }
23
+
24
+ STRMHOD = {
25
+ 1010: bytes.fromhex("6d686f6418000000400000000300000000000000000000001c00000002000000000000003a00460031003000310030005f0031002e006900740068006d006200"),
26
+ 1013: bytes.fromhex("6d686f6418000000400000000300000000000000000000001c00000002000000000000003a00460031003000310033005f0031002e006900740068006d006200"),
27
+ 1015: bytes.fromhex("6d686f6418000000400000000300000000000000000000001c00000002000000000000003a00460031003000310035005f0031002e006900740068006d006200"),
28
+ 1016: bytes.fromhex("6d686f6418000000400000000300000000000000000000001c00000002000000000000003a00460031003000310036005f0031002e006900740068006d006200"),
29
+ }