Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Problems with jellyfin #209

Closed
2 tasks done
Druidblack opened this issue Oct 13, 2024 · 28 comments
Closed
2 tasks done

bug: Problems with jellyfin #209

Druidblack opened this issue Oct 13, 2024 · 28 comments
Labels
bug Something isn't working

Comments

@Druidblack
Copy link

Please check existing knowledge before opening an issue

Describe the Bug

  1. When playing singles, when playback reaches the end, the track freezes for 1 second. And then it does not reset until a new music playback starts.
    Безымянный
    34545345
    87844
    2)When using the webhook, you could choose to send only data about the music playback. With the API version, now when you create screensavers or movies (TV series), the program captures all the data about the question.
    3453535111
    345352222
    2.1) The program also captures the playback of thematic videos (which play in the background of a movie or TV series)
    3453535111
  2. Why does Polling mode appear? Is this a mistake?
    64643222
    Screenshots with logs (when single tracks hang)
    87844
    11123213

Platform

Docker

Versions

multi-scrobbler pr-205
jellyfin 10.9.11

Logs

No response

Additional Context

No response

@Druidblack Druidblack added the bug Something isn't working label Oct 13, 2024
FoxxMD added a commit that referenced this issue Oct 14, 2024
@FoxxMD
Copy link
Owner

FoxxMD commented Oct 14, 2024

Please try docker image foxxmd/mutli-scrobbler:pr-210, it should fix incorrect media type (non-audio) from being detected.

The program also captures the playback of thematic videos (which play in the background of a movie or TV series)

This is interesting I assumed jellyfin would only return video info for the playing movie. If you still see this behavior occurring with pr-210 image please try enable logPayload in jellyfin.json like this:

{
  "name": "MyJellyfinSource",
  "data": { /* ... */ },
  "options": {
    "logPayload": true
  }
}

This will make MS output JSON data the first time it sees new media from the jellyfin API

image

Please post a copy of this data (actual text, not screenshots) and logs when the background video/music is encountered by MS

When playing singles, when playback reaches the end, the track freezes for 1 second. And then it does not reset until a new music playback starts.

If this still occurs when using pr-210 please provide some more detail...im not sure what is you are describing. It may have been caused by the erroneous video sessions. Text copies of all the logs when this behavior is occurring would be helpful.

Why does Polling mode appear?

This is normal. The Jellyfin source is now making API calls to the Jellyfin server (polling) instead of waiting for the webhook to send data.

@Druidblack
Copy link
Author

I can't install the 210 version.
Failed to deploy a stack: multi-scrobbler Pulling multi-scrobbler Error Error response from daemon: manifest for foxxmd/multi-scrobbler:pr-210 not found: manifest unknown: manifest unknown

foxxmd/mutli-scrobbler:pr-210 - foxxmd/multi-scrobbler:pr-210

@FoxxMD
Copy link
Owner

FoxxMD commented Oct 14, 2024

It's still building 😅 follow status here #210

@FoxxMD
Copy link
Owner

FoxxMD commented Oct 14, 2024

Should be available now

@Druidblack
Copy link
Author

With version 210, only music is captured. Videos and thematic videos are not captured.
There is a problem with the theme music. In fact, your program is working correctly. It captures the music being played. But from the point of view of common sense, this is wrong.

The problem with singles remains. A single song in the playlist is not added to the playlists after reaching the end. Can you test this behavior on your instance? Or is this the only problem I have?

For jellyfin, service information has appeared in the list
1

For Last fm (Client), the artist's name is missing from the list. And official information also appeared.

2

@FoxxMD
Copy link
Owner

FoxxMD commented Oct 14, 2024

It captures the music being played. But from the point of view of common sense, this is wrong.

So please enable logPayload as I mentioned and post the text logs from the captured output when this happens. I may be able to filter this out if I can get examples of the data.

The problem with singles remains. A single song in the playlist is not added to the playlists after reaching the end. Can you test this behavior on your instance? Or is this the only problem I have?

I cannot reproduce this. You need to post full, text logs of the behavior occurring for me to be able to properly debug this. Screenshots of parts of the log are not enough.

@Druidblack
Copy link
Author

I don't use jellyfin.json for jellyfin. I use env variables. How do I use env variables in docker to enable logPayload?

@FoxxMD
Copy link
Owner

FoxxMD commented Oct 14, 2024

It is not possible to enable logPayload with only ENVs. Please use the docker instructions for storage to mount a host directory to /config and then use the sample jellyfin.json found under Configuration -> File to setup your source.

@Druidblack
Copy link
Author

I created jellyfin.json, took the config from the example, replaced the address, name and Api. After restarting the container, jf did not appear in the source.

jellyfin.json.txt

@FoxxMD
Copy link
Owner

FoxxMD commented Oct 14, 2024

Probably you want to delete all of the other config properties and make sure to remove any existing JF ENVs.

[
  {
    "name": "MyJellyfin",
    "enable": true,
    "clients": [],
    "data": {
      "url": "http://192.168.1.161:8096",
      "user": "admin",
      "apiKey": "8898e74df610432ebf0084b8cda0ee09",
    },
    "options": {
      "logFilterFailure": "warn",
      "logPayload": true
    }
  }
]

@Druidblack
Copy link
Author

jellyfin.json.txt
I have corrected the settings. But the jf source never appears. The config folder is correct. I still have lastfm in it.json and it works correctly. I have no idea why jf is not starting. Help.

@FoxxMD
Copy link
Owner

FoxxMD commented Oct 14, 2024

