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

Can't play shared songs #138

Closed
jltignon opened this issue Jan 6, 2014 · 16 comments
Closed

Can't play shared songs #138

jltignon opened this issue Jan 6, 2014 · 16 comments
Assignees
Milestone

Comments

@jltignon
Copy link

jltignon commented Jan 6, 2014

Hi,

I'm using the music app on owncloud 6.0.0a successfully for local songs but can't play shared songs. The songs are in the list but can't be played. No error messages in the browser.

I've tried 0.1.7-alpha and 0.1.8-beta : the problem is the same. On the GET request that returns the json table (/index.php/apps/music/api/artists?fulltree=true), the files variable is ok for a local song, for exemple :

files":{"audio\/mpeg":"\/index.php\/apps\/files\/download\/music\/01%20-%20Boogie%20Chillen.mp3"}

but when the song is shared, the files variable looks truncated like this :

"files":{"audio\/mpeg":"\/index.php\/apps\/files\/downloa"}

So the song never plays.

Have I missed something ?

Loïc

PS: if it can help, here's the full json table returned by the GET resquest :

[{"id":24,"name":"Chuck Berry","image":null,"slug":"24-chuck-berry","uri":"\/index.php\/apps\/music\/api\/artist\/24","albums":[{"name":"Blues","year":2003,"cover":null,"uri":"\/index.php\/apps\/music\/api\/album\/24","slug":"24-blues","id":24,"artists":[{"id":"24","uri":"\/index.php\/apps\/music\/api\/artist\/24"}],"tracks":[{"title":"Deep Feeling","number":3,"artist":{"id":24,"uri":"\/index.php\/apps\/music\/api\/artist\/24"},"album":{"id":24,"uri":"\/index.php\/apps\/music\/api\/album\/24"},"length":null,"files":{"audio\/mpeg":"\/index.php\/apps\/files\/download\/music\/03%20-%20Deep%20Feeling.mp3"},"bitrate":null,"id":25,"slug":"25-deep-feeling","uri":"\/index.php\/apps\/music\/api\/track\/25"}]}]},{"id":25,"name":"John Lee Hooker","image":null,"slug":"25-john-lee-hooker","uri":"\/index.php\/apps\/music\/api\/artist\/25","albums":[{"name":"Blues Kingpins","year":2003,"cover":null,"uri":"\/index.php\/apps\/music\/api\/album\/25","slug":"25-blues-kingpins","id":25,"artists":[{"id":"25","uri":"\/index.php\/apps\/music\/api\/artist\/25"}],"tracks":[{"title":"Boogie Chillen","number":1,"artist":{"id":25,"uri":"\/index.php\/apps\/music\/api\/artist\/25"},"album":{"id":25,"uri":"\/index.php\/apps\/music\/api\/album\/25"},"length":null,"files":{"audio\/mpeg":"\/index.php\/apps\/files\/download\/music\/01%20-%20Boogie%20Chillen.mp3"},"bitrate":null,"id":26,"slug":"26-boogie-chillen","uri":"\/index.php\/apps\/music\/api\/track\/26"}]}]},{"id":26,"name":"Dogs","image":null,"slug":"26-dogs","uri":"\/index.php\/apps\/music\/api\/artist\/26","albums":[{"name":"3 CD Original Classics","year":2010,"cover":null,"uri":"\/index.php\/apps\/music\/api\/album\/26","slug":"26-3-cd-original-classics","id":26,"artists":[{"id":"26","uri":"\/index.php\/apps\/music\/api\/artist\/26"}],"tracks":[{"title":"01 - Little Johnny Jet","number":1,"artist":{"id":26,"uri":"\/index.php\/apps\/music\/api\/artist\/26"},"album":{"id":26,"uri":"\/index.php\/apps\/music\/api\/album\/26"},"length":null,"files":{"audio\/mpeg":"\/index.php\/apps\/files\/downloa"},"bitrate":null,"id":27,"slug":"27-01-little-johnny-jet","uri":"\/index.php\/apps\/music\/api\/track\/27"}]}]}]
@jltignon
Copy link
Author

