Opened 18 years ago

Closed 18 years ago

#1699 closed enhancement (duplicate)

Patch for MythMusic and Mythweb

Reported by: joggl Owned by: Isaac Richards
Priority: minor Milestone: unknown
Component: mythmusic Version:
Severity: medium Keywords:
Cc: Ticket locked: no

Description

This tiket contains 2 files. One Patches Mythmusic and one Mythweb. After this, Mythmusic uses a complete new table structure for his data and needs a rescan. The Mythmusic patch includes no new features only a new database style. But this is needed for the second patch wich add's mp3act to mythweb. It's only visible if you use the default theme. with the compact one the old mythmusic is used.

Try it out.

The Patch Archives need only extracted to current svn plugin dir. (I wanted to create patch files, but i was not able to include the new files via svn diff)

Attachments (20)

music.patch.tar (220.0 KB) - added by jochen 18 years ago.
Version 1.0
web.patch.tar (170.0 KB) - added by jochen 18 years ago.
Version 1.0
changes.patch (170.1 KB) - added by jochen 18 years ago.
Version 2.0 (old files are now deprecated)
binary_files.tar.bz2 (12.6 KB) - added by jochen 18 years ago.
Version 2.0 (old files are now deprecated)
changes.2.patch (175.2 KB) - added by jochen 18 years ago.
Version 2.1
changes.3.patch (181.3 KB) - added by jochen 18 years ago.
Version 3.0
binary_files.3.tar.bz2 (26.8 KB) - added by jochen 18 years ago.
Version 3.0
changes.3.1.patch (176.3 KB) - added by jochen 18 years ago.
V 3.1 of the patches…
changes.3.2.patch (176.3 KB) - added by jochen 18 years ago.
Version 3.2
changes.3.3.patch (161.3 KB) - added by jochen 18 years ago.
Version 3.3
changes.3.4.patch (161.4 KB) - added by jochen 18 years ago.
Version 3.4
changes.4.patch (161.4 KB) - added by jochen 18 years ago.
Version 4
mfd.patch (12.0 KB) - added by jochen 18 years ago.
MFD Patches for new database style
mfd.2.patch (17.0 KB) - added by jochen 18 years ago.
Version 2
mfd.3.patch (22.8 KB) - added by jochen 18 years ago.
Version 3
changes.4.1.patch (161.9 KB) - added by jochen 18 years ago.
Version 4.1
changes.4.1-4.2.patch (53.2 KB) - added by Colin Guthrie <mythtv@…> 18 years ago.
Additional fixes to be applied after changes.4.1.patch
changes.5.patch (175.3 KB) - added by jochen 18 years ago.
Version5
mfd.5.patch (25.7 KB) - added by jochen 18 years ago.
Version5
mfd.5.1.patch (25.8 KB) - added by jochen 18 years ago.
Version 5.1

Change History (41)

Changed 18 years ago by jochen

Attachment: music.patch.tar added

Version 1.0

Changed 18 years ago by jochen

Attachment: web.patch.tar added

Version 1.0

comment:1 Changed 18 years ago by jochen

Type: defectenhancement

Updateed a little bit:

Now in Mp3Act in Mythweb, you have a list of the playlists to overwrite and hostnames by the playlists are supported.

The new files are binary_files.tar.bz2 and changes.patch

The old 2 music.patch.tar and web.patch.tar ar no longer valid!

But now this are no 2 sepperated patches, but also with the old one you need both that it works so this doesn't matter...

Please test and E-Mail bugs...

Changed 18 years ago by jochen

Attachment: changes.patch added

Version 2.0 (old files are now deprecated)

Changed 18 years ago by jochen

Attachment: binary_files.tar.bz2 added

Version 2.0 (old files are now deprecated)

Changed 18 years ago by jochen

Attachment: changes.2.patch added

Version 2.1

comment:2 Changed 18 years ago by jochen

