iconoclasthero / mpdignore

mpdignore allows automatic processing of .mpdignore addition requests via playlist from all mpd clients capable of adding files to playlists
2 stars 0 forks source link

Could you explain what this does? #1

Closed bonelifer closed 7 months ago

bonelifer commented 7 months ago

Could you explain what this does?

iconoclasthero commented 7 months ago

Well, it's a series of scripts that run with systemd to allow one to ... hmm, i'll write something on the main page.

iconoclasthero commented 7 months ago

https://github.com/iconoclasthero/mpdignore/blob/main/README.md

bonelifer commented 7 months ago

Sounds good. But why is a secondary playlist needed?

iconoclasthero commented 7 months ago

updated README.md

are you going to try and actually use this? the scripts are really not in shape to transfer without working on them... i think my username and mpd password might be floating around in some. honestly, this was almost made a private repo last week but for this issue you created.

iconoclasthero commented 7 months ago

I'm actually going to redo a lot of this to get rid of some of the problems. there's going to be one file sourced for all the functions that interact e.g., with mpd.conf.

Also, that second .m3u could be eliminated by defining it as /dev/null so that the second logging won't be saved...if you ever want get the ignored files, you should be able to query the .mpdignore files for the info... you'd have to do some more processing, but this would be a start I put up a little script to pull the file names from the .mpdignore files e.g.,

while read -r line
 do
  ignoredir="${line%.mpdignore}"
  while read -r ignored
    do
      [[ "$ignored" != \#* ]] && printf '%s%s\n' "$ignoredir" "$ignored"
    done < <(cat "$line")
 done < <(find "$musicdir" -name .mpdignore)
/library/music/94-jam/Leftover Salmon/Leftover Salmon -- 1995-07-14: Fox Theater, Boulder, CO (1995)/Leftover Salmon -- 2-02 - [ tuning ].flac
/library/music/94-jam/Leftover Salmon/Leftover Salmon -- Bridges to Bert (1993)/Leftover Salmon -- 11 - Zombie Jamboree.flac
/library/music/94-jam/Leftover Salmon/Leftover Salmon -- The Nashville Sessions (1999)/Leftover Salmon -- 12 - Up on the Hill Where We Do the Boogie.flac
/library/music/94-jam/Widespread Panic/Widespread Panic -- 2018-03-15: Theater at MGM, Oxen Hill, MD (2018)/Widespread Panic -- 01-11 - Porch Song.flac
/library/music/94-jam/Widespread Panic/Widespread Panic -- 2018-03-15: Theater at MGM, Oxen Hill, MD (2018)/Widespread Panic -- 01-01 - \[ intro \].flac
/library/music/94-jam/Bob Weir and Wolf Bros. -- 2021-06-08: Red Rocks Amphitheater, Morrison, CO (2021)/Bob Weir and Wolf Bros. -- 1-06 - Story of Bob's Pink Guitar.flac
/library/music/Dolly Parton/Dolly Parton -- The Best of Dolly Parton (1997)/Dolly Parton -- 19 - Me and Little Andy.flac
/library/music/Love -- Forever Changes (1967)/Love -- 07 - Maybe the People Would Be the Times or Between Clark and Hilldale.flac
/library/music/Love -- Forever Changes (1967)/Love -- 06 - The Red Telephone.flac
/library/music/Simone -- Simone on Simone (2008) (mp3)/Simone -- 12 - Child in Me.mp3
/library/music/Rick James -- Bustin' Out: The Best of Rick James (1994)/Rick James -- 02-07 - Glow.flac
/library/music/The Mamas & the Papas -- Greatest Hits (1998)/The Mamas & the Papas -- 19 - Safe in My Garden.flac
/library/music/Olivia Rodrigo/Olivia Rodrigo -- GUTS (2023)/Olivia Rodrigo -- 08 - get him back!.flac
/library/music/Captain Beyond/Captain Beyond -- Captain Beyond (1972)/Captain Beyond -- 07 - Frozen Over.flac
/library/music/Captain Beyond/Captain Beyond -- Captain Beyond (1972)/Captain Beyond -- 07 - Frozen Over.flac
/library/music/George Clinton/George Clinton -- George Clinton Family Series, Part 3: P is the Funk (1993)/13 - George Clinton and Family -- Interview.flac
/library/music/86-classical/Sarah Brightman -- The Harem World Tour: Live from Las Vegas (2004)/Sarah Brightman -- 03 - It's a Beautiful Day.flac
iconoclasthero commented 7 months ago

When you pull the .mpdignore files you'll get things that were not ignored by mpdignore but rather done so manually, e.g.,

/library/music/00-incoming/*
/library/music/*.iso
/library/music/Zee Avi -- Zee Avi (2009)
/library/music/00-incoming
/library/music/*cue
/library/music/*m3u

an advantage of pulling this, aside from the above is that what is pulled will be current as files are changed whereas the created .m3u will not be accurate if the path of any of the entries changes.

bonelifer commented 7 months ago

I've been searching for mpd related scripts. Collecting the relevant URLS. My laptop install of MPD shit the bed and I can't get it fixed without reinstalling Xubuntu. Since I'm setting up a Debian install on a thin client and starting new, I thought I'd check if anyone had created something new. I'm interested in this because it adds functionality. It improves on an important functionality of software I use. I'm not a programmer, but I play one in my bedroom with chatGPT/Gemini(Bard). So I've tried redoing this in python. The daemon, is mostly done, still need to have it create the .mpdignore file. I'm not sure if it's supposed to be one file or where it's supposed to go so mpd uses it. It was the only file I didn't input into chatGPT. I just described what it did from your initial README.md. The rest of the files, I fed into chatGPT and told it to rewrite them as python. Also had all of them use a config.ini in order to reduce the places where that information was and to make it easier to setup. I also tried automating some of that in the install.sh file. I made the ignore-skip one file with arguments for which to do, ignore-skip.py. Then also make bash scripts to that can are then symlinked like you had it before. For -5 and +5, I made three files, one combined, and two separate. I converted all the files, I understood and ignored the ones I didn't. If you want I can upload them. I would of finished the daemon by this time today, but I woke up feeling like crap. I understand dealing with Max, it's something about Germans that make them control freaks. He's a million times better than dealing with the hostile Russian dude that writes TinyTinyRSS. Obviously I haven't tested any of this since, I don't currently have a mpd set up.

bonelifer commented 7 months ago

Also I found using ghostwriter for writing Markdown much easier and consistent to getting README.md and other Markdown files for Github.

bonelifer commented 7 months ago

So if I understand correctly currently playing Queue(playlist) --> .mpdignore.m3u --> .mpdignore

iconoclasthero commented 7 months ago

Hmm... thanks for the tips. I was literally about to go do something else since i wasted spent all day doing this.

I've dabbled a bit in python, but pure bash is just easier for me. I'm excited to see what you produced.

.mpdignore files can basically be anywhere. I put a link to the mpd readthedocs for the .mpdignore files. They're pretty easy to deal with. I put them with the songs themselves. My

I'm of Polish and Hungarian ancestry; don't get me started on Germans and Russians.

iconoclasthero commented 7 months ago

So if I understand correctly currently playing Queue(playlist) --> .mpdignore.m3u --> .mpdignore

Discord: https://discord.gg/AZWEa4YN