petro-kushchak / homebridge-homepod-radio

MIT License
38 stars 2 forks source link

Enhancement: Stream multiple files #57

Open justjam2013 opened 1 week ago

justjam2013 commented 1 week ago

Allow streaming of multiple files, by specifying multiple semicolon/colon/space separated paths:

/path/to/file1.ext;/path/to/file2.ext

As the metadata passes streamerName instead of the individual details of the audio file (title, album, etc.), then stream.py:347 can be modified as follows:

        items = re.split(';: ', file_path)    # allow semicolon, colon, space separators
        paths = [item for item in items if item!= ””]    # filter out empty items
        for path in paths:
            await self.atv.stream_file(path, metadata)
            await asyncio.sleep(1)

This would allow streaming of multiple files, for example a whole album.

Quotation marks may be required around filePath in airplayDevice.ts:78 if spaces are allowed.

petro-kushchak commented 1 week ago

Hi, @justjam2013 - this absolutely makes sense, I should have some free time in a few weeks and will add this feature