Please provide full logs (not screenshots) of MS's startup. I cannot help you if you do not help me by providing logs and data for what is happening.

@Druidblack
Copy link
Author

@FoxxMD
Copy link
Owner

FoxxMD commented Oct 14, 2024

Look at the validation error that is given at the very beginning:

Error: The config entry at index 0 from jellyfin.json was not valid
    at ScrobbleSources.buildSourcesFromConfig (CWD/src/backend/sources/ScrobbleSources.ts:517:43)
    at <anonymous> (CWD/src/backend/index.ts:121:9)
caused by: Error: Json config was not valid. Please use schema to check validity.

Schema Error:
At: /options/logFilterFailure
Data: true
enum: #/properties/logFilterFailure/enum => must be equal to one of the allowed values [false, debug, warn]

Schema Error:
At: /options/logFilterFailure
Data: true
enum: #/properties/logFilterFailure/enum => must be equal to one of the allowed values [false, debug, warn]

logfilterFailure should be "warn" or "debug". Reference the example I gave you above.

@Druidblack
Copy link
Author

Druidblack commented Oct 14, 2024

scrobble-2024-10-14.1.log

I made a mistake in the configuration file. I specified logFilterFailure twice. I've fixed it now.

[
{
"name": "MyJellyfin",
"enable": true,
"clients": [],
"data": {
"url": "http://192.168.1.161:8096",
"user": "admin",
"apiKey": "8898e74df610432ebf0084b8cda0ee09"
},
"options": {
"logFilterFailure": "warn",
"logPayload": "true"
}
}
]

jf does not appear.

@FoxxMD
Copy link
Owner

FoxxMD commented Oct 14, 2024

[2024-10-14 23:01:36.752 +0300] ERROR  : [App] [Sources] jellyfin.json config file could not be parsed

You have an error in your file. logPayload is missing a double quote.

"logPayload: "true"
"logPayload": "true"

If you are not using something like VSCode with built-in validation to check your files then consider using an online validator https://jsonlint.com/

@Druidblack
Copy link
Author

In the message above, I attached a new debt file with the correction of the missing quotation mark. jf did not show up.

@FoxxMD
Copy link
Owner

FoxxMD commented Oct 14, 2024

Are you reading the logs you are sending?

Error: The config entry at index 0 from jellyfin.json was not valid
    at ScrobbleSources.buildSourcesFromConfig (CWD/src/backend/sources/ScrobbleSources.ts:517:43)
    at <anonymous> (CWD/src/backend/index.ts:121:9)
caused by: Error: Json config was not valid. Please use schema to check validity.

Schema Error:
At: /options/logPayload
Data: true
type: #/properties/logPayload/type => must be boolean

Schema Error:
At: /options/logPayload
Data: true
type: #/properties/logPayload/type => must be boolean

Schema Error:
At: 
Data: Object named 'MyJellyfin'
anyOf: #/anyOf => must match a schema in anyOf
    at validateJson (CWD/src/backend/utils/ValidationUtils.ts:59:15)
    at ScrobbleSources.buildSourcesFromConfig (CWD/src/backend/sources/ScrobbleSources.ts:507:45)
    at <anonymous> (CWD/src/backend/index.ts:121:9)
"logPayload": "true"
"logPayload": true

@Druidblack
Copy link
Author

I'm sorry for the inattention. I won. It's working now. I am attaching a log file.

After launching the program, I launched the theme music so that you could explore it. The song is called theme, but this is not necessarily the name (different programs for downloading theme tunes may call files by different names).

Also, this melody was a single playback. This will show an error when the song reaches the end and stops at 01 seconds and is not added to the list of questions.

scrobble-2024-10-14.1.log

@FoxxMD
Copy link
Owner

FoxxMD commented Oct 14, 2024

Your logs do not include any verbose or debug-level logs. Please turn on debug logging by using ENV LOG_LEVEL=debug

@Druidblack
Copy link
Author

@FoxxMD
Copy link
Owner

FoxxMD commented Oct 14, 2024

There was an issue with how logPayload worked that I've fixed. Please pull the latest image (should display version pr-201-bb132101b5... ) and post logs when the "theme" and single playlist issues are occurring again, thanks

@Druidblack
Copy link
Author

@FoxxMD
Copy link
Owner

FoxxMD commented Oct 15, 2024

Thank you, this is the information I needed. This is interesting...

The media being picked up is /mnt/film/5 Centimeters Per Second (2007) [tmdbid-38142]/theme.mp3 but it does not look like you were watching 5 Centimeters Per Second when the logs were captured, is this correct? Did you browse to the movie in the JF interface and then this happened?

EDIT: I see theme plays were introduced in 10.7..., is this how you got the files?

Did this logs capture include any actual music listening or is it just the theme thing?

@FoxxMD
Copy link
Owner

FoxxMD commented Oct 15, 2024

Please try pulling the latest pr-210 image and let me know if that fixes the theme detection issue, thanks.

@Druidblack
Copy link
Author

The music plays when I'm on the movie page. Log. The file includes only the theme.

Yes. One of the ways to get audio and video themes for my collection.
I'll check it out now.

@Druidblack
Copy link
Author

Great. Music themes are no longer captured when playing.

FoxxMD added a commit that referenced this issue Oct 15, 2024
fix(jellyfin): Enforcing media type and session handling fixes
@FoxxMD
Copy link
Owner

FoxxMD commented Oct 16, 2024

These fixes are in 0.8.6 (latest docker image) and should also address MS hanging at the end of playlists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants