News:

LATEST RELEASE:  FPP 6.3 - Download from here - https://github.com/FalconChristmas/fpp/releases/tag/6.3

+-+-

+-User

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+-Site Stats

Members
Total Members: 15733
Latest: aquila2heman
New This Month: 0
New This Week: 0
New Today: 0
Stats
Total Posts: 128986
Total Topics: 15886
Most Online Today: 146
Most Online Ever: 7634
(January 21, 2020, 02:14:03 AM)
Users Online
Members: 5
Guests: 115
Total: 120

BRP Voting Plugin - Allow others to vote for your songs!

Started by Barkers Random Projects, January 05, 2020, 04:25:16 AM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

datcomputerguy

So I use different playlists for different things, like a background, after hours, and main show.  The voting page always shows the next playlist regardless of what it is.  So I added a little filter in there that would ignore playlists that began with "111", I wanted to use ~ but they don't allow that character apparently lol.

In my main sequence I also have intermissions, so those sequence names I don't want to appear in the voting list.  So I added a little filter to not consider sequence/songs that begin with ~, so the voting page looks nice and clean.

The other feature I added was to ignore manually run sequences/playlists.  I had some people voting while I was running a test sequence and spent an hour working on my sequence and everything before noticing that it was the voting plugin changing things lol.  I think this should be a config checkmark or something, but for my use I just ignored it completely.

Another thing that I've had some complaints about was the time being in 24 hour format.  Which I know you just pull from the FPP API.  was going to look into the FPP settings to see if that's something I can change there or if I need to add a converter in the python code.

so the basic change are:
around line 287 after if status_iteration and before if current_show status.........

if status_iteration >= 60:
            status_iteration = 0
            check_show_uploaded()

        #patrick addition
        if current_playlist_type == 'sequence':
            logging.info('Not currently playing a playlist, only a song')
            playing_songs = False
            return

    if current_show_status != show_status:
        show_status = current_show_status
        upload_show_playing_status()



And around line 131
     else:
            logging.info('use media names')
            if 'mediaName' in song:
                title = str(song['mediaName'])
            elif 'sequenceName' in song:
                title = str(song['sequenceName'])
            else:
                title = 'Unknown'

        #this was added by patrick  
        if("~" in title):
            print("ignore this song")
        else:  #add it to the list to be sent
            song_names.append({"id": idx, "title": title})

    payload = {
        'privateKey': private_key,
        'songs': song_names,
        'status': get_show_status(),
        'nextShow': start_time,
        'pluginVersion': plugin_version
    }

I've used GitHub for my own projects but never really collaborated with anyone on one.  I think one of my conditionals sometimes causes it to not send any data until fpp is restarted, but haven't dug into it that far.  Just did this in an hour or so, so I know its not perfect lol.

datcomputerguy

Actually now that I'm thinking about it I didn't do the manual thing.  only if the sequence had ~ in it.

Barkers Random Projects

Quote from: datcomputerguy on December 06, 2020, 12:05:02 PMSo I use different playlists for different things, like a background, after hours, and main show.  The voting page always shows the next playlist regardless of what it is.  So I added a little filter in there that would ignore playlists that began with "111", I wanted to use ~ but they don't allow that character apparently lol.

In my main sequence I also have intermissions, so those sequence names I don't want to appear in the voting list.  So I added a little filter to not consider sequence/songs that begin with ~, so the voting page looks nice and clean.

The other feature I added was to ignore manually run sequences/playlists.  I had some people voting while I was running a test sequence and spent an hour working on my sequence and everything before noticing that it was the voting plugin changing things lol.  I think this should be a config checkmark or something, but for my use I just ignored it completely.

Another thing that I've had some complaints about was the time being in 24 hour format.  Which I know you just pull from the FPP API.  was going to look into the FPP settings to see if that's something I can change there or if I need to add a converter in the python code.
Very nice! That is awesome, and thanks for sharing! I wonder if people would find it useful to add a setting on the plugins page to ignore all songs that start with some value, just like how you've done.


For the time it is pulled directly from falcon player. I was planning on formatting that on the server side, but maybe it makes better sense to format it on the client and then send it to the server
Checkout what else we are working on at https://barkersrandomprojects.com

Barkers Random Projects

I did another update:

  • Added the ability to add basic HTML to the top of the page
  • Basic song voting stats are listed on the bottom of the brp voting page (this will be and look much better next season!)
  • Added ability to allow dupicate votes (for testing purposes)

I'll be monitoring the HTML being inserted on the site. Stuff like script tags will be filtered out, and there will be a cap of 500 characters, but everything else will work!

Let me know what you think!
Checkout what else we are working on at https://barkersrandomprojects.com

lxkev

My Plugin isn't displaying a Web address when I start the service?

disorderlywires

Mine isn't working either I am FPP 5.4.1 and upgraded to latest BRP voting plugin...