Hi,

Sorry to insist. I put owncloud logging in debug mode and here's what I get in the log when I try to play a shared song.

{"app":"music","message":"JS: {\"title\":\"01 - Little Johnny Jet\",\"number\":1,\"artist\":{\"id\":47,\"uri\":\"\/index.php\/apps\/music\/api\/artist\/47\"},\"album\":{\"id\":47,\"uri\":\"\/index.php\/apps\/music\/api\/album\/47\"},\"length\":null,\"files\":{\"audio\/mpeg\":\"\/index.php\/apps\/files\/downloa\"},\"bitrate\":null,\"id\":50,\"slug\":\"50-01-little-johnny-jet\",\"uri\":\"\/index.php\/apps\/music\/api\/track\/50\",\"$$hashKey\":\"01A\"}","level":0,"time":"2014-01-10T11:32:13+00:00"}

As you can see, the files parameter is truncated.
I read the admin manual, try to dig in the code to figure out what's happening but unsuccessfully.

I am surely missing something but what ?

@MorrisJobke
Copy link
Contributor

@jean-loic Thanks for your feedback. As I'm currently busy I will have a look at this later this week.

@jltignon
Copy link
Author

@kabum Thanks a lot for answering and for the good work on the music application.

@jltignon
Copy link
Author

@kabum Nothing new about this problem ?

@MorrisJobke
Copy link
Contributor

@jean-loic Sorry ... It's exam time. Next week is ownCloud Hack-week so I will have a look at this.

@kennyMC
Copy link

kennyMC commented Mar 7, 2014

any news about this issue?

@MorrisJobke
Copy link
Contributor

@kennyMC Not yet. I currently work on the ampache implementation #91 and then will look into all those other issues here

@callmemagnus
Copy link

Hello,

running on 6.0.2 I have the truncated "/apps/files/downloa" in routes.json and I wonder if that is not the cause of my sharing issue.

I am not able to find where this is "generated".

When I share a file, I am not able to download the file, even as logged in user (same as sharer). I see the first presentation page but nothing more (ie 404 after clicking on the &download link).

@MorrisJobke
Copy link
Contributor

@callmemagnus Thanks for that hint. The routes.json got dropped for ownCloud 7. Routes should just be generated in the backend(see owncloud/core#7494). This seems to be a bug with the core. I will check this out once the ampache stuff gets merged (#91).

@MorrisJobke MorrisJobke added this to the First release candidate milestone Mar 20, 2014
@MorrisJobke
Copy link
Contributor

@DeepDiver1975 Your bug ;) Will have a look at it now.

@MorrisJobke
Copy link
Contributor

@DeepDiver1975 Following code should be fixed (storage needs to be respected)

Maybe add it to the SQL (used in collection API method - default for web view):
https://github.com/owncloud/music/blob/master/db/trackmapper.php#L44:L51

@MorrisJobke
Copy link
Contributor

@DeepDiver1975 Share hooks:

\OC_Hook::connect('OCP\Share', 'post_shared', ...);
\OC_Hook::connect('OCP\Share', 'pre_unshare', ...);

@MorrisJobke
Copy link
Contributor

  • Recognize new shared file
  • Recognize unshared file
  • Play music file from webinterface
  • Play music file from Ampache API
  • Correct metadata extraction

@butonic
Copy link
Member

butonic commented Mar 25, 2014

the first three issues work with #182 the other two I don't know. What exactly do you mean with "Correct metadata extraction"?

@MorrisJobke
Copy link
Contributor

@butonic Metadata should be extracted => the scanner have to work.

@MorrisJobke
Copy link
Contributor

I pushed some changes today and they work with external storage for stable5, stable6 and master.

Fixed with #182

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants