In Yesterday, Himesh Patel plays Jack, a struggling U.K. singer-songwriter whose struggling is well-deserved.

Upon hearing one of his mediocre tunes, a woman says her inclination is to hate it, but to confirm that feeling of full-on contempt she’d have to listen to it a second time, and, no, thanks.

A chastened Jack decides to give up music, but Yesterday has the kind of follow-your-dreams instincts that will not allow that to happen, and it’s also the kind of romantic fable wherein in love can alter the known universe — it’s by the writer of Love, Actually, and directed by Danny Boyle, leaning full-on Millions mode, a movie I love.

Some cosmic event, manifested as a brief worldwide power outage, reorders recent history, and Jack discovers that in this new reality, no one has ever heard of the Beatles (a few other popular culture artifacts are missing as well).

Yesterday is at its best tracing the early stages of Jack’s slow awakening to this paradigm shift. He picks up his guitar and casually plunks out of few lines of “Yesterday” at a café, and looks up to see his friends weepy and overcome. Like they’d never heard it before, which they haven’t.

These scenes are cleverly written, and it’s fun to see Jack grapple with the perplexing new paradigm (internet searches for “Beatles” auto-corrects to beetles), and the sheepish guilt that comes with a surging career built entirely on piracy. Jack, in this sense, is short for hijack.

There is a funny bit about Jack opening for Ed Sheeran (a good sport here), then quickly surpassing the headliner as the recovered Beatles catalog, pulled from across the universe, makes him a global phenomenon.

Yesterday is more interested in the practical details of Jack’s Beatles revival project than any larger questions of ethics and artistry. Jack, for instance, is faced with the simple challenge of trying to remember the words, which is why the movie invokes the Fab Four’s most familiar, rememberable songs.

This is all presented as breezy comedy, and it works well. Problems arise when Yesterday turns to the core romance between Jack and a longtime booster (Lily James) who has harbored an unrequited crush on him for years.

Popularity takes Jack to Los Angeles (and greedy music exec Kate McKinnon) and fame and riches, raising a question: What does it profit a man to gain the world and lose Lily James, with cute bangs and an adorable array of flower-print dresses? The fits and starts of their on-again off-again relationship are illogical, the resolution inevitable.

As for music, the movie, like Rocketman, reminds of us a time when melody was more important to pop. Through Jack, it also introduces an amazing handheld device, available cheap and secondhand, that gives the user free and unlimited access to all songs. It’s called a guitar.

On the other hand, Yesterday will also make sense to those conditioned to see songs as commodities. Jack isn’t an artist, in the sense that he creates or even interprets. He’s a conduit, streaming a playlist from some metaphysical cloud. He’s not John, Paul, George, or Ringo. He’s Spotify.

Yesterday. Directed by Danny Boyle. With Himesh Patel, Lily James, Kate McKinnon, Ed Sheeran, and Joel Fry. Distributed by Universal Pictures.

Running time: 1 hour, 52 mins.

Parents’ guide: PG-13

Playing at: Area theaters