GithubHelp home page GithubHelp logo

Date can be a list about rofi_mpd HOT 6 CLOSED

EgZvor avatar EgZvor commented on August 26, 2024
Date can be a list

from rofi_mpd.

Comments (6)

JakeStanger avatar JakeStanger commented on August 26, 2024

Are you able to get me the track date causing this crash? Just a print(date) on the line above would be sufficient. I'd like to know why a date would be a list.

from rofi_mpd.

EgZvor avatar EgZvor commented on August 26, 2024

It looks like this in ncmpcpp
image

from rofi_mpd.

EgZvor avatar EgZvor commented on August 26, 2024
import json

from mpd import MPDClient


client = MPDClient()
client.connect('localhost', '6600')

library = client.listallinfo()

print(json.dumps([
    song for song in library
    if isinstance(song.get('date'), list)][0], indent=2
))
(.env) ➜ ~/repos/Rofi_MPD (master) ✗ python showdoubledate.py
{
  "file": "Gorillaz - The Now Now/01 - Humility (feat. George Benson).mp3",
  "last-modified": "2018-07-25T18:41:25Z",
  "time": "198",
  "duration": "197.982",
  "artist": "Gorillaz",
  "albumartist": "Gorillaz",
  "title": "Humility (feat. George Benson)",
  "album": "The Now Now",
  "track": "1",
  "date": [
    "2018",
    "2018"
  ],
  "genre": "Alternative",
  "composer": "Gorillaz",
  "disc": "1"
}

from rofi_mpd.

EgZvor avatar EgZvor commented on August 26, 2024

I guess this is relevant
https://github.com/Mic92/python-mpd2/blob/master/examples/multitags.py

from rofi_mpd.

JakeStanger avatar JakeStanger commented on August 26, 2024

This is all very helpful, thank you very much. Also your rice is very pretty.

ae9df0b should serve as a fix for now. Let me know if this works or if you want any different behavior.

from rofi_mpd.

EgZvor avatar EgZvor commented on August 26, 2024

That's fine (it's what I did too anyway). Knowing what this double date means would probably help to decide what to do with it in the future.

from rofi_mpd.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.