vicwomg / pikaraoke

Youtube-based Karaoke machine for Raspberry Pi, OSX, Windows, and Linux
494 stars 129 forks source link

add songs from external drives to ~/pikaraoke-songs #289

Closed RecursiveFunctions closed 9 months ago

RecursiveFunctions commented 9 months ago

Added 2 scripts that create symbolic links from all songs from external drives to ~/pikaraoke-songs, including songs in subfolders.

RecursiveFunctions commented 9 months ago

Not sure how to properly make a merge request here but the main changes I wanted to add were the 2 scripts and a dependency (or sudo apt install) for plocate in setup.sh

combine.sh binds mount points to /media/unified using names like sda1 sda2 and such. This solves issue #287 in a roundabout way.

create_database.sh uses plocate to create a local database with the absolute paths to all songs.

so now pikaraoke can see your songs that were already in ~/pikaraoke-songs/ PLUS every song in every external drive and every subfolder.

Still thinkin of a way to use this to make a cache so you don't have to load every song on startup.

combine.sh runs create_database.sh so just run that to run both.

vicwomg commented 9 months ago

I appreciate the pull request, but I may need to hold off on this because it has a lot of hard-coded paths and it's not cross-platform.

RecursiveFunctions commented 9 months ago

it's not cross-platform.

I could add a check for the OS like you have elsewhere in your code.

I suppose the right answer is to rewrite it in python so it works on windows too, although I'm not sure how I'd go about it. Maybe run this script if linux/macOS, and then have a separate python implementation for windows?

vicwomg commented 9 months ago

Yes to make it fully cross platform, this should be done in python. The scripts are really only for installing dependencies and setting up python environments.

I'll post some suggestions in #286