Version 2.1:

  • Filesize of a song is now stored in the db.
  • mp3act in mythweb has now the same color as the skin
  • few bugfixes...

comment:3 Changed 18 years ago by Colin Guthrie <mythtv@…>

Unf. the patch does not apply cleanly on my checkout.

It only fails in mythweb/modules/music/handler.php, and only then due to the fact that your patch removes the commented header of the file which contains special automatically updated variables that svn checkout automatically modifies (things like the revision number, date etc.)

I was able to edit the patch using emacs' patch mode which updates the line offsets etc. for you and I can apply it cleanly now, but it's probably worth you tweaking things at your end before your next patch (basically put the comment back in - copy if from a clean checkout or from the view here on the trac.)

Col.

comment:4 Changed 18 years ago by Colin Guthrie <mythtv@…>

Lin 82 of mythmusic/mythmusic/main.cpp should read: data->setBitrate, not data.setBitrate.... tho' why this is hard coded I don't know? Surely the decoders' getMetadata() call should be responsible for setting this? Ditto for the file size as they may have this already. Also you derefernce the point data without doing the Null check that is done below your checks... Not looked properly yet, but this is certainly a bug.

If you would like me to do a cleanup on the patch, let me know. I'll review and alter it accodingly but we need to make sure we don't get conflicts with each other!!

comment:5 Changed 18 years ago by jochen

i have already fixed data->setBitrate. this is hardcoded, because i have only included this as a quick dirty hack. this should walk to the decoders getmetadata() as you said, but i haven't done this yet.

this other bug, i don't know what you mean, but i upload tomorrow a last version of the patch after that you can do a cleanup, ok?? hope i get the bitrate into the decoders until then...

comment:6 Changed 18 years ago by jochen

Version 3: You need the files "binary_files.3.tar.bz2" and "changes.3.patch".

new:

  • patch of db creation
  • fix segfault if no metadata was aviable and mythmusic tries to a a filesize
  • bitrate of mp3's now is read from file
  • plalist length and time is now calucated if a playlist is createn within mythmusic
  • minor fixes
  • should work with new SVN mythweb! (there were a few changes in the last days)

todo:

  • bitrate for other types
  • other minor fixes

Changed 18 years ago by jochen

Attachment: changes.3.patch added

Version 3.0

Changed 18 years ago by jochen

Attachment: binary_files.3.tar.bz2 added

Version 3.0

comment:7 Changed 18 years ago by jochen

short description of this patches:

changes in mythmusic:

  • new database structure, the old metadata table is splitted so that a extra table for genre, artist and album exits. on my machine the loading verry much faster with this changes. (from around 1 minute to now 20 seconds)

changes in mythweb:

  • the old mythweb is changed so that it works with the new database structure.
  • in the default skin the normal plugin is replaced by a modified version of mp3act, a ajax powerd mp3 web system, wich is much more comfortable than the old mythmusic web plugin!

comment:8 Changed 18 years ago by jochen

"changes.3.1.patch":

  • random playlist generation in mp3act is now working
  • remove of a few uneccesary codelines
  • start to implement the mythweb translation
  • support of adding songs from other playlist to another
  • remove of a missing database field
  • fixes....

Changed 18 years ago by jochen

Attachment: changes.3.1.patch added

V 3.1 of the patches...

comment:9 Changed 18 years ago by jochen

sorry for submitting so early, another small patch of dbcheck.cpp.

the prefix field in the artits table is not used and so it is removed...

Changed 18 years ago by jochen

Attachment: changes.3.2.patch added

Version 3.2

comment:10 Changed 18 years ago by jochen

Changes in 3.3

mythmusic:

  • dbcheck: remove 3 unecessary fields.

mythweb:

  • more language integration
  • removed different user stuff
  • removed lot's of unecessary javascript and php code

Changed 18 years ago by jochen

Attachment: changes.3.3.patch added

Version 3.3

