January 26, 201412 yr Hey everyone, I've been working on this for my own use and thought some others might find it useful. I keep all my music on my unRAID machine but use Google music for my playback. Since there isn't an uploader client for unRAID, I had to have my music drive mounted in windows and the uploader run there. Even then, I find the uploader isn't very consistent with when it decides to upload new files. I wanted something that would 1) run on unRAID and 2) watch the filesystem to immediately detect new music, so I ended up with this plugin. I'm sure there are still some issues, but it can be configured to watch folders for new files and automatically upload any mp3s it finds so the basic functionality is there. Some people who tried it out a while back asked about multiple account support, so it does that too (you can have multiple google accounts, each with separate folders to watch for new music). Importing an existing library would look something like this: [*]Install the plugin [*]You can configure which port the plugin runs on by going to the plugin's settings page in unRAID [*]Access the plugin itself by going to <unraid url>:<port you configured> [*]You'll be asked to allow the app to access your the google music api on your behalf (your email as well, which I use as a 'username' to separate accounts) [*]Go to the config page and add the path where your music is loaded [*]Go to the status page and click 'Scan for new files'. This will take a while but will happen asynchronously, so you can browse around if you like (and can click the status page to watch it progress). There is currently no explicit signal for when the plugin is done scanning for new files, but once you notice the page numbers no longer seem to be increasing on the status page, it's safe to assume scanning is finished. [*]Click 'Sync with library'. This will compare all of the scanned files to the ones you've already uploaded to make sure we don't upload any duplicates (google music should be smart enough to figure this out, but in my experience it still added a bunch of dupes so I added this). THIS MAY TAKE A LONG TIME and it DOESN'T HAPPEN ASYNCHRONOUSLY. This means click the button and go grab a scotch (or 3) while it finishes. [*] Once this is done you can click 'upload files' to upload any that aren't already in google music [*]From this point onward, any music files written to any subdirectory of the paths you have configured on the config page will be automatically uploaded to your google music account. If you'd rather audit this uploading, you can change the "What should we do with new files?" option on the config page to "Just scan" (rather than upload automatically). I want to improve the feedback on some of the tasks that take longer to execute (scanning for files, uploading songs, etc). Ideally I'd like them to be totally async and show some sort of progress bar, but I may need to move away from bottle for my web framework for that. Anyway, it's on my list. I've run this with my own library (~12,000 songs) and everything seemed to go ok. The plugin doesn't do any deleting, so there shouldn't be any concern there. Worst case you can go through 'recently added' after running the first import and check for any duplicates. It's a work in progress so definitely file any bugs or feature requests over on github and I'll try to get to them when I can. The plugin is located here: https://raw.github.com/bbaldino/unraid_plugins/master/bgmm.plg If you want to watch for updates/file bugs (please file bugs!), the github for the actual logic is here: https://github.com/bbaldino/BGMM
February 2, 201412 yr Just a quick bug report: When installed this plugin, it created the directory /boot/config/plugins/bgmm as expected. The content of this directory was: root@Tower:/boot/config/plugins/bgmm# ls -la total 2834 drwxrwxrwx 3 root root 2048 2014-02-02 22:09 ./ drwxrwxrwx 17 root root 4096 2014-02-02 21:40 ../ drwxrwxrwx 5 root root 2048 2014-01-26 18:19 BGMM-master/ -rwxrwxrwx 1 root root 5561 2014-01-28 19:18 bgmm.png* -rwxrwxrwx 1 root root 39 2014-02-02 21:53 bgmm_config.cfg* -rwxrwxrwx 1 root root 2883709 2014-01-28 19:18 google-music-uploader.tgz* The problem was BGMM would not load. Looking in /etc/rc.d/rc.bgmm I saw that it expected bgmm.py to be /boot/config/plugins/bgmm/bgmm/bgmm.py instead of /boot/config/plugins/bgmm/BGMM-master/bgmm.py Personally i just ran cp -r /boot/config/plugins/bgmm/BGMM-master /boot/config/plugins/bgmm/bgmm to fix all probs. Hope this helps someone!
February 2, 201412 yr Author Just a quick bug report: When installed this plugin, it created the directory /boot/config/plugins/bgmm as expected. The content of this directory was: root@Tower:/boot/config/plugins/bgmm# ls -la total 2834 drwxrwxrwx 3 root root 2048 2014-02-02 22:09 ./ drwxrwxrwx 17 root root 4096 2014-02-02 21:40 ../ drwxrwxrwx 5 root root 2048 2014-01-26 18:19 BGMM-master/ -rwxrwxrwx 1 root root 5561 2014-01-28 19:18 bgmm.png* -rwxrwxrwx 1 root root 39 2014-02-02 21:53 bgmm_config.cfg* -rwxrwxrwx 1 root root 2883709 2014-01-28 19:18 google-music-uploader.tgz* The problem was BGMM would not load. Looking in /etc/rc.d/rc.bgmm I saw that it expected bgmm.py to be /boot/config/plugins/bgmm/bgmm/bgmm.py instead of /boot/config/plugins/bgmm/BGMM-master/bgmm.py Personally i just ran cp -r /boot/config/plugins/bgmm/BGMM-master /boot/config/plugins/bgmm/bgmm to fix all probs. Hope this helps someone! Ah thanks! That's what I get for changing the repository name at the last minute. Should be an easy fix. EDIT: Alright, got this fixed up. If you tried the first version you'll need to do this: Clean out the existing plugin logic by removing it: rm -rf /boot/config/plugin/bgmm rm -rf /usr/local/emhttp/plugins/bgmm rm -rf /tmp/bgmm-* Re-get the .plg file and re-run the installplg command on it (don't worry, if you've scanned any music the database is held elsewhere and won't be lost)
February 5, 201412 yr This looks great, are we able to configure where the install files are located? I like to keep everything on my cache drive, away from the flash.
February 5, 201412 yr Author This looks great, are we able to configure where the install files are located? I like to keep everything on my cache drive, away from the flash. Don't have this as of now, but seems reasonable. File a bug on github and I'll try and get it done.
March 19, 201412 yr Author Made some changes to move one of the config files and allow for the install location to be configurable. Seemed to work alright for me when I tried it, but definitely let me know if you run into any issues.
July 20, 201411 yr I would love to use your plugin, but after installation the icon appears in settings but when I click on it I receive this error message: Warning: include(JSON.php): failed to open stream: No such file or directory in /tmp/webGui-master/plugins/webGui/include/myPage_content.php(64) : eval()'d code on line 3 Warning: include(): Failed opening 'JSON.php' for inclusion (include_path='.:') in /tmp/webGui-master/plugins/webGui/include/myPage_content.php(64) : eval()'d code on line 3 Fatal error: Call to undefined function json_decode() in /tmp/webGui-master/plugins/webGui/include/myPage_content.php(64) : eval()'d code on line 4 I'm running Unraid 5.0.5
July 20, 201411 yr Author I would love to use your plugin, but after installation the icon appears in settings but when I click on it I receive this error message: Warning: include(JSON.php): failed to open stream: No such file or directory in /tmp/webGui-master/plugins/webGui/include/myPage_content.php(64) : eval()'d code on line 3 Warning: include(): Failed opening 'JSON.php' for inclusion (include_path='.:') in /tmp/webGui-master/plugins/webGui/include/myPage_content.php(64) : eval()'d code on line 3 Fatal error: Call to undefined function json_decode() in /tmp/webGui-master/plugins/webGui/include/myPage_content.php(64) : eval()'d code on line 4 I'm running Unraid 5.0.5 It looks like you're running the new web gui, is that right? If so, the plugin won't work--I haven't looked at getting it running on the new web ui yet unfortunately.
August 21, 201411 yr Author I'm not sure exactly what needs to be done to get things working on the new web ui, but at this point I'm holding off as it looks like the new VM features will make the necessity to write an unraid-specific plugin go away all together. If someone can give me some hints on making it work with the new web ui though I can get that done.
September 1, 201411 yr So I removed the new web gui and tried to install your plugin, but I get presented with the following error: File "/tmp/bgmm-config", line 12, in <module> with open("/boot/config/appdata/bgmm/bgmm_config.cfg", "w+") as f: IOError: [Errno 2] No such file or directory: '/boot/config/appdata/bgmm/bgmm_config.cfg' failed I manually made the file (left it empty) and the plugin installs and I can access the plugin on the settings page, but I am unable to start the service.
September 2, 201411 yr Author So I removed the new web gui and tried to install your plugin, but I get presented with the following error: File "/tmp/bgmm-config", line 12, in <module> with open("/boot/config/appdata/bgmm/bgmm_config.cfg", "w+") as f: IOError: [Errno 2] No such file or directory: '/boot/config/appdata/bgmm/bgmm_config.cfg' failed I manually made the file (left it empty) and the plugin installs and I can access the plugin on the settings page, but I am unable to start the service. It looks like there's actually a bug here, I run into the same problem when I try a fresh install. Not sure how the code got left in a bad state, but believe I've got a fix. Can you try the following? [*]re-download the plugin file here: https://raw.githubusercontent.com/bbaldino/unraid_plugins/master/bgmm.plg [*]delete /tmp/bgmm-config [*]re-install the plugin And let me know how it goes?
September 2, 201411 yr It's working great, thanks for the plugin! I wanted to move the plugin install off my flash drive though as to not decrease its life, but it gives a 404 error. I tried moving the install to /usr/local/bgmm
September 2, 201411 yr Author It's working great, thanks for the plugin! I wanted to move the plugin install off my flash drive though as to not decrease its life, but it gives a 404 error. I tried moving the install to /usr/local/bgmm Cool, glad it's working I believe that /usr/local is part of the file system that's going to be over-written every time, as it's extracted at every boot. If you want to move the install off of the flash drive, the best place would be a cache drive, do you have one? If not, you could use one of your media drives.
September 3, 201411 yr @fortytwo Are you the original developer of BGMM? If so; any interest of creating a dockerised version of it?! It would be great to see this app self-contained in unRaid 6 meaning no new webUI issues! Thanks, The Capt.
September 3, 201411 yr Author @fortytwo Are you the original developer of BGMM? If so; any interest of creating a dockerised version of it?! It would be great to see this app self-contained in unRaid 6 meaning no new webUI issues! Thanks, The Capt. I am the creator yeah, and would definitely be up for looking into that. That basically involves just making it an entirely standalone app, correct? So just moving the config that's currently integrated in the web ui into the app ui itself?
September 3, 201411 yr @fortytwo Are you the original developer of BGMM? If so; any interest of creating a dockerised version of it?! It would be great to see this app self-contained in unRaid 6 meaning no new webUI issues! Thanks, The Capt. I am the creator yeah, and would definitely be up for looking into that. That basically involves just making it an entirely standalone app, correct? So just moving the config that's currently integrated in the web ui into the app ui itself? TBH i have no idea what would be required to dockerise an app, I am currently about to move to Unraid 6 beta 8 and I would love to see BGMM as a Docker option!! Maybe ask in the Docker subforum, seeing as it is a (relatively) simple python app it might be very easy to accomplish. needo and gfjardin would prob be able to help, what you think? The Capt.
September 3, 201411 yr Author @fortytwo Are you the original developer of BGMM? If so; any interest of creating a dockerised version of it?! It would be great to see this app self-contained in unRaid 6 meaning no new webUI issues! Thanks, The Capt. I am the creator yeah, and would definitely be up for looking into that. That basically involves just making it an entirely standalone app, correct? So just moving the config that's currently integrated in the web ui into the app ui itself? TBH i have no idea what would be required to dockerise an app, I am currently about to move to Unraid 6 beta 8 and I would love to see BGMM as a Docker option!! Maybe ask in the Docker subforum, seeing as it is a (relatively) simple python app it might be very easy to accomplish. needo and gfjardin would prob be able to help, what you think? The Capt. Cool. Is having/running docker a default in unraid 6? Or does it involve extra setup?
September 3, 201411 yr @fortytwo Are you the original developer of BGMM? If so; any interest of creating a dockerised version of it?! It would be great to see this app self-contained in unRaid 6 meaning no new webUI issues! Thanks, The Capt. I am the creator yeah, and would definitely be up for looking into that. That basically involves just making it an entirely standalone app, correct? So just moving the config that's currently integrated in the web ui into the app ui itself? TBH i have no idea what would be required to dockerise an app, I am currently about to move to Unraid 6 beta 8 and I would love to see BGMM as a Docker option!! Maybe ask in the Docker subforum, seeing as it is a (relatively) simple python app it might be very easy to accomplish. needo and gfjardin would prob be able to help, what you think? The Capt. Cool. Is having/running docker a default in unraid 6? Or does it involve extra setup? Docker is standard in unraid 6, and beta 8 even adds web-ui configuration for it from the brilliant gfjardin; see: http://lime-technology.com/forum/index.php?topic=33965.0
September 3, 201411 yr Author @fortytwo Are you the original developer of BGMM? If so; any interest of creating a dockerised version of it?! It would be great to see this app self-contained in unRaid 6 meaning no new webUI issues! Thanks, The Capt. I am the creator yeah, and would definitely be up for looking into that. That basically involves just making it an entirely standalone app, correct? So just moving the config that's currently integrated in the web ui into the app ui itself? TBH i have no idea what would be required to dockerise an app, I am currently about to move to Unraid 6 beta 8 and I would love to see BGMM as a Docker option!! Maybe ask in the Docker subforum, seeing as it is a (relatively) simple python app it might be very easy to accomplish. needo and gfjardin would prob be able to help, what you think? The Capt. Cool. Is having/running docker a default in unraid 6? Or does it involve extra setup? Docker is standard in unraid 6, and beta 8 even adds web-ui configuration for it from the brilliant gfjardin; see: http://lime-technology.com/forum/index.php?topic=33965.0 Awesome! I've been wanting to upgrade but have stuck behind because I use BGMM as well I'll take a look at making it work with docker.
September 25, 201411 yr Author Just as a bit of an update, I did get some time to start looking at docker, but it's going to be a bit hard for me to experiment with it: you have to have a btrfs drive to run docker. The easiest way to try btrfs is with a cache drive, but I don't have a key for my unraid development vm, so I can't do a cache drive there. Creating a btrfs pool manually is a bit more work, will look into that.
September 25, 201411 yr Just as a bit of an update, I did get some time to start looking at docker, but it's going to be a bit hard for me to experiment with it: you have to have a btrfs drive to run docker.The latest beta as of this writing (beta9) does not need a whole drive set up as btrfs. It creates a file on any disk, it can be formatted with reiserfs or xfs or btrfs, that is mounted as a btrfs container for docker.
September 25, 201411 yr Author Just as a bit of an update, I did get some time to start looking at docker, but it's going to be a bit hard for me to experiment with it: you have to have a btrfs drive to run docker.The latest beta as of this writing (beta9) does not need a whole drive set up as btrfs. It creates a file on any disk, it can be formatted with reiserfs or xfs or btrfs, that is mounted as a btrfs container for docker. Oh, really? I'm on beta9, maybe I'm missing something. Although, when I go to the docker page I see this error: Warning: parse_ini_file(/boot/config/docker.cfg): failed to open stream: No such file or directory in /usr/local/emhttp/plugins/webGui/include/myPage_content.php(71) : eval()'d code on line 35 (And sure enough there is no docker.cfg file there. I figured it hadn't installed correctly or something without btrfs)
Archived
This topic is now archived and is closed to further replies.