Barkers Random Projects

It looks like the plugin is having issues with the latest version of FPP - I'll get an update for this in the next day or so. Thanks for letting me know!
Checkout what else we are working on at https://barkersrandomprojects.com

plaberge

Quote from: Barkers Random Projects on December 03, 2021, 09:36:49 PM'll get an update for this in the next day or so.'
Much appreciated! It was a big hit last Christmas, people really liked being able to pick the next song.
Paul.
Halfmoon Bay, BC

disorderlywires

Quote from: Barkers Random Projects on December 03, 2021, 09:36:49 PMIt looks like the plugin is having issues with the latest version of FPP - I'll get an update for this in the next day or so. Thanks for letting me know!
Thank you so much, my viewers have been asking!

Barkers Random Projects

Quote from: disorderlywires on December 06, 2021, 08:03:51 PMThank you so much, my viewers have been asking!
Sorry for the delay, I've pushed an updated for the plugin. Try updating the plugin in FPP and let me know if that works.

Thanks!
Checkout what else we are working on at https://barkersrandomprojects.com

plaberge

Thank you! The updated plug-in works great! Much appreciated!

A note to anyone using this plug-in. Make sure that the Randomize Playlist feature is OFF, otherwise, you will get random results :(
Paul.
Halfmoon Bay, BC

Barkers Random Projects

Quote from: plaberge on December 07, 2021, 06:07:40 PMThank you! The updated plug-in works great! Much appreciated!

A note to anyone using this plug-in. Make sure that the Randomize Playlist feature is OFF, otherwise, you will get random results :(
Thanks for that feedback! Looks like there is some more work to do here with the plugin.
Checkout what else we are working on at https://barkersrandomprojects.com

disorderlywires

Quote from: Barkers Random Projects on December 07, 2021, 03:00:26 AM
Quote from: disorderlywires on December 06, 2021, 08:03:51 PMThank you so much, my viewers have been asking!
Sorry for the delay, I've pushed an updated for the plugin. Try updating the plugin in FPP and let me know if that works.

Thanks!
Working great over here!  Thank you so much for this!

Daveperkes

I get the following while installing:
Installing plugin brp-fpp-voting
Cloning into 'brp-fpp-voting'...
Running fpp_install.sh script for brp-fpp-voting
+ sudo apt-get update
Get:1 http://archive.raspberrypi.org/debian buster InRelease [32.6 kB]
Get:2 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]
Reading package lists...
E: Repository 'http://raspbian.raspberrypi.org/raspbian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
E: Repository 'http://archive.raspberrypi.org/debian buster InRelease' changed its 'Suite' value from 'testing' to 'oldstable'
+ python3 -m pip install requests
/usr/bin/python3: No module named pip
+ python3 -m pip install requests python-crontab
/usr/bin/python3: No module named pip
{"Status":"Error","Message":"Could not properly install plugin"}

Daveperkes

Having a problem installing. See the following:
Installing plugin brp-fpp-voting
Cloning into 'brp-fpp-voting'...
Running fpp_install.sh script for brp-fpp-voting
+ sudo apt-get update
Get:1 http://archive.raspberrypi.org/debian buster InRelease [32.6 kB]
Get:2 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]
Reading package lists...
E: Repository 'http://raspbian.raspberrypi.org/raspbian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
E: Repository 'http://archive.raspberrypi.org/debian buster InRelease' changed its 'Suite' value from 'testing' to 'oldstable'
+ python3 -m pip install requests
/usr/bin/python3: No module named pip
+ python3 -m pip install requests python-crontab
/usr/bin/python3: No module named pip
{"Status":"Error","Message":"Could not properly install plugin"}

Support FPP

+- Recent Topics

F48V4-NS at 40 fps using all 48 pixel output ports? by MikeKrebs
June 02, 2023, 09:36:11 PM

colorlight 5a-75b not working with raspberry pi4B fpp by MikeKrebs
June 02, 2023, 09:25:08 PM

EEEPROM Files by shanebou24
June 01, 2023, 01:27:06 PM

Kulp OctoPlus v2.3 by MikeKrebs
May 31, 2023, 10:03:21 PM

Weird latency over artnet by MikeKrebs
May 30, 2023, 09:50:12 PM

Discontinued P10 1/2 Scan Panel Issues by MikeKrebs
May 30, 2023, 09:40:30 PM

Fpp and xlights preview not working by bloojoop
May 30, 2023, 08:42:23 PM

hanson pi hat problems wih DPi pixels. by MikeKrebs
May 29, 2023, 09:12:13 PM

Logic Shift a 12v Data Pin to Control 5v WS2812b with Optocoupler by brookedot
May 29, 2023, 11:49:51 AM

Sound Reactive in Real Time by dkulp
May 29, 2023, 10:34:07 AM

Powered by EzPortal
Powered by SMFPacks Menu Editor Mod