comment:11 Changed 18 years ago by jochen

changes.3.4.patch

more fixes..

mp3act part:

  • album browsing is now working
  • playlist name reading is now done via ajax, not staticaly with the start of mythweb.
  • album browsing fixed
  • bug: automati start of streaming fixed.
  • album art now should working...

Changed 18 years ago by jochen

Attachment: changes.3.4.patch added

Version 3.4

comment:12 Changed 18 years ago by jochen

Version 4:

change of the dbcheck.cpp to create the nessecary fields for the mfd.

a patch for the mfd is also included wich patches the mfd so it sould work with the new table style (not tested!)

Changed 18 years ago by jochen

Attachment: changes.4.patch added

Version 4

Changed 18 years ago by jochen

Attachment: mfd.patch added

MFD Patches for new database style

comment:13 Changed 18 years ago by jochen

MFD Patches 2:

There were still a few bugs...

These also include the patches of ticket: http://svn.mythtv.org/trac/ticket/1709

Changed 18 years ago by jochen

Attachment: mfd.2.patch added

Version 2

comment:14 Changed 18 years ago by jochen

MFD Changes Version 3:

with the new version, mfd works and does not remove any metadata any more.

Changed 18 years ago by jochen

Attachment: mfd.3.patch added

Version 3

comment:15 Changed 18 years ago by jochen

Version 4.1

mythmusic:

small patch that fixes length callculation in playlist generation

Changed 18 years ago by jochen

Attachment: changes.4.1.patch added

Version 4.1

comment:16 Changed 18 years ago by jochen

Component: mythtvmythmusic

Genral Overview...

Because this Patch has now changed so much her eis a genral overview...

To install you need svn of mythplugins. Then aplly changes.4.1.patch and extract binary_files.3.tar.bz2 to the mythplugins directory.

To use the new database style with the mfd aplly the mfd.3.patch on your mfd svn.

At the moment all checks are done, everything works i think.

comment:17 Changed 18 years ago by Colin Guthrie <mythtv@…>

It is probably worth pointing out that I am reviewing these changes to mythmusic and mfd with a view to tidying up the SQL queries, and writing a conversion routine for dbcheck.cpp that migrates the old format to the new format (I only have playlist songs left to convert manually (i.e. in code), all the rest are done in pure SQL).

I am adding more robust checking of SQL query results and making the queries themselves much easier to read/understand by using LEFT JOINs and formatting the code.

I am also making adjustments to conform to the standard myth code formatting structure.

I should be done by the weekend.

Changed 18 years ago by Colin Guthrie <mythtv@…>

Attachment: changes.4.1-4.2.patch added

Additional fixes to be applied after changes.4.1.patch

comment:18 Changed 18 years ago by Colin Guthrie <mythtv@…>

To describe the previous attachment:

This adds the ability to migrate your musicmetadata tables to the new structure as part of the schema change.

Misc fixes for smart playlists, cdrip and numerous other things that are not immediately obvious.

Still needs more testing and the changes are not migrated to the MFD side of things yet.

comment:19 Changed 18 years ago by jochen

Version 5:

mythmusic:

  • Includedn the patches from colin so that only one patch need to be used.

mfd:

  • Included the dbcheck from colin.
  • Replaced joins with left joins
  • fixed a bug so that no playlist where found.

Changed 18 years ago by jochen

Attachment: changes.5.patch added

Version5

Changed 18 years ago by jochen

Attachment: mfd.5.patch added

Version5

Changed 18 years ago by jochen

Attachment: mfd.5.1.patch added

Version 5.1

comment:20 Changed 18 years ago by jochen

MFD Patch 5.1:

fixed a wrong column name in the select statement!

comment:21 Changed 18 years ago by Colin Guthrie <mythtv@…>

Resolution: duplicate
Status: newclosed

See #1919. This is a new ticket with the relevent updated patches.

Note: See TracTickets for help on using tickets.